|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 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.
Several parameters must be set when programming this instruction. A definition and explanation is of each is given below.
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.