PLC I/O Abstraction

bernie_carlton

Lifetime Supporting Member + Moderator
Join Date
Apr 2002
Location
Yakima, Washington
Posts
6,413
Terry Wood's post in another thread reminded me of the programming contortions I encounterd.

Our mother company purchased a firm whose machines processed a product in parallel lanes. The lanes were independent other than that they were on the same machine. So lane 1's program was "See lane 1's inputs - turn on lane 1's outputs". Simple

The other lanes were simply copies of this logic with their own appropriate inputs, outputs timers, counter etc. Very easy to clone. The original machine had 4 lanes but when they went to 6 lanes it was no problem. Cut, paste, change references.

Then the real changes started happening. They were now processing a new type product, still in lanes, but of greatly variable size depending on the product. Now if it was product 1 you might use this set of inputs, but if it was product 2 dyou would use another set of inputs. Another part was the outputs. Where before a single output was turned on for a lane now a GROUP of outputs were turned on, again depending on the product being run.

So I wrote code before the main processing, selecting the proper inputs depending on the product being run (like Terry's NO/NC option) and presented the selected inputs to the lane processing as control relays. Likewise the lane processing, instead of setting actual outputs now set control relays which are interpreted in susequent sections of code depending on product type to turn on the appropriate group of outputs.

Once I had this done I thought - they can't make it much harder than that. Guess what, now the processing had to be able to run in one direction or the other. This meant the effective inputs and outputs were now swapped in order. So another layer of abstraction was placed before and after the code noted above. Now the 'product dependent' code operated not on real I/O but on control relays which were related to the real I/O dependent on direction.

In an AB SLC program the program files are in order, input direction processing, input product processing, lane code, output product processing, output direction processing. I'm just waiting to see what sales dreams up next.
 
Bernie,

At some point... isn't it going to be time to review the entire scheme? It's gotta be lookin' a bit Rube Goldberg-ish by now.

By the way... That would be... Terry Woods' post (apostrophe after the s).
 
At this point it's not too bad. In AB the program files are in logical order and commented. IN AD the sections are in order and similarly commented.

To do all the product and direction dependent selection and processing in each lane would be nightmarish. (I saw some attempts at just that by the temporary programmer the acquired company had used and even thougn commented they were totally indecipherable.) So at current the core routines take in the inputs, process them and set outputs in exactly the same way as at the start, just with control reklays.

But hey - since our companies do mostly custom lines - I'll have a job as long as they keep thinking up variations.

And I humbly apologize for the incorrect possesive of a plural nown.
 
"And I humbly apologize for the incorrect possesive of a plural nown."

It's ok. When telling people my name I always seem to have to say... "No... WOODS, as in more than one tree."

However, it is not a plural "nown". I tend to spell that as "noun", snort! - that was MGD going through my nose!

It is a singular Proper Noun; one that happens to end in "s". Jeez, imagine that... I am a Proper Noun! Who'd a thunk it! I never did. I can't imagine ANYTHING proper about me.
 
Steve,

I agree with what you said. I definitely don't think that I'm a common noun, such as a chair, a door, or a rock (well, maybe a rock).

However... an "Improper Noun"? Hmmm... Yeah, I can buy that!

It occurs to me that that is the first time that a member of the Original Triad (the first three in the Baker Street Regulars) has been so described! I like it!
 

Similar Topics

HI everyone, i am new to Siemens plc programming and i am in need of some help. yesterday we had an S7-1200 CPU 1214C fail to turn on an output to...
Replies
7
Views
164
Hello, I have a Mitsubishi FX3G 14M PLC and a E615 HMI from Mitsubishi/Beijer. I'm using GXWorks 2 to do the programming and I have no problem...
Replies
4
Views
102
Hi, I'm trying to import a Rockwell/AB EDS to Beckhoff but I'm not sure how to import/install the EDS. It is a PowerFlex 525 EDS. Is there a way...
Replies
1
Views
92
I want to communicate my Q series PLC with Factory IO using GX works 2 software, I want to use modbus as server and the ips are as follows plc...
Replies
0
Views
62
Hi everyone. I'm trying to read values from a Loadcell with a 2080-TC card. I know the 2080-TC is a thermocouple card but it reads millivolts that...
Replies
4
Views
101
Back
Top Bottom