Chapter Programmable Logic Controllers Lab 14 Output Sequencer
Chapter Programmable Logic Controllers Lab 14 Output Sequencer
Chapter Programmable Logic Controllers Lab 14 -1 Output Sequence Instruction: SQO
Output Sequencer - SQO Before programming an output sequencer, the outputs addresses must be known. CYLINDER 1 CYLINDER 2 LS 1 LS 2 LS 4 LS 3 Sol 2 Sol 1 O: 3/1 EX Air O: 3/2 Extend Ex O: 3/3 Retract
Output Sequencer - SQO Memory Location for Solenoids Sol 3 Sol 2 Sol 1 O: 3/1 EX Air O: 3/2 Extend Ex O: 3/3 Retract
Output Sequencer - SQO Start by making a rung to pulse the output sequencer. Select SQO on the File Shift/Sequencer tab
Output Sequencer - SQO Start by making a rung to pulse the output sequencer. Place a pushbutton to pulse the SQO. Each time the button is pressed, data is transferred from the N 7 file to the O: 3. 0 word in the output file.
Output Sequencer - SQO Type in the SQO information File: Can be either the B file or N file. This is where the data is stored to send to the output module. Patters of “ones” and “zeros”
Output Sequencer - SQO Type in the SQO information Mask: Load FFFF in hex to allow all 16 bits to work. An F in hex = 1111 in binary, therefore FFFF = 1111
Output Sequencer - SQO Type in the SQO information Destination: The output data will be sent to O: 3. 0 word. Example N 7: 3 = 0000 0010 sent to O: 3. 0 and will energize solenoid 1 since it is wired to O: 3/1
Output Sequencer - SQO Type in the SQO information Control: This fill keeps tract of the length and position. This is similar to a counter’s preset and accumulated values. Range is R 6: 0 to R 6: 255. Do not use an address more than once in a program.
Output Sequencer - SQO Type in the SQO information Length: Set for the number of steps in the program. It can be changed any time without affecting the data. Can be accessed by other instructions as R 6: 0. Len
Output Sequencer - SQO Type in the SQO information Position: Identifies what step the program is on. Can be accessed by other instructions as R 6: 0. pos
Output Sequencer - SQO Step 2: Load the data file N 7: 0 1. Click on the N 7 File. 2. When the N 7 window comes up, it will only show word N 7: 0. Click on the properties box and expand to 8 or 10 words. 3. Also click on the radix box and change to binary to see the bits for the solenoids.
Output Sequencer - SQO Step 2: Load the data file N 7: 0 It should now look like this.
Output Sequencer - SQO Data is transferred from each word of the N 7 file to the O: 3. 0 word in the output file. The data is loaded into the N 7 file for each move or event. There is no data in the N 7 file as shown. Step 3 of the program (N 7: 3) is being transferred to the O: 3. 0 word as shown.
Output Sequencer - SQO The data for the program is loaded as shown. To load the data, go to each bit and type in a I or 0. Defaults are all zeros, so just type in the ones 0 1 2 3 4 5 6 7 No move (Home) Cylinder 1 Extends Cylinder 2 Extends Cylinder 1 Retracts Cylinder 2 Retracts Cylinder 1 & 2 Extends Cylinder 2 Retracts Cylinder 1 Retracts Important Note: Single solenoid valve must be held on for each step of the sequence that the piston is to be extended. Notice N 7: 2 and N 7: 6 words.
Output Sequencer - SQO Now the sequencer is ready to go. Each time the pulse button is pressed , data from the N 7 file is transferred one word at a time to the output file word O: 3. 0. Solenoids are then energized. They stay energized until the next pulse.
Output Sequencer - SQO A timer can be added to pulse the sequencer in addition to the pulse button. A start/stop rung is added to turn on and off the sequencer. To pulse the sequencer with the button, press the stop button first.
Output Sequencer - SQO Up till now, the sequencer must run from start to finish then runs again with out the ability to stop it at the end of the sequence. By adding the control bit R 6: 0. DN, the sequence can be stopped at the end. A switch in parallel allows the selection for single cycle or continuous cycle.
Output Sequencer - SQO If the sequencer is stopped in mid sequence, it can be restarted from that position or it can be reset by adding the reset rung shown. The RES instruction resets the SQO to step 0, while the MOV instruction causes each solenoid to retract to the starting position. Solenoids 3 2 1 Weight 8 4 2 1
Output Sequencer - SQO Complete Program 0000 T=Start/Stop rung done bit & switch 0001 Timer to step SQO 0002 SQO with Timer bit and step button 0003 Reset Rung
Output Sequencer - SQO Do lab 14 -1 before proceeding. When the SQO program works properly, save the program. Lab 14 -2 will add on the SQC input instruction to the program in Lab 14 -1.
Chapter Programmable Logic Controllers Lab 14 -2 Input Sequence Instruction SQC
Input/Output Sequencers – SQC/SQO Lab 14 -1 Used only an output sequencer (SQO) and a timer to make it a time driven sequence with a manual step button. Lab 14 -2 will add an input sequencer (SQC) to make the sequence event driven by examining the limit switches. It is necessary to make the SQO sequence first before proceeding to the SQC for event driven.
Input/Output Sequencers – SQC/SQO It is necessary to program the output sequencer (SQO) first before proceeding to the SQC for an event driven sequence Since the SQO/SQC program will be an event driven program, the timer rung should be removed
Input/Output Sequencers – SQC/SQO Now a input sequencer SQC can be added as the second rung as shown. The input sequencer is called “Sequencer Compare” since it compares the data table to the input module where the limit switches are wired.
Input/Output Sequencers – SQC/SQO Type in the data for the SQC. File: Can be either the B file or N file. This is where the data is stored to send to the output module. Patters of “ones” and “zeros” Since the SQO started at N 7: 0, The SQC must be lower in the data table. It could start at N 7: 100 which is far away in the data table not to overlap, however N 7: 10 will work since the SQO data is only 8 words using N 7: 0 to N 7: 8
Input/Output Sequencers – SQC/SQO Type in the data for the SQC. Mask: Load 00 FF in hex to allow all 8 bits to work. Only four are needed (limit switches) are used. An F in hex = 1111 in binary, therefore 00 FF = 0000 1111
Input/Output Sequencers – SQC/SQO Type in the data for the SQC. Source: The output data will be read from the I: 2. 0 word corresponding to the 4 limit switch wired to I: 2/1, I: 2/2 , I: 2/3, I: 2/4
Input/Output Sequencers – SQC/SQO Type in the data for the SQC. Control: This fill keeps tract of the length and position. This is similar to a counter’s preset and accumulated values. Range is R 6: 0 to R 6: 255. Do not use an address more than once in a program. Since R 6: 0 was used for the SQO, use R 6: 1 for the SQC.
Input/Output Sequencers – SQC/SQO Type in the data for the SQC. Length: Set for the number of steps in the program. It can be changed any time without affecting the data. Can be accessed by other instructions as R 6: 1. Len
Input/Output Sequencers – SQC/SQO Type in the data for the SQC. Position: Identifies what step the program is on. Can be accessed by other instructions as R 6: 1. pos
Input/Output Sequencers – SQC/SQO Add the Find Status Bit: R 6: 1. FD. The find bit is a short pulse that occurs when the data in the N 7 data word file is equal to the data in the source word file. The pulse increments both the SQC and the SQO to the next step. Notice the N. O and N. C. find bits.
Input/Output Sequencers – SQC/SQO Next the data can be typed into the SQC data file N 7: 10. The limit switch settings are determined for each step of the program and a one is placed into the data word representing a limit switch that is closed for a particular step. LS 4 LS 3 LS 2 LS 1
Input/Output Sequencers – SQC/SQO To load the N 7 data table, open the N 7 file. Expand the data by clicking on the properties tab and expand to 30 or more. Then change to show binary by clicking on the radix tab.
Input/Output Sequencers – SQC/SQO The data can now be typed into the N 7 file. The SQC data starts at the first step while the SQO starts at second step using step 0 as home. The SQC is always one step above the SQO data. The theory is that when the SQC finds a match to the input data, the find pulse increments the SQO to make a step. That is check data first then make a move. Since both LS 1 and LS 4 are being held closed at the home position with both pistons retracted, a “ 1” is placed in the date table as shown.
Input/Output Sequencers – SQC/SQO Data can be loaded based for the same sequence as in Lab 14 -1. Using the table, below, type in the rest of the data into the N 7 File. Notice data word 10 is step 0, data word 11 is step 1, etc CYLINDER 1 CYLINDER 2 LS 1 LS 4 LS 3 Ex E X SQO Outputs (Solenoids) 0 1 2 3 4 5 6 7 Sol 3 Sol 2 Sol 1 Air LS 2 No move (Home) Cylinder 1 Extended Cylinder 1 & 2 Extended Cylinder 1 Retracted Cylinder 2 Retracted Cylinder 1 & 2 Extended Cylinder 2 Retracted Cylinder 1 Retracted SQC Inputs (Limit Switches) so now now LS 1 and LS 3 closed LS 2 and LS 4 closed LS 2 and LS 3 closed LS 1 and LS 3 closed (back home)
Input/Output Sequencers – SQC/SQO Add a reset for the SQC. The SQC will be reset back to step “ 0” ready to rung again.
Input/Output Sequencers – SQC/SQO Troubleshooting: If the program runs part way and stops, most likely, the data in the SQC is incorrect. The data in the SQO was confirmed correct in lab 14 -1 an need not be changed.
Chapter Programmable Logic Controllers The End Lab 14 Sequence Instructions
- Slides: 40