Jump to content
Sign in to follow this  
Austin Nelson

V570 to GS2 VFD Mobus Communication

Recommended Posts

Hello, I am trying to communicate to an Automation Direct VFD through Modbus. Since this is just a small proof of concept project I have taken the Modbus example code and modified it to attempt the read the output frequency of the drive.  Unfortunately I am not getting any communication between the VFD and HMI and am unsure why. No one in our office has much experience with Modbus, and none with Unitronics Modbus programming so I am hoping someone on here can help.  I've made a cable using a RJ4C6P connector on each end of the cable. I made the cable similar to the one described in the GS2 manual as seen below, but pin 2 to pin 2, pin 3 to pin 3, pin 4 to pin 4, and pin 5 left blank. Using RS232, switches are in default on HMI and VFD switches set to RS232.

Cable.PNG.c48902858ed8091e457207ab499ab416.PNG

I have changed the following parameters:

  • P9.01 to 1 - 9600 baud rate
  • P9.02 to 5 - Modbus RTU Mode, 8 Data bits, Odd Parity, 1 Stop bit

 

I am hoping someone has some ideas to get me going in the right direction, any help is greatly appreciated.

GS2 Manual if needed:

https://cdn.automationdirect.com/static/manuals/gs2m/gs2m.pdf

MODBUS TEST.vlp

Share this post


Link to post
Share on other sites

You are trying to use 232 when the link is wanting to run on 485.  To do this, you have to use pins 1 & 6 on the plc, and set jumpers accordingly.  You may have to try swapping the lines if this doesn't work in the first place.

As well, it would appear that the drive doesn't have the "normal" modbus comms settings that most of the gear I use does.......8 bits, no parity and 1 stop.  You will have to find the best setting amongst all of the RTU options listed in the drive manual on page 4-56, and match these in the PLC's Com Init ladderwork.  You should eventually find the one that works the best. For my stuff I always run on 9600, but in theory faster is possible.  You again have to see how things go and find the most stable connection type and speed.

cheers, Aus

Share this post


Link to post
Share on other sites
1 hour ago, Austin Nelson said:

VFD switches set to RS232

OK.

Set your com parameters 9.02 to mode 4 - 9600 8E1.  For some reason Even works better than Odd if None is not available.

Cut off the end of your com cable on the PLC side and put a new one on-

image.png.e780062dc4b3cf6db4753384e2921099.png  

This is in the Visilogic Help if you dig deep enough.

PLC     VFD

2            2

4            4

3           3

 

You also don't need to put the "4" at the front of the Modbus address.  This is implied as it's a holding register.  Confusing, yes.  And Unitronics starts counting at 0, so you need to subtract 1 from the register you want, so for frequency you need address 8450.  Also confusing.

I've hacked the program a bit.  Let us know if it works.

Joe T.

 

 

MODBUSTEST_JT.vlp

  • Like 1

Share this post


Link to post
Share on other sites

The other thing you can do to score a few confidence points is to use a PC-based Modbus tool.  There are master and slave programs available.  One example as follows:

https://www.win-tech.com/html/demos.htm

You can test:

Unitronics PLC master to PC-Simulator Slave

PC-Simulator Master to VFD Slave

You can also try PC-Master to PC-Slave and even PLC-Master to PLC-Slave (using two COM ports).

In each case the goal is to confirm that at least one side of the communication is working OK, by process of elimination.

The V570 also has a built-in COM port sniffer, so you can monitor the traffic.  It is accessible thorugh the info mode.  It will be all HEX data, but at least you will be able to see if the drive is responding or not, as the TX and RX data are displayed separately.  The issue may be as simple as just swapping RX and TX wires.

The most frustrating thing about debugging comms is the way it can all just sit there not working, and you feel like it's all a dark secret.  Use any trick you can to "open up" the system and let it show you where the problem is.

 

 

Share this post


Link to post
Share on other sites
7 hours ago, Austin Nelson said:

VFD switches set to RS232

Oooops, sorry.    Missed that completely.     Dumpkerfen!     And I DO try to read posts completely.

cheers, Aus

Share this post


Link to post
Share on other sites
On 10/9/2019 at 6:45 PM, Joe Tauser said:

OK.

Set your com parameters 9.02 to mode 4 - 9600 8E1.  For some reason Even works better than Odd if None is not available.

Cut off the end of your com cable on the PLC side and put a new one on-

image.png.e780062dc4b3cf6db4753384e2921099.png  

This is in the Visilogic Help if you dig deep enough.

PLC     VFD

2            2

4            4

3           3

 

You also don't need to put the "4" at the front of the Modbus address.  This is implied as it's a holding register.  Confusing, yes.  And Unitronics starts counting at 0, so you need to subtract 1 from the register you want, so for frequency you need address 8450.  Also confusing.

I've hacked the program a bit.  Let us know if it works.

Joe T.

 

 

MODBUSTEST_JT.vlp 227.38 kB · 7 downloads

Joe, the code you provided got them talking, thanks for the help!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...