General Statements - Omron SYSMAC C200H-ASC02 Operation Manual

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

Advertisement

BASIC Language
4-2-3

General Statements

CLEAR Statement
COM Statement
32
Format:
VERIFY
Remarks:
If the contents of the program area are identical to those of the EEPROM, the
message "READY" will be displayed; otherwise, the message "PROM ER-
ROR" is displayed.
Purpose:
To initialize numeric and character variables and set the size of
the character memory area
Example:
CLEAR [<size>]
<size> is the size of memory area used to process character
strings and is specified in byte units.
Remarks:
This command initializes numeric variables to zero and character strings to
empty. It also clears all user functions defined by the DEF FN statement.
This statement must be executed before the ON ERROR GOTO statement.
<size> is automatically set to 200 bytes upon power application or after reset.
Purpose:
To enable, disable, or stop an interrupt defined by the ON COM
GOSUB statement.
Format:
COM[<port number>] ON/OFF/STOP
<port number> is an integer (1 or 2).
Example:
COM1 ON
Remarks:
The COM ON statement enables an interrupt defined by the ON COM GO-
SUB statement.
After this statement has been executed, an interrupt will be generated each
time data is written to the specified port buffer. The interrupt will cause pro-
gram execution to branch to a routine defined by the associated ON COM
GOSUB statement.
The COM OFF statement disables the com port interrupts. Even if data is
written to a com port buffer, branching will not take place.
The COM STOP statement stops the com port interrupts from branching pro-
gram execution. However, if the COM ON statement is subsequently ex-
ecuted, branching to the specified interrupt service routine based on the
"STOPPED" interrupt will then take place.
If no port number is specified, port 1 is selected as the default port.
Execute the COM OFF statement at the end of the program.
The COM ON/OFF/STOP statement can be executed only after the ON COM
GOSUB statement has been executed.
Program Example:
10
OPEN #2, "COMU:"
20
ON COM2 GOSUB 100
30
COM2 ON
Section 4-2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents