Programs In Two-Word Mode - Omron C500-ASC04 Operation Manual

Ascii unit
Table of Contents

Advertisement

Programs in Two-word Mode

6-2
Programs in Two-word Mode
Example 1
PC Program
Execution condition
#0005:
Number of words to be transferred
DM000:
First word to transfer (DM 000)
00:
Destination word address
Example 2
PC Program
#0003:
Number of words to be transferred
01:
Destination word address
DM010:
First word to transfer
80
The following programs are executed with the ASCII Unit set in two-word mode.
For all of the following examples:
printer is connected to port 2
8 bits/ no parity/ 2 stop bits
Purpose:
To write data from the PC using WRIT(87/191) and to the
ASCII Unit using the PC READ statement.
WRIT(87/191)
#0005
DM000
Equals Flag
To next process
Remarks:
When the execution condition goes ON, WRIT(87/191) is executed. The ASCII
Unit reads five words of data starting at DM 000, converts them into BCD, and
assigns them to the variables A through E. When execution of WRIT(87/191) is
completed, the Equals Flag is turned ON.
Purpose:
To write data from the ASCII Unit using the PC WRITE
statement to the PC using the READ(88/190) instruction.
READ(88/190)
#0003
DM010
Equals Flag
To next process
Remarks:
When the ASCII Unit executes the PC WRITE statement, the variables P, Q, and
R are converted into BCD and stored in DM 010, 011, and 012.
ASCII Unit Program
00
PC READ "5I4" ;A, B, C, D, E
ASCII Unit Program
01
PC WRITE "3I4";P,Q,R
Section 6-2

Advertisement

Table of Contents
loading

Table of Contents