Professional Documents
Culture Documents
Communication between M340 and ATV312 over Modbus using WRITE_VAR and READ_VAR.
Hardware:
Software:
Unity Pro
Configuration on Drive:
Configuration on PLC:
(5)Double click on serial port and Configure the Serial Port (RS485,RJ45 Port) of BMXP3420102,
configure it a Master and Slave ID=1 for ATV312, Baud rate: 19200 Kpbs, Parity: even, Modbus
(RTU):8-bit, Stop Bit:1
(6) To run the write var or read var, it is necessary to do following setting:
Tools=>Project setiing=>variables:
(9)Click on OK.
(10) Open program section and add WRITE_VAR and READ_VAR function block.
=>The ADDM function is used to convert a character string into an address that can be used directly by
the following communication functions: READ_VAR and WRITE_VAR.
For addressing a device using Modbus protocol, parameter IN takes the form: ‘r.m.c.e.MBS’
Where:
r: rack number (rack)
m: module position
c: channel number (channel) of Modbus port (0)
e: Modbus slave number (equipment) (range 1 to 247)
MBS: for addressing a Modbus server
So,IN of ADDM = ‘0.0.0.1’
(20) Write 6,7 and 15 one by one on wr1( i.e. 8501- command word) for CMD-command word to run the
ATV312 Drive.
(21) First write “6” on wr1.
And see below,thers is a value100 on read[1] and read[2].it is the value of ACC and dEC ramp time which
is 10 second.So,by this way,we can read ACC and dEC value.