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

The past week we received a new piece of equipment from Germany which utilizes siemens controls. Typically in our company we use A.B. controls for...
Replies
4
Views
42
the conveyor can stop because of a safety sensor or safety switch. And also it can stop because of an object jam detector sensor. If the conveyor...
Replies
5
Views
121
Good Day to all of you, this is my first post, i will try to explain as best as possible, english is not my natural language. I am performing an...
Replies
0
Views
29
Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
10
Views
191
I have a project to automate four generator sets. The system will monitor and store the load demand of the factory. Once there's Power outage, the...
Replies
0
Views
55
Back
Top Bottom