![background image](http://html1.mh-extra.com/html/omron/sysmac-c200h-asc02/sysmac-c200h-asc02_operation-manual_742429055.webp)
45
10
ON PC 1 GOSUB 100
20
PC ON
30
PC GET A, B
40
IF B=1 THEN PC PUT 0
50
GO TO 30
60
END
100
PC PUT 1
110
Interrupt processing
120
RETURN
B = Bit 10008.
If B = 1 then 10308 is turned OFF.
10308 is turned ON.
Remarks:
An interrupt is invoked at the ASCII Unit from the PC program, avoiding the
time at which the ASCII busy flag is ON. When the WRITE flag turns ON, the
ON PC GOSUB statement is executed by the ASCII Unit. The ASCII Unit
notifies the PC that interrupt processing has been executed by turning ON bit
10308. The PC acknowledges this notification by turning ON 10008. When
10008 is turned ON, the ASCII Unit turns OFF bit 10308.
PC GET Statement
Purpose:
To read output data from the PC
Format:
PC GET <var 1>[,<var 2>]
Example:
PC GET I,J
Remarks:
Bits 0 through 7 of Data Section word (n) are read and assigned to <var 1>.
Bits 8 through 15 of Data Section word (n) are read and assigned to <var 2>.
The ASCII Unit converts the hexadecimal data into decimal data (0 through
255) before assigning it to the specified variables.
PC ... ON/OFF/STOP Statement
Purpose:
To enable, disable, or stop a PC interrupt defined with an ON PC
GOSUB statement
Format:
PC [<num>] ON/OFF/STOP
<num> is a specific interrupt number.
Remarks:
The PC ON statement enables an interrupt defined by the ON PC GOSUB
statement.
After this statement has been executed, each PC interrupt will cause pro-
gram execution to branch to a routine defined by the associated ON PC GO-
SUB statement.
The PC STOP statement disables PC interrupts from branching program ex-
ecution. However, if the PC ON statement is subsequently executed, execu-
tion will branch to the specified interrupt service routine based on the
“STOPPED” interrupt.
Execute the PC OFF statement at the end of the program.
The PC ON/OFF/STOP statement can be executed only after the ON PC
GOSUB statement has been executed.
If there is more than one interrupt routine in the program the specific interrupt
number should be specified. If there are two or more routines and the inter-
rupt number is not specified, the routine closest to the end of the program or
BASIC Language
Section 4-2
Содержание SYSMAC C200H-ASC02
Страница 1: ...Cat No W165 E1 04 ASCII Unit SYSMAC C200H ASC02 ...
Страница 2: ...C200H ASC02 ASCII Unit Operation Manual Revised September 2002 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 7: ...TABLE OF CONTENTS viii Glossary 159 Index 163 Revision History 165 ...
Страница 122: ...Appendix B Specifications 115 130 35 100 5 ...
Страница 167: ...Cat No W165 E1 04 Note Specifications subject to change without notice Printed in Japan Authorized Distributor ...
Страница 168: ...Cat No W165 E1 04 C200H ASC02 ASCII Unit OPERATION MANUAL ...