5 extended subtraction instruction (subx) – Yaskawa Ladder Works Programming Manual User Manual

Page 26

Advertising
background image

2.5 EXTENDED SUBTRACTION Instruction (SUBX)

2-9

2.5 EXTENDED SUBTRACTION Instruction (SUBX)

[Outline]

The SUBX instruction subtracts integer values. No operation error occurs, even if the operation
results in an underflow.

[Format]

Symbol : SUBX
Full Name : Expanded Subtract
Category : MATH

Icon :

[Parameter]

Parameter Name

Setting

Source A

· Any integer type and double-length integer type register
· Any integer type and double-length integer type register with subscript
· Subscript register
· Constant

Source B

· Any integer type and double-length integer type register
· Any integer type and double-length integer type register with subscript
· Subscript register
· Constant

Dest

· Any integer type and double-length integer type register (except for # and

C registers)

· Any integer type and double-length integer type register with subscript

(except for # and C registers)

· Subscript register

[Program Example]

This instruction is used in cases where it is desirable that operation errors do not occur in the
subtraction of integer type values.

Notes: In the case of double-length integer type values, an operation using addition and

subtraction instructions (+, –, ++, --) will be a 32-bit operation. However, when an
addition or subtraction instruction is used in a remainder correction operation (where a
multiplication instruction (×) is the immediately preceding instruction and a division
instruction (÷) is the immediately subsequent instruction), the operation will be a 64-bit
operation.


Advertising