Instruction 32- subtraction with carry – Maple Systems MAPware-7000 User Manual

Page 67

Advertising
background image

59

MAPware-7000 Ladder Logic Guide

1010-1041 rev. 00

Instruction 32- Subtraction with carry

Expression:

Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail

Function:

When the input is ON, the data of B and the carry flag (CF = S976) are subtracted from A, and
the result is stored in C. If a borrow occurs in the operation, the carry flag is set to ON. If the
result is greater than 32767 or smaller than -32768, the output is turned ON.

This instruction is used to perform unsigned subtraction or double-length subtraction.

Execution Condition:

Input

Operation

Output

ERF

OFF

No execution

OFF

---

Normal

No Borrow

OFF

Reset

ON

Execution

Borrow Occurred

OFF

Set

Overflow/

No Borrow

ON

Reset

Underflow Borrow Occurred

ON

Set

Operand:

Coil or Bit

Register

Constant

Index

Name

X

Y B

S

T.

C.

M

X
W

Y
W

B
W

S
W

T C

D

I

J

K

M
W

A

Minuend

√ √

B

Subtrahend

√ √

C

Difference

√ √

Example:

Advertising