Omron SYSMAC C200H-ASC02 Operation Manual page 57

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

Advertisement

BASIC Language
PC WRITE Statement
POKE Statement
PRINT/LPRINT Statement
Refer to Appendix D Formatting and Data Conversion for details on READ
and WRITE statement formatting.
Example:
A$ = "2H1, A3, I4, O2"
PC READ A$;X, Y, A$, I, J
Purpose:
To write data to the PC
Format:
PC WRITE "<format>[,<format> ...]";<exp1>
[,<exp2>, ...]
Note
For parameter definitions, refer to Appendix C.
Examples:
PC WRITE "H4, A2, I3, O4"; 1234, "AB", K, L
Remarks:
If the data of the previous PC WRITE statement has not been read by the
PC, the next PC WRITE statement cannot be executed until the previous one
is completed.
The maximum number of data items that can be transferred with one WRITE
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 WRITE instruction, a FORMAT ERROR will occur.
If the value of <exp> is not an integer, the INT function is internally executed
to round it off.
Single-precision and double-precision numeric expressions are internally
converted into integer expressions.
The PC WRITE statement's formatting parameters can be assigned to a
single character variable and that variable may then be used in the PC
WRITE statement.
Example:
A$="H4, A2, I3, O4"
PC WRITE A$; 1234, "AB", K, L
Purpose:
To write one byte to a specified memory address
Format:
POKE <address>,<data>
<address> is the memory location where data will be POKEd.
<data> is an integer from 0 to 255.
Example:
POKE &H2000,&H39
Remarks:
The address must be a 2-byte integer ranging from 0 to 65535 (&HFFFF). Do
not write data to addresses &H0000 to &H2000, and &H8000 to &HFFFF;
they are reserved for system use.
Purpose:
To output data and text to the screen or printer
Format:
PRINT [#<port>,] [<list of exp>][;]
Section 4-2
47

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents