I/O Refresh -- Iorf; Bit Counter -- Bcnt - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

7-26-2 I/O REFRESH - - IORF(97)
Limitations
Description
!
Caution
Flags
Flags
7-26-3 BIT COUNTER - - BCNT(67)
Limitations
Description
Ladder Symbol
IORF(97)
St
E
Note This instruction is not supported by SRM1(-V2) PCs.
St must be less than or equal to E.
To refresh I/O words, specify the first (St) and last (E) I/O words to be refreshed.
When the execution condition for IORF(97) is ON, all words between St and E
will be refreshed. This will be in addition to the normal I/O refresh performed dur-
ing the CPU Unit's cycle.
(If St>E, IORF(97) will be treated as NOP(00).)
Normally, I/O refreshing is performed just once each cycle at the end of program
execution, but IORF(97) can be used to refresh I/O words immediately during
program execution.
Although IORF(97) can be used in interrupt subroutines, you must be careful of
the interval between IORF(97) executions. If IORF(97) is executed to frequently,
a fatal system error may occur (FALS 9F), stopping operation. The interval be-
tween executions of IORF(97) should be at least 1.3 ms + total execution time of
the interrupt subroutine.
ER:
St or E is not within the allowed range (IR 000 to IR 019).
St is greater than E. (If St>E, IORF(97) will be treated as NOP(00).)
There are no flags affected by this instruction.
Ladder Symbols
BCNT(67)
N
SB
R
Note BCNT(67) is an expansion instruction in the CPM2A/CPM2C and SRM1(-V2).
The function code 67 is the factory setting and can be changed for if desired.
N cannot be 0.
DM 6144 to DM 6655 cannot be used for R.
When the execution condition is OFF, BCNT(67) is not executed. When the
execution condition is ON, BCNT(67) counts the total number of bits that are ON
in all words between SB and SB+(N--1) and places the result in R.
Operand Data Areas
@BCNT(67)
N
SB
R
Section
St: Starting word
IR 000 to IR 019
E: End word
IR 000 to IR 019
Operand Data Areas
N: Number of words (BCD)
IR, SR, AR, DM, HR, TC, LR, #
SB: Source beginning word
IR, SR, AR, DM, HR, TC, LR
R: Destination word
IR, SR, AR, DM, HR, TC, LR
7-26

Advertisement

Table of Contents
loading

This manual is also suitable for:

Srm-v2Cpm1aCpm2aSrm1Cpm2c

Table of Contents