8: A
DVANCED
I
NSTRUCTIONS
« FC4A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
»
8-5
Structure of an Advanced Instruction
Input Condition for Advanced Instructions
Almost all advanced instructions must be preceded by a contact, except NOP (no operation), LABEL (label), LRET (label
return), and STPA (stop access) instructions. The input condition can be programmed using a bit operand such as input,
output, internal relay, or shift register. Timer and counter can also be used as an input condition to turn on the contact when
the timer times out or the counter counts out.
While the input condition is on, the advanced instruction is
executed in each scan. To execute the advanced instruction
only at the rising or falling edge of the input, use the SOTU
or SOTD instruction.
While the input condition is off, the advanced instruction is not executed and operand statuses are held.
Source and Destination Operands
The source and destination operands specify 16-bit data. When a bit operand such as input, output, internal relay, or shift
register is designated as a source or destination operand, 16 points starting with the designated number are processed as
source or destination data. When a word operand such as timer or counter is designated as a source operand, the current
value is read as source data. When a timer or counter is designated as a destination operand, the result of the advanced
instruction is set to the preset value for the timer or counter. When a data register is designated as a source or destination
operand, the data is read from or written to the designated data register.
Using Timer or Counter as Source Operand
Since all timer instructions—TML (1-sec timer), TIM (100-ms timer), TMH (10-ms timer), and TMS (1-ms timer)—
subtract from the preset value, the current value is decremented from the preset value and indicates the remaining time. As
described above, when a timer is designated as a source operand of an advanced instruction, the current value, or the
remaining time, of the timer is read as source data. Adding counters CNT start counting at 0, and the current value is incre-
mented up to the preset value. Reversible counters CDP and CUD start counting at the preset value and the current value is
incremented or decremented from the preset value. When any counter is designated as a source operand of an advanced
instruction, the current value is read as source data.
Using Timer or Counter as Destination Operand
As described above, when a timer or counter is designated as a destination operand of an advanced instruction, the result
of the advanced instruction is set to the preset value of the timer or counter. Timer and counter preset values can be 0
through 65535.
When a timer or counter preset value is designated using a data register, the timer or counter cannot be designated as a des-
tination of an advanced instruction. When executing such an advanced instruction, a user program execution error will
result. For details of user program execution error, see page 29-6.
Note:
When a user program execution error occurs, the result is not set to the destination.
Repeat Designation
Specifies whether repeat is used for the operand or not.
Repeat Cycles
Specifies the quantity of repeat cycles: 1 through 99.
I0
S1 R
*****
REP
**
D1 R
*****
Opcode
The opcode is a symbol to identify the advanced instruction.
Data Type
Specifies the word (W) or integer (I) data type.
Source Operand
The source operand specifies the 16-bit data to be processed
by the advanced instruction. Some advanced instructions
require two source operands.
Destination Operand
The destination operand specifies the 16-bit data to store the
result of the advanced instruction. Some advanced instruc-
tions require two destination operands.
Opcode
Source Operand
Repeat Cycles
Destination Operand
Repeat
MOV(W)
Data Type
Designation
I0
REP
S1 –
D10
D1 –
D20
SOTU
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 ...