Omron SYSMAC C200H-ASC02 Operation Manual page 54

Ascii unit
Hide thumbs Also See for SYSMAC C200H-ASC02:
Table of Contents

Advertisement

BASIC Language
Execution
10001
10308
44
If zero is specified as the branch line number, it is assumed that the KEY
OFF statement has been executed.
If the interrupt number is omitted, the same branch destination is assumed
for all interrupt numbers, 1 through 15.
The ON PC GOSUB statement is enabled with the PC ON statement and
disabled with the PC OFF statement.
Program Example:
10
ON PC 1 GOSUB 100
20
ON PC 2 GOSUB 200
30
PC ON
100
PC READ "H4,I2";I, J
110
PRINT I, J
120
RETURN
200
INPUT A
220
PC WRITE "14"; A
230
RETURN
Program Remarks:
When interrupt 1 is invoked, program execution branches to statement 100,
reads two words of data from the PC, and displays them on the CRT.
When interrupt 2 is invoked, program execution branches to statement 200
and writes data entered through the keyboard to the PC.
Programming Interrupts:
Interrupting from the PC is prohibited while the ASCII busy flag is ON, and so
in this case the ON PC GOSUB statement will not be executed. For this rea-
son, interrupting will not be possible during the execution of PC READ and
other statements that turn ON the ASCII busy flag. When programming using
statements for which the ASCII busy flag turns ON during execution (e.g., PC
READ) and the ON PC GOSUB statement, design the program so that no
interrupts are invoked while the ASCII busy flag is ON. It is also recom-
mended that for programs where interrupts are activated by turning ON the
WRITE flag, correct operation is confirmed before actual use.
Ladder Program at the PC (Unit Number = #0)
10300
10308
BASIC Program (at the ASCII Unit)
@MOV (21)
#0010
Interrupt input
100
10001
10008
Confirmation of
interrupt execution
Section 4-2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents