![background image](http://html1.mh-extra.com/html/omron/c500-asc04/c500-asc04_operation-manual_743033145.webp)
Appendix G
BASIC Commands, Statements, and Functions
138
Item
Page
Function
Statement
Command
Description
VAL
Converts a character string into a numeric value
Char
VERIFY
Verifies the program and the EEPROM contents
Comm
VARPTR
Returns the memory address where the variable is
stored
Spec
WAIT
Sets a delay before the next command is executed
Gen
•
MID$ Function is located on page 57
List of Program Examples
Programs in Two-word Mode
Example
No.
Description
Page
1
To write data from the PC using the WRIT(87) to the ASCII Unit using the PC READ statement.
2
To write data from the ASCII Unit using the PC WRITE statement to the PC using the READ(88).
3
To enter characters from the keyboard and write them to the PC using the PC WRITE statement
and WRIT(87).
4
The PC uses interrupt number 3 to direct the ASCII Unit to read five words of data from the
specified DM addresses.
5
To read and print PC data at specific times using the ASCII Unit PC READ statement and
WRIT(87)
6
To accept input from the keyboard and write it to the PC using the PC WRITE statement and
READ(88)
7
To display the state of PC bit 1000 on a display device connected to port 2
8
To retrieve and print several types of data from the PC using the PC GET statement and WRIT(87)
9
To use PC interrupts to direct execution of the ASCII Unit
10
To print PC data and the time of data transfer
11
To input data from a bar code reader using the PC WRITE statement
12
To transfer data from the PC to the ASCII Unit with the ASCII Unit maintaining control
13
To transfer data from the ASCII Unit to the PC with the ASCII Unit maintaining control
14
To transfer data from the PC to the ASCII Unit with the PC maintaining control
15
To transfer data from the ASCII Unit to the PC with the PC maintaining control
16
To process data with the ASCII Unit
17
To transfer data input through the ASCII Unit keyboard to the PC and then back to the ASCII Unit
after computations have been performed by the PC
18
To initiate data transfer with the START switch using the WAIT statement
19
To direct processing using different interrupts
Programs in Four-word Mode
Example
No.
Description
Page
1
To print data at fixed time intervals using the LPRINT statement
2
To direct execution of the ASCII Unit from the PC using the PC GET statement
3
To control execution of the PC from the ASCII Unit using the PC PUT statement
4
To print out production data every hour from DM000.
5
To accept input from the keyboard and write it to the PC using the PC WRITE statement
6
To read data from an input file through a communication port
7
To transfer multi-word data from the ASCII Unit to the PC in four-word mode by using the PC
WRITE statement continuously
8
To transfer multi-word data from the PC to the ASCII Unit in four-word mode by using the PC
READ statement continuously
Summary of Contents for C500-ASC04
Page 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Page 5: ...iv ...
Page 7: ...vi ...