Several similar machines, one PLC

eld101

Member
Join Date
Jul 2006
Location
Ohio
Posts
32
Here at work we have 8 similar machines, four of which are pretty much identical. We currently use 1 control logix for 2 machines, however they have completly seperate code. Every time you want to make a change, you have to make it in 4 or 8 different places.

I was thinking that you could theoretically have one block of code, then give each machine "run time" on that code my moving in its specific addresses. The problem would then be cycle time.

Has anyone ever done something like this whether this way or some other way I have not thought of?

Thanks for any feedback.
Eric
 
I did it with a PLC5/40 once, where I had 23 routes and found the source/destination vessels split nicely into 7 identical route types.

I created 7 sub-routines and then passed the relevant data on calling the sub-routines.

I remember I had to condition bits and words, like the I/O etc, into B: and N: files to ensure they were all in the same positions etc. Then move these into common files for inside the subroutines.

I would normally program with Siemens, so this type of programming is second nature.
 
PeterW said:
I did it with a PLC5/40 once, where I had 23 routes and found the source/destination vessels split nicely into 7 identical route types.

I created 7 sub-routines and then passed the relevant data on calling the sub-routines.

I remember I had to condition bits and words, like the I/O etc, into B: and N: files to ensure they were all in the same positions etc. Then move these into common files for inside the subroutines.

I would normally program with Siemens, so this type of programming is second nature.

Was cycle time ever an issue while doing this?
 
No, it was doing more or less the same work, just less actual code and as you stated, if you had to modify it, it was only in one place (or 7 in my case as they were all very much the same thing, just different types of vessels).

You have to remember though, once done this way, fault finding has to be done differently, as the status you look at is not necessarily that, that you want to see. Because their common (scratch) flags.

Instead you would have to look at the individual memory areas and see what state they are in and cross check against the code.
 
This can be done fairly easily. Opinions vary as to it being the best way to do it. Many people including me find troublshooting applications coded the way you are asking about to be more difficult.

You need to really understand indirect adressing, UDT structure, I/O buffering, and Loop style programming. If you do not then this will be challenging to say the least.

I have implemented code like this for several applications.

I would create a UDT containing elements for all the inputs, outputs, timers, setpoints, bits etc. that each machine needs. If only one machine has a certain element it still should be in the UDT. After your UDT is created create a tag called "My_Machine" make it an array whose size is equal to or slightly greater than the number of machines you have to control.

Now you should have all the tags needed to control all your machines located in one tag array of the UDT you created. You should also create another tag call it "Buffered_Machine" make it a single tag of the same UDT you created.

You will then write the ladder for your machines. Use the Buffered machine tags as your adresses in the code. Wtite only one instance of the code. You will use the same code for all your machines. The tricky part is having the code deal with the differences in your machines. You mentioned they are not identical. If they are a lot different you will find this method very wasteful. Identical equipment is the ideal application.

You will also have another ladder that has all your inputs and ouputs mapped in and out of your UDT's.

The input/output ladder should be called once using a JSR. Just like normal code.

The other ladder with your machine control would then be called using a FOR loop. Call it as many times as you have machines.

Last trick. The first and last rungs of your machine control ladder will be copy instructions that use indirect adresses referencing the index value of your for loop. First rung copies "My_Machine[index]" into "Buffered_Machine" 1 element long. The last rung copies the data back into it's array. It all copies easily because of the UDT usage. Using this method means that only 2 rungs are indirect adressed. This is much easier than indirect on every single word and bit.

If this is not easily understood then you probably better think over trying this. That was a really crash explanation of Loop style programing passing data to UDT's.

Good Luck, if you have specific questions post them. I am sure others have opinions on this too.

RSL
 
You have 8 machines controlled by 4 CPU's, you have to make 8 "changes" as a minumum if the change applies to all the machines, or 4 "changes" if you use a common block as you still have to change the block in all the CPU's.
If I've got that right, then I wouldn't change your current set-up.
 

Similar Topics

Hello Friends I have a installation with v16, v17, v18, v19, v20. When I tried to open a v20 file, the enable source protection was not enabled...
Replies
1
Views
247
Hi Has anyone experience within using Siemens Automation License manager as a license server? The case is I have a virtual environment with...
Replies
1
Views
522
We have a devicenet consisting of 15 PF755 drives in a centerline MCC, and on a separate trunk cable coming off the scanner, a single PF525 in a...
Replies
0
Views
350
Hey all, I am using Vijeo Designer v6.2.8.12 for a mineral plant project. For that, I needed to incorporate three different plants' HMI page in...
Replies
2
Views
1,206
Hello Friends I am a rookie in mitsubishi. I have many conditions in my program, How can I add several lines to a rung? For example: How can I...
Replies
1
Views
1,524
Back
Top Bottom