How to Change PID Instruction from SLC to ML1200

dskplc

Member
Join Date
Aug 2013
Location
New Zealand
Posts
119
Hello,

I changed controller type in RSLogix 500 from SLC 5/02 to MicroLogix 1200 and was given the ladder logic to update it for the new controller. The PID instruction for new ML 120 required creating a new data type. Now I think I have duplicate data in my software since I get an error message saying I have "exceeded my 2K memory for user data words". I have tried deleting unused memory but that creates more errors. I have experimented with changing to a ML 1400 but that creates read / write bit errors. Any ideas?! I have customer waiting for me to download this code and am at loss even after googling this. Thanks in advance.
 
Look in the data files for big gaps of unused memory. For instance, B3:0/15 is used and the next bit used is B3:5/0 - that's 4 words that could be freed up if the data is re-organized.

Post the file and we can take a look at it. The devil is in the details on these things.
 
Hello,

I have attached the file in a zip here. I am thinking maybe reentering the code in to a new RSLogix 500 program may work. Thank you for your help.
 
I see there is a big gap between N31 and N120 but do not know how to reorganize. I also see that there are unused files but don't quite see which ones these are.
 
Hello,

Entering the existing code into a new RSLogix 500 program didn't work so am back to wondering what to do next? I have tried deleting the data files and related code and re-entering this but no luck. It seems to be related to read / write issues. Does anyone have any experience with this? Thanks for your help.
 
Try this:
Change the number of elements in table C5 to 4.
Re-Verify the project and you'll see the program errors.

There appears to be a lot of monkeying around with the index register. Can be very difficult to debug.

I see a lot of one-shots and latches which is usually an indicator that the program was written by a computer programmer and not a plc programmer so there is a lot of waste in the code. Enough to create a memory usage problem.

The rungs with a lot of branches makes it hard for the editor to focus on the program faults.

This project deserves a re-write for maintenance sake but you would have to get out the original specification to find out exactly what its trying to accomplish.

added:

A big chunk of memory can be freed in N30 by reorganizing its usage

Make sure all of the i/o is configured correctly first. The program is looking for a 32 point input card at slot 2, a 16 point output card at slot 3 but I can't figure out what should belong in slot 1. The program addresses both inputs and outputs but in words 1. Must be a smart module, not a standard i/o module. Get this set correctly, or fix its usage, and some of the weird program errors go away.
 
Last edited:
post the ORIGINAL - latest WORKING program file (RSS) from the SLC-5/02 system ... you'll have to zip it first ...

There appears to be a lot of monkeying around with the index register.

that would have been caused by the fact that the old SLC-5/02 system was unable to do INDIRECT addressing – using a "pointer" inside the [square brackets] ... so back in the old days, manipulating the S:24 register would allow INDEXED addressing – using the # sign – to perform much the same type of operations ...

I have customer waiting for me to download this code

is the existing system still running? ... is it shut down waiting on you? ... what's your DEADLINE on this project? ... note that "as soon as possible" is not a valid answer ...
 
Last edited:
Here is the original code in the SLC5/02. When changing the controller type I had errors regarding address indexing and the OSR. Those were an easy fix, but the problem occurred, it seems< when I had to enter a new PID instruction. Again, thank you for help.
 
@jstolaruk: can you clarify what you mean by your last 2 paragraphs?:

"A big chunk of memory can be freed in N30 by reorganizing its usage"
How do I reorganize its usage?

"Make sure all of the i/o is configured correctly first. The program is looking for a 32 point input card at slot 2, a 16 point output card at slot 3 but I can't figure out what should belong in slot 1. The program addresses both inputs and outputs but in words 1. Must be a smart module, not a standard i/o module. Get this set correctly, or fix its usage, and some of the weird program errors go away." Not sure what you mean.
 
I don't think that "memory usage" is your real problem ...

attached is a "getting started" conversion that MIGHT (or might NOT) be helpful to you ... this one WILL validate ...

basically - the screenshot shows that your new MLX1200 should have plenty of memory to handle your old SLC-5/02 project ... but you can't just "change the processor type" for this kind of conversion ...

in simplest terms, I started a new program for the correct (?? based on what you've posted) type of processor - then Copied-and-Pasted the ladder files into that program ... then I used the Search and Replace feature to substitute B (Binary) type addresses as TEMPORARY PLACEHOLDERS for your new I/O ... you'll have to massage these placeholders to fit your new I/O ...

after I TEMPORARILY substituted the I/O PLACEHOLDERS - I also made some "maybe these will work" conversions to the INDEXED vs. INDIRECT addressing that your old system used ... you'll have to double-check these - and possibly make corrections once the system is up and running ...

on the subject of the PID ... the original PID had the timing/triggering set for STI - even though the PID instruction was not located in an STI file ... that means that the tuning (although it might have worked) was NOT correct - so the original tuning values are now meaningless due to the new processor's altered execution/scan time ... in simple terms, you'll have to start over with the tuning ...

good luck with your project ...

.

MLX1200_Memory.PNG
 

Attachments

  • NEWROCK.zip
    34.3 KB · Views: 11
Last edited:
I do have 1 more question: were the I/O modules in the micrologix rss I had attached acceptable for my project?

And for the project deadline? 3 days ago and the plant is shut down waiting...
 
And for the project deadline? 3 days ago and the plant is shut down waiting...

Sounds like they should have put more thought into their upgrade path and done some testing before their shutdown period. I hope you are charging accordingly.

Trying to upgrade an SLC using PID functions with a Micrologix is a poor choice IMHO.
 
were the I/O modules in the micrologix rss I had attached acceptable for my project?

probably – but we can't tell for sure from here ... whoever set up the original file didn't document the specific types of the discrete I/O modules – he just used "ANY type" placeholders ...

at least the numbers of the I/O points add up – so cross your fingers – you might get lucky ...

chances are that the scaling on your analog inputs and outputs will be different – so you'll probably have to deal with that issue when you get a little further along the road ...

if I get a chance later this weekend I'll try to run that piece of the puzzle down for you – but I've got other pressing projects of my own to work on ...

questions:

was the old SLC system still working? ...

if so, is there a chance that you could reinstall it temporarily in order to get some slack time to work this conversion out? ...

TIP: it might be too late now, but if you ever have to convert something like this again, it would be wise to run the project by the forum first – rather than later ... (should-a, would-a, could-a) ...

good luck with it – my time is up for now ... I hope that this has been helpful ...

.

MLX1200_IO_match.PNG
 
And for the project deadline? 3 days ago and the plant is shut down waiting...

yikes! ...

just in case I do happen to have some spare time this weekend, it would be helpful to know if you just connected the NEW inputs and outputs in the same NUMBER ORDER as the old ones ...

for example:

input bit /0 > to > input bit /0
input bit /1 > to > input bit /1
and so on ...

if you did it that way then MAYBE I'll have time to fix the placeholder bits for you ...

SUGGESTION:

download the program file that I posted earlier into the MicroLogix ... see if it will run AT ALL ... carefully list any verification errors ... and nail down any runtime faults that occur ... whether it runs or not, save the file (as an upload from the processor) and then post it ... sometimes that helps us debug any issues that might pop up ...

REMEMBER:

the more detail you tell us about the project, the more detailed we can make our answers ... we don't KNOW if you don't TELL us ...

again, good luck ...
 
Last edited:
Hi Ron,

Again, thank you for your help. I copied your program into a new one and am currently replacing the placeholders in the same order as in the original code with the goal of getting to the plant today and downloading it into the ML. I will try your code in the ML also.

History: Earlier this week I was called to the plant due to a fault on the HMI saying the network couldn't see controller on the node and the PLC it wasn't running. I tried connecting to it - it is on a DH485 network - without any luck. So it was decided to save time on rewriting the code to RSLogix 5000 and just swap out the controller to one that uses RSL500. Not as easy as I thought.

I do see you made S:24 have a placeholder. Is there a problem with using S:24? More research to be done...
 

Similar Topics

Usually I just read other posts on here but I simply cannot find the answer to my problem this time. I have a PLC-5 40E. There is a PID that...
Replies
6
Views
3,011
Hello everyone, In RSlogix5000 PID loops are running in continuous task. Those are to be configured in periodic task and tuning. can anyone...
Replies
14
Views
3,150
I am looking to change a PID loop operation on a ROC Floboss 103. The valve is fail open. they need it to fail close now. Do I need to make the...
Replies
1
Views
1,968
Compactlogix. Newest version of rslogix 5000. Online editing open up PID dialog cant change values. What am i doing wrong or missing? Thank you
Replies
2
Views
1,940
Hello, We changed from steel to fabric belt (lighter, more stretch) and are now getting quite aggressive starts on an unloaded belt and at times...
Replies
2
Views
3,360
Back
Top Bottom