![background image](http://html1.mh-extra.com/html/omron/sysmac-c200h-asc02/sysmac-c200h-asc02_operation-manual_742429090.webp)
81
ASCII Unit Program
PC READ “@D,0,5,5I4”; A,B,C,D,E
Remarks:
The above PC READ “@...” statement accesses the PC DM memory area
when the user specifies “@D” as its first argument. When the ASCII Unit ex-
ecutes the above PC READ “@...” statement, five words are read by the BA-
SIC program starting from DM word 0000, converted into BCD and assigned
to the variables A through E. During execution of the PC READ “@...” state-
ment, the busy flag (word n+3 bit 00) is set.
Example 2a
Purpose:
To write data to the PC using the PC WRITE statement
MOV(21)
#0003
101
10002
MOV(21)
#0010
102
PC Program
ASCII Unit Program
Execution
statement
10300
ASCII busy
READ flag
PC WRITE “3I4”; P,Q,R
Sets the number of words to
be transferred
Sets the base word
number
Transfer base word (DM 0010)
Number of words to be transferred
Word n+1
Word n+2 (where n = 100 +10 x unit no.)
A
B
C
D
A
B
C
D
Remarks:
In the above program, when the execution statement flag is set, data is writ-
ten to PC DM words 0010, 0011, and 0012 after the READ flag (word n bit
02) is set.
When the ASCII Unit executes the PC WRITE statement, variables P, Q, and
R are converted into BCD and stored in the specified DM addresses.
During execution of the PC WRITE statement, the ASCII busy flag (word n+3
bit 00) is set. When execution is complete, the busy flag is cleared.
The PC WRITE statement is not executed until the PC READ flag is set.
Example 2b
Purpose:
To use the ASCII Unit PC WRITE statement to specify and write
data to the PC DM area independently of the PC program
•
This example does not require a PC data transfer routine.
ASCII Unit Program
PC WRITE “@D,10,3,3I4”;P,Q,R
Example Programs
Section 6-1
Содержание SYSMAC C200H-ASC02
Страница 1: ...Cat No W165 E1 04 ASCII Unit SYSMAC C200H ASC02 ...
Страница 2: ...C200H ASC02 ASCII Unit Operation Manual Revised September 2002 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 7: ...TABLE OF CONTENTS viii Glossary 159 Index 163 Revision History 165 ...
Страница 122: ...Appendix B Specifications 115 130 35 100 5 ...
Страница 167: ...Cat No W165 E1 04 Note Specifications subject to change without notice Printed in Japan Authorized Distributor ...
Страница 168: ...Cat No W165 E1 04 C200H ASC02 ASCII Unit OPERATION MANUAL ...