Pico LAB2 Timers and Counters 1 What we

Pico LAB#2 Timers and Counters 1

What we are going to do: • We are going to take your program from Lab #1, modify two rungs, and create some new program logic. • We are also going to program a Timer, and Counter. We will then use these in our program to see how they can be used to provide unique control capabilities. 2

Steps for Today’s Assignments 1. Modify your existing program 2. Add a timer and a counter to your program 3. Monitor and test your program 3

Modify existing Ladder Logic 1. Modify Program – – – From the “Status Display” screen. Press “OK” to display next screen. Press “Down” arrow once to highlight “STOP” Select “STOP” by pressing the “Ok” key when “STOP” is flashing. The PICO is now in the Stop mode. Press “UP” arrow to select “PROGRAM. . . ” Press “Ok” to accept To enter the ladder Select “PROGRAM” by pressing the “Ok” key when “PROGRAM” is flashing. I 12345678 TH 12: 00 Q 1234 RUN PROGRAM… PROGRAM STOP RUN DELETE PROG PARAMETER SET CLOCK… 4

Modify existing Ladder Logic Delete rung 1: I 1 -------[Q 1 I 2 --I 3 -------[Q 2 -Q 2 I 1 -------[Q 1 Q 1 --Q 2 -------[Q 3 I 2 --I 3 -------[Q 2 2. Delete rung 1 – – – -Q 2 - Press “Right” arrow 3 times to highlight “Q 1” Press “Del” to remove “Q 1” Press “Left” arrow 3 times to highlight “I 1” Press “Del” twice to remove input “I 1” and rung 1. Rung 2 will move up to and replace rung 1 Q 1 --Q 2 -------[Q 3 8 I 2 --I 3 -------[Q 2 I 1 -------[Q 1 I 2 --I 3 -------[Q 2 -Q 2 Q 1 --Q 2 -------[Q 3 -Q 2 - -Q 2 Q 1 --Q 2 -------[Q 3 5

Modify existing Ladder Logic Modify rung 1: I 2 --I 3 -------[M 1 -M 1 Q 1 --Q 2 -------[Q 3 I 2 --I 3 -------[M 1 -M 1 - 3. Modify rung 1 – – – – Press “Right” arrow 3 times to highlight “Q 2” Press “Ok” to select Press “Down” arrow to select “M” Press “Ok” to accept Press “Ok” to select/accept “M 1”. This will move to the next rung Press “Right” arrow to move to and highlight “Q 2” in the branch Press “Ok” to select Press “Down” arrow to select “M” Press “Ok” to accept Press “Ok” to select/accept “M 1”. Q 1 --Q 2 -------[Q 3 8 I 2 --I 3 -------[Q 2 -Q 2 Q 1 --Q 2 -------[Q 3 I 2 --I 3 -------[M 1 -M 1 Q 1 --Q 2 -------[Q 3 6

Modify existing Ladder Logic Modify rung 1: I 2 --I 3 --T 1 - [M 1 -M 1 Q 1 --Q 2 -------[Q 3 I 2 --I 3 --T 1 - [M 1 -M 1 - 4. Add Timer instruction – – – Q 1 --Q 2 -------[Q 3 Press “Up” arrow once this will move the cursor between “I 3” and “M 1” Press “Ok” to insert input Press “Up” arrow twice to select Timer relay contact “T 1” Press “Alt” to select break contact(examine if open) mode Press “Ok” twice to accept timer relay contact “T 1” 8 I 2 --I 3 -------[M 1 -M 1 Q 1 --Q 2 -------[Q 3 I 2 --I 3 --T 1 - [M 1 -M 1 Q 1 --Q 2 -------[Q 3 X S 00. 00 TRG T 1 RES + 7

Setting Timer Parameters – T 1 - Timer Relay number – – + - Parameter Display – – – – – S 00. 00 { TRG T 1 { RES + S - 00: 00 seconds M: S 00: 00 Minutes/seconds H: M 00: 00 Hours/minutes 99: 59 max TRG- Trigger – – X 00. 00 - Setpoint – – X - On-delay ? X -On-delay w/random time - Off-delay X - Off-delay w/random time - Single Pulse - Flashing S - Time base – – + - Access Enable - - Access Disable X - Switch function – – T 1 - T 8 { - connected RES- Reset – { - connected Note- At least two elements are needed in the circuit diagram for a timer relay. 1. Relay contact in the contact field 2. Trigger coil in the coil field. 8

Setting Timer Parameters X S 00. 00 TRG T 1 RES + X S 00. 00 5. Add Timer instruction – – Keep all the default values, except for the Setpoint. Press “Right” arrow three times to select the setpoint Press “Up” arrow to change the value from 0 to 1. This will change the setpoint to 10 seconds. Press “Ok” twice to exit the timer parameter display screen. TRG T 1 RES + 8 X X S 00. 00 S 10. 00 I 2 --I 3 --T 1 - [M 1 -M 1 - TRG T 1 RES + Q 1 --Q 2 -------[Q 3 9

Modify existing Ladder Logic Delete rung 2: I 2 --I 3 --T 1 - [M 1 -M 1 Q 1 --Q 2 -------[Q 3 I 2 --I 3 --T 1 - [M 1 -M 1 - 6. Delete rung 2 – – Press “Down” arrow twice to move to 2 nd rung, press “Del” to remove output “Q 3” Press “Left” arrow twice to highlight “Q 2” Press “Del” to remove input “Q 2” Press “Left” arrow once to highlight “Q 1” I 2 --I 3 --T 1 - [M 1 -M 1 Q 1 --Q 2 -------[Q 3 I 2 --I 3 --T 1 - [M 1 -M 1 Q 1 --Q 2 I 2 --I 3 --T 1 - [M 1 -M 1 Q 1 10

Creating the Ladder Logic Program new rung: I 2 --I 3 --T 1 - [M 1 -M 1 M 1 ------TT 1 I 2 --I 3 --T 1 - [M 1 -CC 1 -M 1 - 7. Add Input instruction – – – – 8. Add Timer Trigger – – M 1 ------TT 1 Press “Ok” to highlight “Q 1” Press “Down” arrow once to select “M” Press “Ok” to accept “ 1” Press “Ok” to accept “M 1” Press “Alt” to activate the draw function Press “Right” arrow twice to draw connection Press “Alt” to exit draw function Press “Ok” to select output Press “Up” arrow once to select “TT 1” timer trigger Press “Ok” to accept “TT” Press “Ok” to accept “ 1” this will also start the next rung -CC 1 8 I 2 --I 3 --T 1 - [M 1 -M 1 M 1 ------TT 1 11

Creating the Ladder Logic Program new rung: I 2 --I 3 --T 1 - [M 1 -M 1 M 1 ------TT 1 -CC 1 I 2 --I 3 --T 1 - [M 1 -M 1 - 9. Add Counter Trigger – – – – – Press “Right” arrow three times Press “Ok” to insert output Press “Up” arrow twice to select “CC 1” counter trigger Press “Ok” to accept “CC” Press “Ok” to accept “CC 1” Press “Left” arrow three times and “Up” arrow once to move to and highlight “CC 1” Press “Alt” to activate the draw function Press “Up” once to draw branch connection Press “Alt” to exit draw function Press “Left” arrow 3 times and “Down” 2 times to start new rung M 1 ------TT 1 -CC 1 8 I 2 --I 3 --T 1 - [M 1 -M 1 M 1 ------TT 1 I 2 --I 3 --T 1 - [M 1 -M 1 -----------TT 1 -CC 1 12

Counter Parameters – C 1 - Counter Relay number – – + - Parameter Display – – – 9999 max DIR - Direction Coil – – + - Access Enable - - Access Disable 0000 - Setpoint – – C 1 - C 8 DCx =0 : count up (default) DCx =1 : count down CNT- Counter coil RES- Reset { DIR { CNT C 1 { RES + 8 Note- At least two elements are needed in the circuit diagram for a counter relay. 1. Relay contact in the contact field 2. Trigger coil in the coil field. 13

Creating the Ladder Logic Program new rung: M 1 ------TT 1 -CC 1 M 1 -C 1 ----Q 1 0000 10. Add Counter – – – Press “Ok” to insert input Press “Down” twice to select input type “M” Press “Ok” to accept input “M 1” Press “Ok” to insert input Press “Up” 3 times to select input type “C” Press “Alt” to select break contact function. Press “Ok” to accept input “C 1” this will open the parameter screen for the Counter Press “Right” arrow 4 times to move cursor to the 1’s place in the counter preset Press “Up” arrow to display 5 counts Press “Ok” twice to accept parameters and close screen DIR CNT C 1 RES + 8 M 1 ------TT 1 -CC 1 M 1 -C 1 0000 0005 DIR CNT C 1 RES + 14

Creating the Ladder Logic Program new rung: M 1 ------TT 1 -CC 1 M 1 -C 1 -------[Q 1 M 1 ------TT 1 -CC 1 11. Add Output – – – M 1 -C 1 -------[Q 1 Press “Alt” to activate the draw rung function. Press “Right” arrow once. Press “Alt” to exit rung draw function Press “Ok” to insert output Press “Ok” to accept “Q” Press “Ok” accept “Q 1” and close rung and start new rung 8 M 1 -----------TT 1 M 1 ------TT 1 -CC 1 M 1 -C 1 -------[Q 1 15

Creating the Ladder Logic Program last rung: M 1 ------TT 1 -CC 1 M 1 -C 1 -------[Q 1 M 1 ------TT 1 I 6 ------RC 1 -CC 1 12. Reset Counter Rung – – – – Press “Ok” to insert input Press “Ok” to accept input “I” Press “Up” arrow to select “ 6” Press “Ok” to accept the input address of “I 6”. Press “Alt” to activate the draw rung function. Press “Right” cursor two times. Press “Ok” to insert output Press “Up” arrow to select “CC 1” Press “left” arrow to highlight the first “C” in “CC 1”. Press “Up” cursor to select “R” Press “Ok” to accept “C” Press “Ok” to accept “ 1” M 1 -C 1 -------[Q 1 I 6 ------RC 1 8 M 1 -----------TT 1 M 1 ------TT 1 -CC 1 M 1 -C 1 -------[Q 1 I 6 ------- I 6 ------RC 1 16

Monitor the program. 13. Change Mode – – – Press “Esc” to exit back to the 2 nd “MENU DISPLAY” screen Press “Esc” to exit back to the 1 st “MENU DISPLAY” screen Press “Down” cursor to Highlight “RUN” (flashing). Press “Ok” to accept the RUN mode. The PICO is now in the run mode Press “Esc” to exit back to the “Status Display. In this screen you can monitor the I/O. M 1 ------TT 1 -CC 1 M 1 -C 1 -------[Q 1 I 6 -------RC 1 14. Monitor the Ladder – Press “OK” twice to enter the ladder program PROGRAM DELETE PROG RUN I 12345678 TH 12: 00 PARAMETER SET CLOCK Q 1234 RUN 17

Monitor the Program PROGRAM OPERATION – – Rung 1 - Because the input simulators have latching pushbuttons. Press input pushbutton # I 3 (start button), so as not to latch the pushbutton, output Q 1 will latch ON and the timer will start timing and the counter will increment by one. When the counters accumulator is equal to the counter preset you must reset the counter with pushbutton 6 (I 6). Pressing pushbutton 2 (stop button) will turn OFF output Q 1 and will stop & reset the timer. When the timer accumulator is equal to the preset output Q 1 will turn off. RUNG 2 - M 1 is used to trigger the timer T 1 in rung 1 and the counter C 1 in rung 3. Rung 3 - M 1 will enable C 1 and Q 1 Rung 4 - Press pushbutton I 6 will reset the counter back to 0 and re-enable output #Q 1 and the timer. I 2 --I 3 --T 1 - [M 1 -M 1 M 1 ------TT 1 -CC 1 18
- Slides: 18