
85
DM0000
DM0010
DM0011
DM0100
DM0101
DM0102
1
2
2
Lot size
Lot size
Lot size
Lot size
Lot size
Lot size
Example 10
Purpose:
To print PC data and the time of data transfer
PC Program
ASCII Unit Program
10 OPEN #2, “LPRT: (47)”
20 C READ “2I4 ” ; D1, D2
30 PRINT #2, “DATA1 = ” ; D1,
“DATA2 = ” ; D2, “TIME = ” ; TIME$
40 GOTO 20
Equals Flag
To next process
WRIT(87/191)
#0002
DM100
00
Start condition
Data 1
Data 2
DM100
DM101
Number of words to be transferred
First word to transfer (DM 000)
Destination word address
#0002:
DM100:
00:
Remarks:
When the start condition is activated, PC data and the time of transfer are output
to a printer connected to port 2 of the ASCII Unit. The PC read statement and
WRIT(87/191) are used to obtain the data from the PC.
Output:
DATA1 = 5678
DATA1 = 3249
DATA2 = 9876
DATA2 = 12
TIME = 13:45:03
TIME = I4:02:51
Example 11
Purpose: To input data from a bar code reader using the PC WRITE
statement
Remarks:
Connect the bar code reader to port 2.
The following figure defines the output format of the bar code reader.
STX
Data 1
ETX
Data 2 Data 3
Data 4 Data 5 Data 6 Data 7 Data 8 Data 9 Data
10
Programs in Two-word Mode
Содержание C500-ASC04
Страница 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Страница 5: ...iv ...
Страница 7: ...vi ...