From the course: PLC Sequencer Logic

SQO operation example - Ladder Logic Tutorial

From the course: PLC Sequencer Logic

Start my 1-month free trial

SQO operation example

- [Instructor] Let's use an example to illustrate the operation of the sequencer output instruction. For the 16 points output module we can connect devices to each output port starting from output zero all the way to output 15. And according to the sequence we design we can group multiple outputs or devices together or activate outputs or devices separately or in different orders. For our example the sequence is as follows, for each step we energize four outputs. Step one, outputs zero, one, two, and three will be energized. Step two, outputs four, five, six, and seven. And step three, outputs eight, nine, 10, and 11 will be energized. So we have a total of three steps for the sequence process. And the number of the physical outputs used on the output module is 12 outputs out of the 16 outputs available. And now to program the sequencer instruction. Binary information, zeros or and ones are entered into the sequencer file for each step filling all the 16 bits for each step. We start with step zero, the start position. This is where all outputs are off so we place zeros for all 16 bits of the word. And for step one outputs zero, one, two, and three will be energized. So bits zero to three will be one for step one. And the rest is zero for all bits. Now when the instruction registers a false to true transition from the input instruction the sequencer will move to step one. And we usually refer to it as pointing to step one. Then the 16-bit word will be sent through a mask to pass or to block the data. The mask is usually chosen according to the bits needed to be passed or blocked. And after passing through the mask the 16 bit word output status is sent to the output module. So now the devices or lights that are connected to these outputs turn on. And the same thing happens when instruction registers a second false to true transition. Then it moves to step two where outputs four, five, six, and seven will be energized. And finally, for step three where outputs eighth, nine, 10, and 11 will be energized. This is what we call the truth table for the sequence process and the data are entered for each sequencer step according to the process sequence designed. Now when the position parameter reaches three the value in the length parameter, meaning that all words would have been moved, so the done bit in the control file in the instruction is set to one. After step three and when the next false to true transition happens the sequencer instruction will return to step one. The instruction resets or wraps to position one at each cycle completion. The sequencer will continuously repeat the cycle until no additional input signals are registered. And this is the purpose of a sequencer where the process repeats without the need to restart the whole thing again. If we want to reset the sequencer instruction to position zero we can use a reset instruction to reset the values of the control file using for example an external device like a pushbutton or using an internal bit like the controller done bit to reset the control file value R6 word zero. One note on choosing the mask bits pattern. For our example we didn't have anything connected to the last four outputs. So we can choose a mask to pass all data by placing one for all 16 bits. However, if we have a case where one of the last outputs is connected to a device, let's say a fan is connected to output 14, or a motor. Then our choice of the mask bits pattern needs to take into account the bit for output 14 by blocking any bit pattern that might affect the operation of the fan or the motor.

Contents