5 extended subtract (subx (- -)), 5 extended subtract (subx ( − −)), 1 ) operation – Yaskawa MP900 Series Ladder Programming Manual User Manual
Page 99: 2 ) format

5.3 Numeric Operation Instructions
5.3.5 Extended Subtract (SUBX (
− −))
5-30
5.3.5 Extended Subtract (SUBX (
− −))
( 1 ) Operation
Input data B is subtracted from input data A and the result is stored in the output data.
Overflows are not treated as operation errors. Operation continues from the maximum value in the negative direction.
Underflows are not treated as operation errors. Operation continues from the maximum value in the positive direction.
Output Data Behavior
In the example shown above, the output data is integer data. With double-length integers, subtracting 1 from -
2,147,483,647 (80000000 hex) results in 2,147,483,647(7FFFFFFF hex).
Unlike operations for the ADD, SUB, or EXPRESSION instructions, overflows and underflows do not occur.
( 2 ) Format
∗ C and # registers cannot be used.
Input data A
Output data
Input data B
Extended Subtract
− −
0
-1
32,767
-32,768
-1
Output data
32,767 (7FFF hex)
-32,768 (8000 hex)
Input data B
Output data
Input data A
Icon:
Key entry: − −
Parameter Name
Applicable Data Types
B
W
L
F
A
Index
Constant
Input data A (SrcA)
×
{
{
×
×
{
{
Input data B (SrcB)
×
{
{
×
×
{
{
Output data (Dest)
×
{
*
{
*
×
×
{
×