Omron CJ2 CPU UNIT SOFTWARE User Manual page 175

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

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.
Units
Basic I/O Units
• 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.
Top
LD 1.01
OUT 2.09
END
Top
MOV 3 4
END
I/O refresh
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.
IORF
D1
D2
Example:
IORF
10
16
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 Use
Precautions 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.
CJ2 CPU Unit Software User's Manual
I/O will be refreshed for the 16 bits containing the bit.
Immediate refresh
15
Input
1CH
15
Output
2CH
Immediate refresh
15
S
3CH
15
D
4CH
Cyclic refresh
(batch processing)
All real I/O data
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.
5 Understanding Programming
Refreshed data
0
16-bit units
0
0
16-bit units
0
5
5-83

Advertisement

Table of Contents
loading

Table of Contents