Professional Documents
Culture Documents
Hari 2 Materi 2
Hari 2 Materi 2
COUNTER UP
AND DOWN
IN MicroLogix 1000
Outline
1. Memory in Micrologix
1000
2. Inputs and Outputs
2. Counter in Micrologix
1000 and Its
Application Program
3. Example and Case
Memory In Micrologix 1000
• MEMORY
– Bit = 1or 0
– Byte = 8 bits
– Word(16 bits) 2 bytes
– Double Word= 2 words
• 32 bits
– Long Word=2 Double words
• 64 bits
O0:0/0
0
Outputs
File contains 11 5 0
File Number
6 or 12 Outputs Word 0 000000000000
File Type
File #1 Input Number
(0-9,19)
1
Inputs I1:0/0 15 9 0
File Number Word 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
File contains
Word 1 0000
10 or 20 Inputs
19 16
Counters
• Counter Operation
– The counter counts (by one) every time its rung goes from FALSE
to TRUE. When a specified number of counts has been reached,
the counter alerts the rest of the program by setting a bit. The
program must reset the counter to start counting from zero again.
I:0.0
||
0
Counter Application
Counter Application Cont.
Counter Application Cont.
Counters
• File #5
– 32 Counters (MicroLogix 1000 only)
– Up, Down, Up/Down
File Type
Counter Number
(0-31)
C5:0
5
Counters
File Type
Counter Number
(0-31)
5
Counters
C5:0 15 14 13 12 11
Word 0 CU CD DN OV UN
File contains File Number Word 1 Preset Value
32 counters Word 2 Accumulated Value
Done C5:0/DN Set to “1” when accumulated value > preset value.
Count Up C5:0/CU Set to “1” when state of CTU rung are true.
Count Down C5:0/CD Set to “1” when state of CTD rung are true.
Over/Underflow C5:0/OV,UN Set to “1” when counter counts past 32,767 or -32,768.
Counter Up (CTU) and Down (CTD)
The CTU instruction counts upward
Symbol
Symbol
Reset
Symbol
Sensor_In Full_Indicator
I1:0/0 O0:0/0
Sensor_Out Reset_switch
I1:0/1 I1:0/2
Parkir Garage Counter
TERIMA KASIH
Case
Integer Files
6
Control File
5
Counter File
4
Timer File
3
Bit File
2
Status File
1
Input File
0
Output File
FILES
DATA
511 496
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word 31: 0000 0000 0000 0000