Data Types For Advanced Instructions; Discontinuity Of Operand Areas - IDEC FC4A-C10R2 User Manual

Fc4a series microsmart micro programmable logic controller
Table of Contents

Advertisement

8: A
I
DVANCED
NSTRUCTIONS

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.
Data Type
Word (Unsigned 16 bits)
Integer (Signed 15 bits)
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:
Data Type
Result of Addition
Word
Integer

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.
MOV(W)
S1 –
M1270
M8125
DIV(W)
S1 –
D100
I0
Advanced instructions execute operation only on the available operands in the valid area. If a user program syntax error is
found during programming,
MOV(W)
S1 –
M8125
8-6
Symbol
W
I
Hexadecimal Storage
0
65535
131071
65534
32768
32767
0
–1
–32767
–32768
–32769
–65535
D1 –
REP
D0
S2 –
D1 –
REP
D200
D1299
rejects the program instruction and shows an error message.
WindLDR
D1 R
REP
D0
Q290
2
« FC4A M
Quantity of Data
Bits
Registers Used
16 bits
1
16 bits
1
Result of Subtraction
0000
FFFF
(CY) FFFF
(CY) 7FFE
(CY) 0000
7FFF
0000
FFFF
8001
8000
(CY) FFFF
(CY) 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.
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.
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.
S
U
'
M
ICRO
MART
SER
S
ANUAL
Range of Decimal Values
0 to 65,535
–32,768 to 32,767
Hexadecimal Storage
65535
0
–1
–65535
–65536
65534
32768
32767
0
–1
–32767
–32768
–32769
–65535
»
FFFF
0000
(BW) FFFF
(BW) 0001
(BW) 0000
(BW) 7FFE
(BW) 0000
7FFF
0000
FFFF
8001
8000
(BW) FFFF
(BW) 8001

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents