GSK218M CNC System Connection and PLC Manual
60
5.26 SUB(binary subtraction)
Function:
This instruction executes the subtraction operation in the binary format of 1 or 2 bytes. In the
operation result register, operation data is set besides the numberical data representing the
operation. A required number of bytes is necessary to store the subtrahend, and the result.
Format:
Control conditions:
Reset (RST):
RST=0: Release reset.
RST=1: Reset. W=0.
Activation instruction (ACT):
ACT=0 : Do not execute SUB. W does not change.
ACT=1 : Execute SUB.
Parameter:
Length :Specifies data length(1 or 2 bytes) and the format for the subtrahend(constant or
address).
S1 : Address containing the minend.
S2 : Specification determines the Length.
S3 : Specifies the address to contain the result of operation.
SUB
Length
Format
specification
S1
Menuend
address
S2
Subtrahend
address or
constant
S3
Operation
output
address
O O
Data length specification
1:1byte length data
2:2 bytes length data
Format
specification
0:Constant
1:Address
RST
ACT
(W)