Download Print this page

Decrementing 32-Bit Binary Data - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Decrementing 32-bit binary data

DDEC(P)(_U)
These instructions subtract 1 from the device (32-bit binary data) specified by (d).
Ladder diagram
(d)
FBD/LD
EN
ENO
d
Setting data
■Descriptions, ranges, and data types
Operand
(d)
DDEC(P)
DDEC(P)_U
EN
ENO
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(d)
Processing details
• These instructions decrement contents of device (32-bit binary data) specified by (d) by 1.
(d)
(d)+1
b31
b16 b15
b0
···
···
73500 (BIN)
-1
• If DDEC(P) instruction is executed when contents of device specified by (d) is 0, -1 is stored in the device specified by (d).
(If signed is specified)
• If DDEC(P)_U instruction is executed when contents of device specified by (d) is 0, 4294967295 is stored in the device
specified by (d). (If unsigned is specified)
• Flags (zero, carry and borrow) are not activated at this time.
Precautions
Note that data is decremented in every operation cycle in a continuous operation type (DDEC) instruction.
Operation error
There is no operation error.
7 BASIC INSTRUCTIONS
248
7.2 Arithmetic Operation Instructions
Description
Head device to be decremented by 1
Execution condition
Execution result
Word
T, ST, C, D, W,
U\G
SD, SW, R
(d)
(d)+1
b31
b16 b15
b0
···
···
73499 (BIN)
Structured text
ENO:=DDEC(EN,d);
ENO:=DDECP(EN,d);
Range
-2147483648 to +2147483647
0 to 4294967295
Double word Indirect
specification
Z
LC
LZ
ENO:=DDEC_U(EN,d);
ENO:=DDECP_U(EN,d);
Data type
Data type (label)
32-bit signed binary
ANY32_S
32-bit unsigned binary
ANY32_U
Bit
BOOL
Bit
BOOL
Constant
K, H
E
$
Others

Hide quick links:

Advertisement

loading