DVP-ES3 Series Programming Manual Example 8 The mode in D 2 is 7 (the data received ends with a specific character and generates communication interrupts) and you set the mode 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#0007 (mode: 7), D11=16#000A (16#0A is the ending character). _6 5. Enable the contact M0. 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 sends data to the PLC. External equipment → PLC 31 32 33 34 35 0A 9. D200=6 (number of the data received), and the content of the received data: D201=16#0031, D202=16#0032, D203=16#0033, D201=16#0034, D202=16#0035, D203=16#000A. 10. SM100=ON: reception of data is complete. 11. D30=1 (the interrupt is triggered and then INC D30 is executed). 12. 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 ending character (16#06), SM100 is ON.
If the communication timeout occurs but the set ending character is still not received, the communication timeout flag SM104 is ON. 6-560