88
MOV
#0030
100
PC Program
ASCII Unit Program
WRITE flag
MOV
#0010
100
MOV
#0020
100
Start 1
Start 2
Start 3
Start 1
Start 2
Start 3
Start 1
Start 2
Start 3
Start 1
Start 2
Start 3
Start 1
Start 2
Start 3
Start 1
Start 2
Start 3
10
OPEN #2,“LPRT:(47)”
20
ON PC 1 GOSUB 100
30
ON PC 2 GOSUB 200
40
ON PC 3 GOSUB 300
50
PC ON
60
GOTO 60
70
PC READ “@D,0,1,I4”;X1
80
PRINT #2,“DM0 = “;X1
90
RETURN
200
PC READ “@D,10,2,2I4”;X1,X2
210
PRINT #2,“DM10 = “;X1
220
PRINT #2,“DM11 = “;X2
230
RETURN
300
PC READ “@D,100,3,3I4”;X1,X2,X3
310
PRINT #2,“DM100 = “;X1
320
PRINT #2,“DM101 = “;X2
330
PRINT #2,“DM102 = “;X3
340
RETURN
10001
Remarks:
Three ON PC GOSUB statements are used to direct program execution to
three different interrupt service routines. After the branch destinations are
defined by the ON PC GOSUB statements, the ON PC statement is executed
enabling the interrupts. The statement “GOTO 60” at line 60 causes the pro-
gram to wait for a PC interrupt to initiate further action.
If PC interrupt 1 interrupts the ASCII Unit, the contents of DM word 0000 will
be printed. If PC interrupt 2 interrupts the ASCII Unit, the contents of DM
words 0010 and 0011 will be printed. If PC interrupt 3 interrupts the ASCII
Unit, the contents of DM words 0100, 0101, and 0102 will be printed.
Connect the printer to port 2 and set the baud rate to 4,800 bps.
The lot sizes are stored in DM words as follows:
Example Programs
Section 6-1
Summary of Contents for SYSMAC C200H-ASC02
Page 1: ...Cat No W165 E1 04 ASCII Unit SYSMAC C200H ASC02 ...
Page 2: ...C200H ASC02 ASCII Unit Operation Manual Revised September 2002 ...
Page 3: ...iv ...
Page 5: ...vi ...
Page 7: ...TABLE OF CONTENTS viii Glossary 159 Index 163 Revision History 165 ...
Page 122: ...Appendix B Specifications 115 130 35 100 5 ...
Page 168: ...Cat No W165 E1 04 C200H ASC02 ASCII Unit OPERATION MANUAL ...