Omron SYSMAC C200H-ASC02 Operation Manual page 110

Ascii unit
Hide thumbs Also See for SYSMAC C200H-ASC02:
Table of Contents

Advertisement

Execution Sequence
Example 5
PC Program
01000
04000
04001
04001
10001
10300
04002
1, 2, 3... 1.
Purpose:
To process data with the ASCII Unit
DIFU 04000
04002
04001
10300
04002
MOV
#0010
100
10001
MOV
#0000
100
Remarks:
This program transfers 100 words of data from the PC to the ASCII Unit
(starting from PC DM word 0100) each time bit 01000 is set. The ASCII Unit
performs some calculations with the data and the results are sent back to the
PC and stored in DM words 0200 to 02I4.
Execution Sequence:
PC: The self-holding circuit (04001) is set on the positive edge transition
of bit 01000. An interrupt number is then generated for execution of the
the ON PC 1 GOSUB statement and the WRITE flag (10001) is set.
2.
ASCII: After the interrupt is enabled with the ON PC statement, execu-
tion branches to an interrupt service routine (statements 1000 to 1110)
and the specified PC data is read and assigned to variables A1 to A10
by the PC READ "@..." statement. Computations are then performed on
the data and the results are assigned to variables B1 through B15.
These results are then transferred back to the PC with the PC
WRITE "@..." statement.
3.
PC: After the ON PC GOSUB statement is executed, the interrupt num-
ber is set to 0 disabling further interrupts (i.e., when the ASCII busy flag
(10300) has been turned OFF).
ASCII Unit Program
100
ON PC 1 GOSUB 1000
110
PC 1 ON
4
190
GOTO 190
1000
PC READ "@D,100,10,10H4";A1 ... A10
1010
(computation processing)
1
assigns the results to B1 through B15
2
1100
PC WRITE "@D,200,15,15H4";B1 ... B15
1110
RETURN
3
Section 6-2
101

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents