Omron SYSMAC C200H-ASC02 Operation Manual page 56

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

Advertisement

BASIC Language
PC PUT Statement
PC READ Statement
46
at the highest line number will be executed regardless of which interrupt is
invoked.
Program Example:
10
ON PC GOSUB 100
20
PC ON
30
GOTO 30
100
PC READ "3I2"; A, B, C
110
PRINT A, B, C
120
RETURN
Purpose:
To write data to the PC's ASCII Unit Data Memory Area
Format:
PC PUT <num exp>
<num exp> is a valid numeric expression between 0 and 255.
Examples: PC PUT I
PC PUT 123
Remarks:
Data is written to bits 8 through 15 of word n+3, where n is the first of the four
PC Data Memory words assigned to each ASCII Unit.
If the value of the numeric expression is not an integer, the INT function is
internally executed to round it off. If the value of the numeric expression is
negative or greater than 255, zero is written to the PC.
Purpose:
To read data from the PC
Format:
PC READ "<format>[,<format>,<format>, ...]";
<var1>[,<var2>,]...
<format> specifies how the data will be read. For specific format
information, refer to Appendix D Formatting and Data Conver-
sion.
Examples:
PC READ "2H1, A3, I4, O2"; X, Y, A$, I, J
Remarks:
When the PC has written the data to the ASCII Unit, the PC READ statement
is executed.
If the PC has not written the data to the ASCII Unit, the ASCII Unit will wait
for the data, and the PC READ statement is not executed until the data com-
es.
If the number of data items output by the PC is greater than that specified by
the format parameters, the excess part of the output data will be ignored.
The maximum number of data items that can be transferred with one READ
statement specification is 255 in the S or A formats.
If an amount of memory greater than the actual memory area is specified by
the READ statement, a FORMAT ERROR will occur.
The PC READ statement's formatting parameters can be assigned to a
single character variable and that variable may then be used in the PC READ
statement.
Section 4-2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents