5 Basic Instruction
5.5 Operating Counters
75
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied
Instructions
8
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
Function and operation explanation
1. OUT_C operation
1) When the operation result up to the OUT_C turns ON from OFF, the counter counts up the current value
(count value) by +1. When the counter completes counting (the current value reaches the set value), the
contact becomes as follows.
2) The counter does not count if the operation result remains ON. (The count input does not need to be in
the form of pulse.)
2. Counter reset
After completing to count, the count value and contact condition does not change until the RST is executed.
3. Counter set value
The set value of the counter can be specified directly by a decimal number (K) or indirectly using a data
register (D) or extension register (R).
Indirect setting by the extension register (R) is applicable only to the FX
3U and FX3UC PLCs.
No negative numbers (-32768 to -1) can be set.
If set to "0", the same process as 1 takes place.
4. When using counter device
When a counter device is specified in a program, use the following depending on the locations of use.
• Used as contacts: CS
• Used as a coil: CC
• Used as a current value: CN
Cautions
1) When handling 32-bit data in a structured program, a 16-bit device cannot be specified directly as in the
case of a simple project. Use a label to handle 32-bit data.
A 32-bit counter can be specified directly as it is a 32-bit long device.
Use a global label to specify a device.
2) Some restrictions to applicable devices
S1: Applicable only to the FX
3U, FX3UC and FX3G PLCs.
S2: Only the FX
3U and FX3UC PLCs can index the target device.
A 32-bit counter cannot be indexed.
NO (normally open) contact Conductive
NC (normally closed) contac Nonconductive