
3: I
NSTRUCTIONS
R
EFERENCE
3-10
FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
User Program Execution Errors
When an advanced instruction is executed, a user program execution error occurs when any of the following conditions are met.
• the result of the adavnced instruction is invalid
• source or destination device that is indirectly specified in the advanced instruction exceeds the valid device range
• the advanced instruction does not operate correctly
For example, the data in the source device does not comply with the normal floating-point format when the data type is Float (F).
For details about device ranges, see "Devices" on page 2-1.
When a user program execution error occurs, special internal relay M8004 turns on and the corresponding error code is stored in
special data register D8006. For details about the error codes, see "User Program Execution Error" on page A-12.
When a user program execution error occurs, instructions operate as follows:
• When the source data is invalid, the execution of the advanced instruction is canceled and the data in the destination device is not changed.
• When the execution result is invalid, a value is stored in the destination device.
For details on stored values, see the descriptions of relevant instructions.
• If a user program execution error occurred during a repeat operation, the operation is canceled and the next repeat operation is executed.
M8004 is retained even when no further user program execution errors occur during subsequent repeat operations.
Example: User program execution error during a repeat operation
When the source data does not comply with the normal floating-point format.
When the second repeat operation is executed, special internal relay M8004 turns on because the source data is not a normal
number in floating-point format.
The second repeat operation is canceled and the third repeat operation is executed.
Carry and Borrow
When the result of an operation exceeds the valid device range, a carry (CY) or borrow (BW) occurs.
Carrying and borrowing occur in the following conditions according to the data type:
When a carry or borrow occurs, special internal relay M8003 (carry and borrow) turns on.
For example, when D0 has a value of FFFF (hex) and +1 is added using an INC instruction, the result is 10000 (hex), but when the
data type is Word (W), 0000 (hex) is stored in D0 and 1 is stored in M8003.
(D0, D1)
3.14
(D2, D3)
(D4, D5)
1.414
(D100, D101)
(D102, D103)
(D104, D105)
3.14
1.414
MOV(F)
S1(R)
D1(R)
REP
D0
D100
3
Not a normal
number
Not executed
M8004=ON
Previous value is
retained
Data Type
Status
Word
Exceeds range between 0 and 65,535
Integer
Exceeds range between -32,768 and 32,767
Double Word
Exceeds range between 0 and 4,294,967,295
Long
Exceeds range between -2,147,483,648 and 2,147,483,647
Float
If an overflow or underflow occurs
For details on overflow and underflow, see "Carry and Borrow in Floating-Point Data Processing" on
page 3-8.
Содержание MICROSmart FC6A Series
Страница 1: ...B 1726 7 FC6A SERIES Ladder Programming Manual ...
Страница 8: ...Preface 7 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 32: ...1 OPERATION BASICS 1 20 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 96: ...3 INSTRUCTIONS REFERENCE 3 18 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 130: ...4 BASIC INSTRUCTIONS 4 34 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 158: ...6 DATA COMPARISON INSTRUCTIONS 6 10 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 192: ...9 SHIFT ROTATE INSTRUCTIONS 9 12 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 216: ...10 DATA CONVERSION INSTRUCTIONS 10 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 248: ...11 WEEK PROGRAMMER INSTRUCTIONS 11 32 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 272: ...12 DISPLAY INSTRUCTIONS 12 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 284: ...14 REFRESH INSTRUCTIONS 14 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 288: ...15 INTERRUPT CONTROL INSTRUCTIONS 15 4 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 294: ...16 COORDINATE CONVERSION INSTRUCTIONS 16 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 374: ...18 PULSE OUTPUT INSTRUCTIONS 18 78 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 Setting ...
Страница 450: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 502: ...25 DATA LOG INSTRUCTIONS 25 22 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 546: ...26 SCRIPT 26 44 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 574: ...27 FLOW CALCULATION INSTRUCTIONS 27 28 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 583: ...FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 28 9 28 USER DEFINED MACRO INSTRUCTION ...
Страница 584: ...28 USER DEFINED MACRO INSTRUCTION 28 10 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 598: ...APPENDIX A 14 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...