0% found this document useful (0 votes)
145 views4 pages

DVP-PLC Application Manual (Programming)

1. The document provides examples of using different communication (COM) ports on a PLC for RS-232 and RS-485 communication with external devices like VFD motor drives. 2. It describes how to configure registers to set communication parameters like baud rate and format, and which registers to use for sending and receiving data. 3. Flags are used to control the communication process, with the PLC automatically setting flags to indicate status like completion of receiving, and the user program resetting flags to initiate the next data transfer.

Uploaded by

sumit sutar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views4 pages

DVP-PLC Application Manual (Programming)

1. The document provides examples of using different communication (COM) ports on a PLC for RS-232 and RS-485 communication with external devices like VFD motor drives. 2. It describes how to configure registers to set communication parameters like baud rate and format, and which registers to use for sending and receiving data. 3. Flags are used to control the communication process, with the PLC automatically setting flags to indicate status like completion of receiving, and the user program resetting flags to initiate the next data transfer.

Uploaded by

sumit sutar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

7 Application Instructions API 50-88

Program Example 4:
Use COM2 on the PLC to carry out RS-485 communication.
Connect PLC to VFD-B series AC motor drives (AC motor drive in RTU Mode; PLC in 16-bit mode and M1161 = On).
Write in H12 to parameter address H2000 in VFD-B in advance as the data to be transmitted.
M1002
MOV H86 D1120 Set up communication protocol 9600,7,E,1

SET M1120 Retain communication protocol

MOV K100 D1129 Set up communication time-out 100ms

SET M1161 8-bit mode


Sending request
pulses
Write in data to be transmitted in advance

SET M1122 Set up sending request


X10
RS D100 K8 D120 K8
M1123
Process of received data

Receiving of data is completed.


RST M1123 The flag is reset.

PLC  VFD-B, PLC sends: 01 06 2000 0012 02 07


VFD-B  PLC, PLC receives: 01 06 2000 0012 02 07
Registers for sent data (PLC sends out messages)
Register Data Explanation
D100 low 01 H Address
D101 low 06 H Function
D102 low 20 H
Data address
D103 low 00 H
D104 low 00 H
Data content
D105 low 12 H
D106 low 02 H CRC CHK Low
D107 low 07 H CRC CHK High

Registers for received data (VFD-B responds with messages)


Register Data Explanation
D120 low 01 H Address
D121 low 06 H Function
D122 low 20 H
Data address
D123 low 00 H
D124 low 00 H
Data content
D125 low 12 H
D126 low 02 H CRC CHK Low
D127 low 07 H CRC CHK High

Program Example 5: COM1 RS-232


1. Only 8-bit mode is supported. Communication format and speed are specified by lower 8 bits of D1036.

D V P - P L C A P P L I C AT I O N MA N U A L 7-99
7 Application Instructions API 50-88

2. STX/ETX setting function (M1126/M1130/D1124~D1126) is not supported.


3. High byte of 16-bit data is not available. Only low byte is valid for data communication.
4. Write the data to be transmitted in advance into registers starting from D100 and set M1312 (COM1 sending
request) as ON
5. When X0 = ON, RS instruction executes and PLC is ready for communication. D100 will then start to send out 4
data continuously. When data sending is over, M1312 will be automatically reset. (DO NOT apply RST M1312 in
program). After approximate 1ms, PLC will start to receive 7 data and store the data in 7 consecutive registers
starting from D120.
6. When data receiving is completed, M1314 will automatically be ON. When data processing on the received data
is completed, M1314 has to be reset (OFF) and the PLC will be ready for communication again. However, DO
NOT continuously execute RST M1314.
M1002
MOV H87 D1036 Setting communication protocol as 9600,8,E,1

SET M1138 Retain communication protocol

MOV K100 D1249 Set up communication time out as 100ms


Pulse for
sending request
Write transmitting data in advance
Pulse
SET M1312 Sending request
X0
RS D100 K4 D120 K7
M1314
Processing received data

RST M1314 Receiving completed and flag reset

Sending data: (PLC→External equipment)

D100L D101L D102L D103L

Source data register, starting from


lower 8 bits of D100

Length = 4

Receving data: (External equipment→PLC)

D120L D121L D122L D123L D124L D125L D126L

Registers for received data, starting from


lower 8 bits of D120

Length = 7

7-100 D V P - P L C A P P L I C AT I O N MA N U A L
7 Application Instructions API 50-88

Program Example 6: COM3 RS-485 or RS-232


1. Only 8-bit mode is supported. Communication format and speed are specified by lower 8 bits of D1109.
2. STX/ETX setting function (M1126/M1130/D1124~D1126) is not supported.
3. High byte of 16-bit data is not available. Only low byte is valid for data communication.
4. Write the data to be transmitted in advance into registers starting from D100 and set M1316 (COM3 sending
request) as ON
5. When X0 = ON, RS instruction executes and PLC is ready for communication. D100 will then start to send out 4
data continuously. When data sending is over, M1316 will be automatically reset. (DO NOT apply RST M1316 in
program). After approximate 1ms, PLC will start to receive 7 data and store the data in 7 consecutive registers
starting from D120.
6. When data receiving is completed, M1318 will automatically be ON. When data processing on the received data
is completed, M1318 has to be reset (OFF) and the PLC will be ready for communication again. However, DO
NOT continuously execute RST M1318.
M1002
MOV H87 D1109 Setting communication protocol as 9600,8,E,1

SET M1136 Retain communication protocol

MOV K100 D1252 Set up communication time out as 100ms


Pu ls e f or
s ending reque st
Write transmitting data in advance
Pulse
SET M1316 Sending request
X0
RS D100 K4 D120 K7
M1318
Processing received data

RST M1318 Receiving completed and flag reset

Sending data: (PLC→External equipment)

D100L D101L D102L D103L

Source data register, starting from


lower 8 bits of D100

Length = 4

D V P - P L C A P P L I C AT I O N MA N U A L 7-101
7 Application Instructions API 50-88

Receving data: (External equipment→PLC)

D120L D121L D122L D123L D124L D125L D126L

Registers for received data, starting from


lower 8 bits of D120

Length = 7

Remarks:
1. PLC COM1 RS-232: Associated flags (Auxiliary relays) and special registers (Special D) for communication
instructions RS / MODRD
Flag Function Action
COM1 retain communication settings. Communication settings will be reset
(changed) according to the content in D1036 after every scan cycle. Users can
set ON M1138 if the communication protocol requires to be retained. When User sets and
M1138
M1138 = ON, communication settings will not be reset (changed) when resets
communication instructions are being processed, even if the content in D1036
is changed.
User sets and
M1139 COM1 ASCII / RTU mode selection, ON: RTU mode, OFF: ASCII mode.
resets
COM1 sending request. Before executing communication instructions, users
need to set M1312 to ON by trigger pulse, so that the data sending and User sets and
M1312
receiving will be started. When the communication is completed, PLC will reset system resets
M1312 automatically.
COM1 data receiving ready. When M1313 is ON, PLC is ready for data
M1313 System
receiving
System sets
M1314 COM1 Data receiving completed.
and user resets
COM1 receiving error. M1315 will be set ON when errors occur and the error System sets and
M1315
code will be stored in D1250. user resets

Special register Function


COM1 (RS-232) communication protocol. Refer to the following table in point 4 for
D1036
protocol setting.
The specific end word to be detected for RS instruction to execute an interruption
request (I140) on COM1 (RS-232). When the character received is equal to the low byte
D1167
of D1167, the interrupt I140 is triggered.
Supported communication instructions: RS
COM1 (RS-232)/COM2 (RS-485) communication address when COM1/COM2
D1121
functions as a slave station.

7-102 D V P - P L C A P P L I C AT I O N MA N U A L

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy