Delta AS Series Programming Manual page 948

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

Example 9
The mode in D
is 8 (the set quantity of data is received and generates communication interrupts) and you set the mode
2
of sending and receiving data to 8-bit mode (SM106=ON).
Communication interrupt programs:
1.
Clear the interrupt: D30=0
2.
The length for the data to be sent: D20=4.
3.
The contents for the data to be sent: D100=16#0031, D101=16#0032, D102=16#0033, D103=16#0034.
4.
Set D10=16#0008 (mode: 8), D11=16#0008 (8 pieces of data to be received).
5.
Enable the contact X0.0.
6.
The PLC sends out 4 pieces of data.
Sending data: PLC→external equipment 31 32 33 34
7.
D30=0 (the programs in the interrupt are not executed).
8.
The external equipment receives data from the PLC and then sends 8 consecutive data to the PLC.
External equipment → PLC 32 33 34 35 36 37 38 39
9.
10.
D200=8 (number of the data received), and the content of the received data: D201=16#0032, D202=16#0033,
D203=16#0034, D204=16#0035, D205=16#0036, D206=16#0037, D207=16#0038, D208=16#0039.
11.
SM100=ON: reception of data is complete.
12.
D30=1 (the interrupt is triggered and then the INC D30 is executed).
13.
To send more data, set the flag SM100 to OFF to start the operation again.
NOTE: When the data sending is complete, the receiving flag SM98 is ON and then the PLC is ready to receive data.
When receiving the set quantity of data, SM100 is ON. If the communication timeout occurs but the set quantity of
data is still not received, the communication timeout flag SM104 is ON.
Cha p ter 6 App l ied Ins truc tio ns
6_
6 - 6 6 9

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents