Download 1746-6.5, High-Speed Counter Module User Manual

Transcript
Application Examples
6–29
User Program
Shown below is the user program for the Cut to Length example.
Rung 2:0
| 1’st pass
Initialize
|
|
High-Speed
|
|
Counter
|
|
S:1
+COP–––––––––––––––+ |
|––––] [––––––––––––––––––––––––––––––––––––––––––––––––––+COPY FILE
+–|
|
15
|Source
#N10:0| |
|
|Dest
#M0:1.0| |
|
|Length
42| |
|
+––––––––––––––––––+ |
Rung 2:1
| Machine Enable
HSC SEQ
|
| (enables/disables Function Control bit)
Enable
|
|
B3
M0:1.1 |
|––––] [–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––( )–––––|
|
0
12
|
Rung 2:2
| Input bits 14 and 15 determine the state of the module. When bit 15 is clear,|
| and bit 14 is set, the module is in run mode. This means that the configura– |
| tion information (above) has been applied to the module.
|
|
|
| Machine
Start
|
| Enable
Motor
|
|
B3
I:1.0 I:1.0
O:1.0
|
|––––] [––––––]/[–––] [––––––––––––––––––––––––––––––––––––––––––––––––( )–––––|
|
0
15
14
0
|
Rung 2:3
| Soft
Production
|
| Output Bit
Count
|
| seven (7)
|
|
I:1.4
+CTU–––––––––––––––+
|
|––––] [–––––––––––––––––––––––––––––––––––––––––––––+COUNT UP
+–(CU)–|
|
15
|Counter
C5:1+–(DN) |
|
|Preset
10000|
|
|
|Accum
0|
|
|
+––––––––––––––––––+
|
Rung 2:4
| Cascade
Each Count
|
| Counter
Equals
|
| Bit
10,000 Pcs
|
|
|
|
C5:1
+CTU–––––––––––––––+
|
|––––] [––––––––––––––––––––––––––––––+––––––––––––+COUNT UP
+–(CU)–+–|
|
DN
|
|Counter
C5:2+–(DN) | |
|
|
|Preset
32767|
| |
|
|
|Accum
0|
| |
|
|
+––––––––––––––––––+
| |
|
|
| |
|
| Soft Bit 7
| |
|
|
| |
|
|
I:1.4
C5:1
| |
|
+––––]/[––––––(RES)––––––––––––––––––––+ |
|
15
|
Rung 2:5
|
|
|–––––––––––––––––––––––––––––––––––––+END+––––––––––––––––––––––––––––––––––––|
|
|
Publication 1746-6.5 – February 1996