9 CREATING A HARDWARE LOGIC
9.2 Multi Function Counter Block
147
9
Input
The following table shows the inputs of the counter timer block.
*1 When a buffer memory address is assigned to "User Address", control can be performed with a program without link. Assign the same
buffer memory address to the "RUN" terminal and the "STOP" terminal. (bit 0: RUN, bit 1: STOP)
*2 When the addition mode is on, the addition value is added or subtracted.
*3 Event detection is performed for every clock cycle setting of the counter timer block. Thus, while a High-state signal is input to an event
input terminal, an event occurs per clock setting.
*4 The latch event detection block and the Latch terminals of the counter timer blocks are automatically linked in the following
combinations, and the links cannot be deleted.
⋅ "Output 0" terminal (latch event detection block) and "Latch" terminal ("Counter_Timer_0")
⋅ "Output 1" terminal (latch event detection block) and "Latch" terminal ("Counter_Timer_1")
*5 On the rising edge (Low state → High state) of the event input terminal, the count value is latched.
*6 Do not link these terminals when an SSI encoder block is linked with a multi function counter block in the hardware logic outline window.
Otherwise, correct encoder values may not be acquired.
Variable name Data type Linkable block Valid range Description
RUN
*1*6
Bit • Event input
• Input signal event
detection
0, 1 Adds 1 to the count value per preset clock cycle.
*2
Multiple signals can be input to the terminal. OR
processing is executed for all input signals.
STOP
*1*6
Bit • Event input
• Input signal event
detection
0, 1 Stops the counter.
Multiple signals can be input to the terminal. OR
processing is executed for all input signals.
UP
*3*6
Bit • Event input
• Input signal event
detection
0, 1 Adds an addition value to the count value when a
signal generated in the previous block is input to the
terminal. When the addition mode is off, 1 is added to
the count value.
*2
Multiple signals can be input to the terminal. OR
processing is executed for all input signals.
DOWN
*3*6
Bit • Event input
• Input signal event
detection
0, 1 Subtracts an addition value from the count value when
a signal generated in the previous block is input to the
terminal. When the addition mode is off, 1 is subtracted
from the count value.
*2
Multiple signals can be input to the terminal. OR
processing is executed for all input signals.
PRESET
*1*3
Bit • Event input
• Input signal event
detection
0, 1 Presets the count value.
Multiple signals can be input to the terminal. OR
processing is executed for all input signals.
Latch
*4
Bit • Latch event detection
• Event input
*5
0, 1 Latches the count value to a register.
User Address Word 1000 to 1099 Assign a buffer memory address to change the
terminal status with a program during operation.
Changing the value of the buffer memory area whose
address is assigned changes the set value in the
hardware logic.
b15
0
b14
0
b13
0
b12
0
b11
0
b10
0
b9
0
b8
0
b7
0
b6
0
b5
0
b4
0
b3
0
b2
0
b1
STOP
b0
RUN