EasyManuals Logo

Xinje XDH Series User Manual

Xinje XDH Series
456 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #121 background imageLoading...
Page #121 background image
120
The source and target address can be the same. In the above example, when X0 is ON, the
instruction will be executed in every scanning period.
<Two operands>
ADD D10 D12
X0
S1·
Two source data do binary addition and send the result to addend data address. Each data’s
highest bit is the sign bit, 0 stands for positive, 1 stands for negative. All calculations are
algebraic processed. (5+ (-8) =-3)
If the result of a calculation is “0”, the “0” flag acts. If the result exceeds 323767 (16 bits
operation) or 2147483647 (32 bits operation) or 9223372036854775807(64 bits operation),
the carry flag acts (refer to the Related flag). If the result exceeds –323768(16 bits
operation)or -2147483648 (32 bits operation) or -9223372036854775808(64 bits
operation),the borrow flag acts (refer to the Related flag).
When doing 32/64 bits operation, the lower 16-bit side of the word soft component is
specified, and the next numbered soft component will be used as the high position. To avoid
ID repetition, we recommend you assign devices ID to be even number.
Note:The addresses of operands in QADD instructions must be even.
In the above example, when X0 is ON, the instruction will be executed in every scanning
period. The rising or falling pulse edge is recommended to activate the instruction.
ADD D10 D12 D10
X0
S1· S2·
ADD D10 D12
X0
S1·
The two instructions are the same.
Flag meaning
Flag
Name
Function
SM020
Zero
ON: the calculate result is zero
OFF: the calculate result is not zero
SM021
Borrow
ON: the calculate result is over -32768(16 bits) or -2147483648(32
bits) or -9,223,372,036,854,775,808(64 bits), borrowing flag bit
action.
OFF: the calculate result is less than -32768(16 bits) or -
2147483648(32 bits) or -9,223,372,036,854,775,808 (64 bits)
SM022
Carry
ON: the calculate result is over 32768(16 bits) or 2147483648(32
bits) or 9,223,372,036,854,775,807(64 bits), carrying flag bit action.
OFF: the calculate result is less than 32768(16 bits) or
2147483648(32 bits) or 9,223,372,036,854,775,807(64 bits)
Related flag
(D10) (D12) (D10)
tudonghoatoancau.com

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Xinje XDH Series and is the answer not in the manual?

Xinje XDH Series Specifications

General IconGeneral
BrandXinje
ModelXDH Series
CategoryNetwork Hardware
LanguageEnglish

Related product manuals