Omron SYSMAC C200HS Operation Manual page 263

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

Subroutines and Interrupt Control
5-22-5 EXCLUSIVE NOR – XNRW(37)
Description
Flags
5-23 Subroutines and Interrupt Control
5-23-1 Subroutines
Interrupts
Ladder Symbols
XNRW(37)
@XNRW(37)
I1
I2
R
When the execution condition is OFF, XNRW(37) is not executed. When the ex-
ecution condition is ON, XNRW(37) exclusively NOR's the contents of I1 and I2
bit-by-bit and places the result in R.
15
I1
1
0
15
I2
0
1
15
0
0
R
Indirectly addressed DM word is non-existent. (Content of :DM word is
ER:
not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the result is 0.
Subroutines break large control tasks into smaller ones and enable you to reuse
a given set of instructions. When the main program calls a subroutine, control is
transferred to the subroutine and the subroutine instructions are executed. The
instructions within a subroutine are written in the same way as main program
code. When all the subroutine instructions have been executed, control returns
to the main program to the point just after the point from which the subroutine
was entered (unless otherwise specified in the subroutine).
Subroutines may also be activated by interrupts or the MCRO(99) instruction.
Like subroutine calls, interrupts cause a break in the flow of the main program
execution such that the flow can be resumed from that point after completion of
the subroutine. An interrupt is caused either by an external source, such as an
input signal from an Interrupt Input Unit, or a scheduled interrupt. In the case of
the scheduled interrupt, the interrupt signal is repeated at regular intervals.
Whereas subroutine calls are controlled from within the main program, subrou-
tines activated by interrupts are triggered when the interrupt signal is received.
In the case of the scheduled interrupt, the time interval between interrupts is set
by the user and is unrelated to the cycle timing of the PC. This capability is useful
for periodic supervisory or executive program execution.
IR, SR, AR, DM, HR, TC, LR, #
I1
IR, SR, AR, DM, HR, TC, LR, #
I2
R
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
0
0
1
1
0
Section 5-23
Operand Data Areas
I1: Input 1
I2: Input 2
R: Result word
IR, SR, AR, DM, HR, LR
00
0
0
1
1
0
0
1
00
1
0
1
0
1
0
1
00
0
1
1
0
0
1
1
253

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents