EasyManua.ls Logo

Xinje XD5 - Page 84

Xinje XD5
389 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
Loading...
83
If the result of a calculations is “0”, the “0’ flag acts. If the result exceeds 323,767(16 bits
operation) or 2,147,483,648 (32 bits operation), the carry flag acts. (refer to the next page). If
the result exceeds -323,768 (16 bits operation) or -2,147,483,648 (32 bits operation), the
borrow flag acts (Refer to the next page).
When carry on 32 bits operation, low 16 bits of 32-bit register are assigned, the register
address close to the low 16 bits register will be assigned to high 16 bits of 32-bit register.
Even number is recommended for the low 16 bits register address.
The source and object can be same register address.
In the above example, when X0 is ON, the addition operation will be excuted in each
scanning period.
Flag
Name
Function
SM20
Zero
ON: the calculate result is zero
OFF: the calculate result is not zero
SM21
Borrow
ON: the calculate result is over 32767(16bits) or
2147483647(32bits)
OFF: the calculate result is not over 32767(16bits) or
2147483647(32bits)
SM22
Carry
ON: the calculate result is over 32767(16bits) or
2147483647(32bits)
OFF: the calculate result is not over 32767(16bits) or
2147483647(32bits)
The assignment of the data
The data register of XD, XL series PLC is a single word (16 bit) data register, single word
data only occupy one register which is used to single word instruction. The process range is
decimal 327,68~327,67, or hex 0000~FFFF.
Instruction D(NUM) Object
Double words (32 bit) occupy two data registers; the two registers’ address is continuous. The
process range is: decimal -214,748,364,8~214,748,364,7 or hex 00000000~FFFFFFFF.
Object ObjectInstruction
D(NUM)
The way to represent 32 bits instruction
Add letter “D” before 16 bits instruction to represent 32 bits instruction.
For example:
ADD D0 D2 D4 16 bits instruction
DADD D10 D12 D14 32 bits instruction
Related flag
Notes
D(NUM)
Single word object instruction
D(NUM+1)
D(NUM)
Double word object instruction

Table of Contents

Related product manuals