Communications Mode
Example:
Reading coordination information after "Send message frame"
Start address 128 is set on the CP 523. A four-byte message frame is to be sent. The message frame
is stored in DB 20 in DW 0. Flag 100.3 is to be set if the CP 523 accepts the job. The program does
not describe how F100.3 is reset. F 100.3 could be reset when another job request is forwarded to
the CP.
STL FB 119
NAME :SEND1
:A
F
100.3
:BEC
:L
KH
0004
:T
PW
130
:L
KH
A001
:T
PW
128*
:L
KH
:L
PW
128
:AW
:><F
:BEC
:S
F
100.3
:C
DB
20
:L
DW
1
:T
PW
130
:L
DW
0
:T
PW
128*
:BE
*
5.2
Note:
The program can only run if DB 20 has been generated on the CPU. You should create DB 20 as
follows, since it is also accessed in the following examples:
DW 0
:
KH=A53D
DW 1
:
KH=34E1
DW 2
:
KH=9002
DW 3
:
KH=8765
DW 4
:
KH=6ED4
DW 5
:
KH=0D0D
DW 6
:
KH=0000
DW 7
:
KH=0000
7-50
If flag 100.3 is set, the CP 523 has accepted the job request,
then Block End
Load message frame length 4 bytes into ACCUM 1 and transfer
to word 2 of the transfer memory
Load "Send message frame" (A001
to word 0 of the transfer memory
Check whether the send request has been accepted
0001
If no, conditional Block End
If yes, set flag 100.3 and Send message frame
Open DB 20
Transfer DW 1
to word 2 of the transfer memory
Transfer DW 0
to word 0 of the transfer memory
Block End
Explanation
) into ACCUM 1 and transfer
H
CP 523
EWA 4NEB 811 6044-02a