5-83
5 Understanding Programming
CJ2 CPU Unit Software User’s Manual
5-6 Instructions
5
5-6-4 I/O Refresh Timing
z Instructions with Refresh Variation (!)
Add an exclamation mark (!) in front of the instruction to specify immediate refreshing.
• I/O will be refreshed as shown below when an instruction is executing if an real I/O bit is specified as
an operand.
• When a word operand is specified for an instruction, I/O will be refreshed for the 16 bits that are spec-
ified.
• Inputs will be refreshed for input or source operand just before an instruction is executed.
• Outputs will be refreshed for outputs or destination (D) operands just after an instruction is execute.
z IORF(097): I/O REFRESH
IORF(097) can be used to refresh all data during a cycle for actual I/O in Basic I/O Units and data in
CIO Area words allocated to Special I/O Units.
When a high-speed response is needed from a calculation that uses input data from a Basic I/O Unit
or outputs data to a Basic I/O Unit, use IORF(097) just before and just after the calculation instruc-
tion.
Precautions for Correct UsePrecautions for Correct Use
IORF(097) has a relatively long instruction execution time and that execution time increases pro-
portionally with the number of words being refreshed, so it can significantly increase the cycle
time. Be careful not to let the cycle time become too long.
Units Refreshed data
Basic I/O Units I/O will be refreshed for the 16 bits containing the bit.
LD 1.01
OUT 2.09
END
MOV 3 4
END
1CH
15 0
2CH
15 0
3CH
15 0
4CH
15 0
S
D
Input
Output
All real I/O data
Immediate refresh
16-bit units
I/O refresh
Cyclic refresh
(batch processing)
Top
Top
Immediate refresh
16-bit units
IORF
D1
D2
IORF
10
16
D1: Start word
D2: End word
The data in all words from D1 through D2 are
refreshed when IORF(097) is executed.
The 7 words from CIO 10 through CIO 16 are
refreshed when IORF(097) is executed.
Example: