SC Series Controllers
Embedded PLC
Instructions
Description
Count Down
Enable Bit CU (Bit 14)
Count Up
Counts false-to-true rung transitions.
When rung conditions for a CTU instruction have made a false-to-true transition, the
accumulated value is incremented by one count, provided that the rung containing the CTU
instruction is evaluated between these transitions.
The accumulated value is retained when the rung conditions again become false. The
accumulated count is retained until cleared by a reset (RES) instruction that has the same
address as the counter reset.
The count value must remain in the range of -32768 to 32767. If the count value goes above
32767 the overflow (OV) bit is set. If the count value goes below -32768, the counter status
underflow (UN) bit is set. A counter can be reset to zero using the reset (RES) instruction.
Count Up Overflow Bit OV (Bit
12)
CTU
Done Bit DN (Bit 13)
Count Up Enable Bit CU (Bit
15)
DIV
Divide
Use the DIV instruction to divide one value (source A) by another (source B). The rounded
quotient is then placed in the destination. If the remainder is 0.5 or greater, round up occurs
in the destination. The unrounded quotient is stored in the most significant word of the math
register. The remainder is placed in the least significant word of the math register.
END
Program End
Marks the end of the program.
EOR
End of Rung
Marks the end of a rung.
EQU
Equal
Use the EQU instruction to test whether two values are equal. If source A and source B are
equal, the instruction is logically true. If these values are not equal, the instruction is logically
false.
GEQ
Greater than or Equal
Use the GEQ instruction to test whether one value (source A) is greater than or equal to
another (source B). If the value at source A is greater than or equal to the value at source B,
the instruction is logically true. If the value at source A is less than the value at source B, the
instruction is logically false.
GRT
Greater Than
Use the GRT instruction to test whether one value (source A) is greater than another (source
B). If the value at source A is greater than the value at source B, the instruction is logically
true. If the value at source A is less than or equal to the value at source B, the instruction is
logically false.
106 / 1032
rung conditions are true
This Bit
Accumulated value wraps
around to -32,768 from
+32,767
Accumulated value is equal to
or greater than the present
value
Rung conditions are true
Rung conditions go false or a
RES instruction having the
same address as the CTD
instruction is enabled
Is Set When
And Remains Set Until One
A RES instruction having the
same address as the CTU
instruction is executed OR the
count is decremented less
than or equal to +32,767 with
a CTD instruction
The accumulated value
becomes less than the
present value
Rung conditions go false or a
RES instruction having the
same address as the CTU
instruction is enabled
of the Following