Need example using RSLogix Sequencer Instruction SQO


Thread Starter

A. D. Hudgens

I need some help with a routine in ladder diagram for RSLogix 5000 (Logix500 will be OK). I'm trying to set up a two dimension array to be sequenced by time or manual step switch. It will mimic a drum controller allowing 23 outputs to be controlled by data in the array. The array will be a matrix with one dimension representing the 23 outputs and the other dimension
representing the 10 steps. The steps need to be triggered by both time or manual switch advancing the timer to allow the next step to advance
prematurely. The outputs are discrete output addresses. The time for each step is different ranging from 5 minutes to 4 hours 50 minutes. If someone would give (sale) me an example I can fill in the details. A-B has not provided examples with the sequencer instruction and I don't have the experience to understand SQI, SQO, SQL without examples, and I'm not sure how to apply the timer.

A. D. Hudgens
[email protected]
I recommend that you approach this problem from a program read-ability approach. Consider that the person most likely to troubleshoot the machine will be a maintenance technician. Unless you like getting 3:00 am phone calls, make it as easy to understand as possible, even if it means more rungs of ladder logic. (I learned this lesson the hard way.) I would not use the SQL and SQI instructions, and only use the SQO instruction, but give it an empty input file equal in length to the number of steps (dont forget step 0) and don't bother with using the output word, you still have to assign an address though. Here how it works: Program the SQO output on a rung with a number of branches equal to the number of sequence steps, in this case 11 branches (10 plus step 0). Branch around the SQO output with a reset instruction addressed to the SQO's .EN bit. You need to reset the sequencer enable bit each time the sequencer steps for this to work. On each input branch, place a compare instruction to compare the value of the sequencer position to the step number, so the top branch compares position to 0, the next branch to 1, and so on down. Then after each compare instruction on the branch put in the necessary logic to advance the instruction to the next step, in this case you timer done bits. Now build a set of rungs to turn on each of the step timers, simple a sereis of rungs, each with one compare instruction, step no to sequencer position, and a timer output for that steps time. Now build another set of rungs again with compare instructions for the sequencer position to a specific step number and output instructions to turn on the specific outputs desired. Design this part from the output address first, so that if an output is on in multiple steps is it covered. If you want to skip the sequencer instruction altogether and use a counter instead you can do it that way, but I wouldnt recommend it as the sequencer has the simplicity of automatically rolling back around to the beginning after the last sequence. This method seems a bit long winded, but it is far more readable and a maintenance tech can easily see which step the machine is stuck on and which bit is holding it up wihout having to sift through bit tables to find out why the SQI isn't advancing the SQO. This also gives you the advantage of easily jumping forward or backward any number of steps by simply modifiying the sequencer position word directly to handle special circumstances. If you have any questions, you can email me at [email protected], just leave out The NO SPAM part from the address.
You can program a rto or ton timer, conditioned by inputs needed to run.
Then next rung a have timer done bit and manual input parallel on the first two branches then have 2 sqo's parallel branched the first sqo to sequence the bits for outputs then next sqo to sequence intergers to the timer preset word to set the preset of timer for next sequence then add another output branch to reset the timer. You may need a rung to reset the control element for the sqo's then move a constant of 0 or other value to the output word to turn off all the bits then move a constant value to timer preset for the first time value to the timer preset word. You may need to add another sqo on another branch since you have 23 outputs rather than 16 then mask the sequencer to cover just the needed bits.
I hope this all makes some sense