Device Control 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-4

Device Control Statements

CLOSE Statement
<wait time> is the allowable time for the monitored statement to
be executed.
<line number> is any valid line number.
Example:
WAIT "10:30.5",100
Remarks:
The delay time is set in the form MM.SS.F, where:
MM is the number of minutes up to 59
SS is the number of seconds
F is tenths of seconds.
The statement immediately following the WAIT statement is the monitored
statement. If execution of this statement is not completed within the set wait
time, program execution will branch to <line number>.
Interrupts invoked by the ON COM, ON KEY, ON PC, or ON ERROR state-
ments will not be recognized until after the WAIT statement or the monitored
statement has been processed.
The WAIT statement can monitor the following statements:
INPUT, INPUT$, LINE INPUT, PC READ, PC WRITE, PRINT, LPRINT,
PRINT USING, LPRINT USING
If a statement other than one of those listed above is specified to be moni-
tored by a WAIT statement, and if execution of that statement is not com-
pleted within the set time of the WAIT statement, an error will occur.
Program Example:
10
WAIT "10.0", 100
20
PC READ "3I4"; A, B, C,
30
PRINT A, B, C
40
END
100
PRINT "PC ERR"
110
GOTO 40
Program Remarks:
This example will display the message "PC ERR" if the PC READ statement
is not executed within 10 seconds.
This section describes statements that control hardware and communica-
tions.
Purpose:
To close a port
Format:
CLOSE [#<port>]
<port> is an integer (1 or 2).
Remarks:
If the port number is omitted, both ports will be closed.
Once the port has been closed, it cannot be used for data transfer until it is
opened again.
Be sure to execute the CLOSE statement to correctly end the output pro-
cess. CLOSE dumps any data remaining in the buffer from output operations.
It does not dump data from input operations.
Section 4-2
51

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents