8: A
DVANCED
I
NSTRUCTIONS
8-6
« FC4A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
»
Data Types for Advanced Instructions
When using the move, data comparison, and binary arithmetic instructions, data types can be selected from word (W) or
integer (I). For other advanced instructions, the data is processed in units of 16-bit word; except the coordinate conversion
instructions use the integer data type.
Decimal Values and Hexadecimal Storage
The following table shows hexadecimal equivalents which are stored in the CPU, as a result of addition and subtraction of
the decimal values shown:
Discontinuity of Operand Areas
Each operand area is discrete and does not continue, for example, from input to output or from output to internal relay. In
addition, special internal relays M8000 through M8157 are in a separate area from internal relays M0 through M1277.
Data registers D0 through D1299, expansion data registers D2000 through D7999, and special data registers D8000
through D8199 are in separate areas and do not continue with each other.
Advanced instructions execute operation only on the available operands in the valid area. If a user program syntax error is
found during programming,
WindLDR
rejects the program instruction and shows an error message.
Data Type
Symbol
Bits
Quantity of Data
Registers Used
Range of Decimal Values
Word (Unsigned 16 bits)
W
16 bits
1
0 to 65,535
Integer (Signed 15 bits)
I
16 bits
1
–32,768 to 32,767
Data Type
Result of Addition
Hexadecimal Storage
Result of Subtraction
Hexadecimal Storage
Word
0
65535
131071
0000
FFFF
(CY) FFFF
65535
0
–1
–65535
–65536
FFFF
0000
(BW) FFFF
(BW) 0001
(BW) 0000
Integer
65534
32768
32767
0
–1
–32767
–32768
–32769
–65535
(CY) 7FFE
(CY) 0000
7FFF
0000
FFFF
8001
8000
(CY) FFFF
(CY) 8001
65534
32768
32767
0
–1
–32767
–32768
–32769
–65535
(BW) 7FFE
(BW) 0000
7FFF
0000
FFFF
8001
8000
(BW) FFFF
(BW) 8001
The internal relay ends at M1277. Since the MOV (move) instruction
reads 16 internal relays, the last internal relay exceeds the valid range,
resulting in a user program syntax error.
M8125
REP
S1 –
M1270
D1 –
D0
MOV(W)
This program results in a user program syntax error. The destina-
tion of the DIV (division) instruction requires two data registers
D1299 and D1300. Since D1300 exceeds the valid range, a
user program syntax error occurs.
I0
REP
S1 –
D100
S2 –
D200
DIV(W)
D1 –
D1299
The MOV (move) instruction sets data of data register D0 to 16 outputs
Q290 through Q307 in the first repeat cycle. The destination of the sec-
ond cycle is the next 16 outputs Q310 through Q327, which are invalid,
resulting in a user program syntax error.
For details about repeat operations of each advanced instruction, see the
following chapters.
M8125
REP
2
S1 –
D0
D1 R
Q290
MOV(W)
Содержание FC4A-C10R2
Страница 1: ...FC4A SERIES Micro Programmable Logic Controller User s Manual FC9Y B812 ...
Страница 6: ...PREFACE 4 FC4A MICROSMART USER S MANUAL ...
Страница 94: ...2 MODULE SPECIFICATIONS 2 74 FC4A MICROSMART USER S MANUAL ...
Страница 184: ...6 ALLOCATION NUMBERS 6 20 FC4A MICROSMART USER S MANUAL ...
Страница 218: ...8 ADVANCED INSTRUCTIONS 8 8 FC4A MICROSMART USER S MANUAL ...
Страница 240: ...11 BINARY ARITHMETIC INSTRUCTIONS 11 8 FC4A MICROSMART USER S MANUAL ...
Страница 244: ...12 BOOLEAN COMPUTATION INSTRUCTIONS 12 4 FC4A MICROSMART USER S MANUAL ...
Страница 252: ...13 SHIFT ROTATE INSTRUCTIONS 13 8 FC4A MICROSMART USER S MANUAL ...
Страница 274: ...15 WEEK PROGRAMMER INSTRUCTIONS 15 8 FC4A MICROSMART USER S MANUAL ...
Страница 378: ...22 DUAL TEACHING TIMER INSTRUCTIONS 22 4 FC4A MICROSMART USER S MANUAL ...
Страница 386: ...23 INTELLIGENT MODULE ACCESS INSTRUCTIONS 23 8 FC4A MICROSMART USER S MANUAL ...
Страница 408: ...24 ANALOG I O CONTROL 24 22 FC4A MICROSMART USER S MANUAL ...
Страница 426: ...26 COMPUTER LINK COMMUNICATION 26 6 FC4A MICROSMART USER S MANUAL ...