Sequencer Output Instuctions for Allen-Bradley SLC 500 PLC's
Sequencer Output (SQO)


[Command Table] [Main Course Page] [Group Index]



The SQO instruction transfers 16-data to word addresses to control outputs for sequential machine operations.

The symbol for the sequencer output command is illustrated above. The SQO command AB button for SQO command is placed on the right side of the rung as an output. When the rung transfers from false-to-true the instruction is incremented to the next step in the sequencer file. Data from the sequencer file is then transferred through a mask and into the destination address specified in the command. The data is updated during each scan that the rung remains true. When the last word in the sequencer file is transferred the done bit is set. On the next transition from false-to-true for the rung the instruction is reset to step one.

At startup, when the processor is switched from program mode to the run mode to the run mode the operation depends on the rung being true or false on the initial scan.


The mask bits must be set in order to change the value in the destination word. The bits mask data when reset and pass data when set. The mask can be fixed or variable. If a element address or a file address for changing the mask is entered for each step it is a variable mask.

Instruction Parameters

Several parameters must be set when programming this instruction. A definition and explanation is of each is given below.



FILE

The file is the address of the sequencer file. The file indicator(#) for the address must be used.

MASK

The mack is a hexidecimal code or the address of the mask word or file through which the instruction moves data. Maks bits can be set to pass data and reset to mask data. If you want to change the mask according to application requirements you can use a mask word or file. (If the mask is a file, its length will be equal to the length of the sequencer file.)

DESTINATION

The destination is the address of the input word or file for a SQO to which the instruction moves data from its sequencer file.

CONTROL

The control parameter is control structure to do the following: store the status byte of the instruction, length of the sequencer file, and the instantanous position in the file. The control address can not be used for any other instruction.

Error Bit ER(11)
This bit is set when the processor detects a negative position value, or a negative or zero length value. This results in a major error if not cleared before the END or TND instruction is executed.

Done Bit DN(bit 13)
The done bit is set by SQO instruction after it has operated on the last word in the sequencer file. It is reset on the next false-to-true rung transition after the rung goes false.


Enable EN(bit 15)
The enable bit is set by a false-to-true rung transition and indicates the SQO instruction is enabled.


LENGTH

The length is the number of steps of the sequencer file starting at position 1. The maximum number of words is 255 ( in MicroLogix 1000 controllers the max. is 104 words. The zero position is the startup position. At the end of each cycle the instruction resets to position 1. (A run time major error will occur if the length value points past the end of the programmed file.)

POSITION

The position is the word location or step the sequencer file from/to which the instruction moves data. (A run time major error occurs if the postion value points past the end of the programmed file.)


Programming Problem


The example of a traffic light controlling a four way intersection is used below to demonstrate how the sequencer output command is used in a program. Shown below is the ladder logic used for the control and how the SQO command is setup.



In this example the control of the traffic light will be done using the SQO command. The Sequencer files will have the four states that the traffic light will go through. TON timers will be used to initiate the stepping of the sequencer file. The two timers will be set for 10 seconds and 3 seconds. Once the light goes through an entire cycle the process will be reset and the SQO command will start back at step 1.


The sequencer files were then set for the four steps of the light cycle as shown above. The first sequencer file contains the outputs for the red light on the north south street and green light on the east west street. The second file has the outputs set the north south street to red and the east west to yellow. The third file sets the northsouth street to green and the east west to red. And the fourth file sets the north south street to yellow and the east west street to red.


Shown above is the mask in the Binary file B10:5. This will allow the proper data to pass and block the unnecessary data.


The output diagram above shows an example of what would be happening in step one of the sequencer output command when true. The sequencer transfers the file B10:1 to the output register O:2.0. The red light for the North South direction is connected to O:2/0 and the green light for the East West direction is connected to O:2/6.



[Command Table] [Main Course Page] [Group Index]