Is there any pre-packaged libraries / code that I can purchase so I don't have to reinvent the wheel?
thanks guys,
buckian
Not that I'm aware of. It would have to be a pretty generic machine for a library to exist for it.
I once wrote a BASIC program that would "fill in the blanks" for our standard control schemes on PLC-5's. This worked extremely well, but first I had to develop a scheme for each module on the machine.
But since this was for conveyor systems, which were mostly made up of the same basic building blocks, it didn't require more than a dozen different schemes to do the job.
The really nice thing about this approach was that once a scheme (module) was debugged, then it was sure to work anywhere. That made debug a snap.
When I uncovered a error in the logic (I had my fair share of them
), or when the plant requested a change (and there was plenty of these, too), then that individual module would be corrected and I'd propagate the fixed module throughout the system. This wasn't too bad, but it really paid off to get things working right the first time.
In Control Logix it's easy to create routines that you can use over and over. But you would have to create the first one yourself. This is the approach that I would use.
Caution: Semi-rant follows.
I'd be careful about how you go about it. At my previous employer, the group that was in charge of global controls design wrote what had to be some of the worst code imaginable. And to make matters worse, the hardware design (motor sizing especially) was pathetic. Things either didn't work, or didn't work for long.
And since they used this design *everywhere*, we had the same problems propagated throughout the entire plant (and all of the other plants as well).
The last that I heard, they *still* didn't have anywhere near all of the bugs worked out (and some area managers have been replaced (fired) because their areas couldn't make production).
When I left we were covering *every* area in the plant (and car plants tend to be gigantic) - sometimes all on the same night. One of my old partners logged his walking time between various breakdowns one night, and had spent 1-1/2 hours that night just walking to the different breakdowns that he had to cover.
So, in a nutshell, be careful about trusting someone else's code in your machines.