Sign in to follow this  
Followers 0
wildswing

Can RSL5000 PID be used for multiple loops via JSR & subroutine?

6 posts in this topic

Hey guys, I've just learned of an upcoming project that I'm expected to do the programming on. Details are very sketchy at this point. Here's what I've been told. The project is a new resin (glue) injection system in our MDF mill. Resin is injected into the fiber blowline immediately after refining and before drying through 80 individual injection nozzles. Each nozzle has it's own analog valve and some other associated stuff. What I've been told is that this will require 80 PID loops. Please be a typo!!!! My head is racing trying to think of a way to not write 80 identical pieces of cookie cutter ladder logic. Note that I have no SFC and very little text based programming experience. I'm an old PLC5 ladder guy who's relatively new to the RSL5000 world. I've never done PID control in RSL5000. One idea I've had is to put the PID in a subroutine and then go to it 80 times, but wouldn't that bugger up the PID? Could I change the PID address each time through using an indirect (or clx equivalent). Like I said, initial details are very sketchy, but now that I know I'm in for a boat load of work, I'm beating their door down for more specifics. I figured I'd get the juices flowing by posting early. Any guidance or advice you may have would be greatly appreciated.

Share this post


Link to post
Share on other sites
You don't want to do that. Loops have to be called at a consitent time interval otherwise rate and derivative will be all over the place. 80 loops in CLX is no hill for a stepper. Use the PIDE form in function block. Build one, assign it's tag, then copy paste to a new FB, and change the tagname in the tag editor. PM me your email address and lol send you a working, albeit much smaller version, of a program set up as noted above. It's really simple and reuseable

Share this post


Link to post
Share on other sites
Sounds interesting Michael. PM coming. I'm aware of the need for regular interval updates of PID controls, so just for my own misdirected curiosity's sake, could one not simply trigger the JSRs in sequence using a timer or is changing the PID's tag (equivalent to PD data table address in PLC5) a roadblock? Sorry if I don't respond further for a few days. I'm taking an extended weekend off to recharge. I'll be back at 'er on Monday.

Share this post


Link to post
Share on other sites
As they are all identical but there will be some sort of control in front of the PID's. Why not use an Add On Instruction? Then set the routine up as a Periodic event. Use a counter to incrementally step through the valves 1 - 80 and then repeat. I find the use of AOI's for identical code saves scan time and memory. Just my two cents. Edited by Guided_monkey

Share this post


Link to post
Share on other sites
If you do have to write the 80 loops let me encourage you to write a simple Ladder program and export / save it as an l5k. you can then open the l5k in excel and using vba write a macro which does your increment of addresses and tag names. Makes it really easy to write 'cookie cutter" code. I did a warehouse job in a former life where we had 6 building block routines and each on was used at least 60 times. Excel wrote all the code other than the initial 6 routines in a little under 12 hours of macro churning on an old 486 pc.

Share this post


Link to post
Share on other sites
Hey fellas, Thanks very much for the replies. Sorry for my late reply. I was off Friday and swamped Monday. I got some new info. Won't be 80 loops. More like 40. Plus we may start the system with the valves either open of closed. They spec'd analog valves in case we see the need later. Bob, I like the idea of exporting then replicating. I gave that a shot, although not with Excel, and seemed to work. Thanks again. Tell me more about the AOI. I've never created one. Anyone have a link to a good explanation or how-to?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0