Jump to content

Recommended Posts

Hi all,
it's my first post but I guess not least as I have a project to do using my Unitronics V1210 with CANOpen  and 2 ports for Modbus RTU on board.
I want to establish basic communication with my VFD (Vacon 100 / now Danfoss company) by Modbus RTU.
1. I bought RJ11 six pin plug and prepare junction so I have two cables - yellow at PIN1 and red at PIN6.
2. I connected PLC (Port 1) to VFD (A,B inputs)
3. I wrote a basic program to read the register 2101 (which is not 0 for sure) and... nothing happens. No communication.

What I have checked:
- Ports termination (set to RS485 with termination)
-  Galvanic connection between pins and end of the cable and it is ok
- loopback test FB - no answer
- ID, Baud Rate, Parity, Stop Bits - they are the same in drive and PLC

I kindly ask if someone could check my ladder diagram as I have no idea what is wrong.

image.png.c87ec9967ec5e147d209af24da4cdc58.png

image.png.64d74aed59a821979ee2b540e45e5db3.png

KR,

Bartosz

image.jpg

Share this post


Link to post
Share on other sites

Understand that this is a volunteer forum.  You can always send your questions to support@unitronics.com.

When you ask for help, you'll get a quicker response if you post a link for the manual of the device you're trying to talk to.  This is professional courtesy; otherwise we have to go digging to try to help you with something you bought from another vendor.  If we have time.

So this is what you should have put in your post-

http://files.danfoss.com/download/Drives/Vacon-100-Modbus-User-Manual-DPD00156D-UK.pdf

I do appreciate the photo of your com cable - it is made correctly for RS485. 

Did you enable Modbus protocol in the drive?  (pg 23)

Unitronics Modbus is zero based, while a lot of devices are 1-based - try reading address 2102.

When you activate your test bit, does status MI 2 go to 5 or 0?

Did you try swapping the A & B wires on the RS 485 port on the drive?

 

Joe T.

  • Like 1

Share this post


Link to post
Share on other sites

+1 to all that Joe says. 

I  might be tired this morning, and about to say something stoopid, but aren't you calling the same network ID?  ie need to change your slave to 2?  I know you said ports termination ok, but have you got termination set on the drive as well as the plc?  Need resistors at both ends.

For your test purposes, you could also just be using MB1 without any of the MB2 involvement.  Once the function is called, it runs through.  If your call might be prevented from starting on the rising edge due to another modbus process going on, your logic is good.  However, I would also keep in mind that I always leave at least a few scans b/n modbus finishing and the next call to ensure that the buffers have completely cleared.  So this means that the logic is in some ways not so good!

Paste from the help guides re ideally having a delay b/n modbus calls:

<<< Slaves: Consecutive References

Whether the MODBUS master is a Unitronics PLC or another device, if the master application size and system requirements allow, it is recommended to add a delay between consecutive references to slaves according to the table below.

Delay (msec) between consecutive references to slaves;
Minimum Baud rate = 9600

 

Minimum

Recommended

Jazz

20

40

M90/M91

15

30

V120, V2xx

10

20

V130

5

10

V350, V570, V1040, V1240

0

5

>>>>>

 

cheers,

Aus

Share this post


Link to post
Share on other sites

An oscilloscope across the data pair can be helpful in determining if anything is happening on the pair. I may be the odd man out on having a scope on hand, that said if you have access to one don't refrain from using it as a troubleshooting tool. The wire swap idea is worth a try. It is my understanding that "A" and "B" don't necessarily have a universal congruency to + and -

Share this post


Link to post
Share on other sites

Hello,

thank you all for quick responses. After your suggestions and contact with Unitronics support I created a final version of my program.
image.png.ce4934176012c0f49c6b36cb45c24225.png
Unfortunately, there are no received messages. Messages are received only during power-up of the converter (some noise). 

I checked my cable - there is galvanic connection between pins and endings. I also swapped cables many times.

Here is the oscillogram of the Modbus signal at drive inputs.
image.png.8ffd7e1cdbe3a36e60f4ed5646e23da9.png

And below oscillogram when I connect with my testing software (and it works). I know that probe's polarization is inversed. What concerns me is that the amplitude of peak-peak voltage above is 2.5V when it is 7V below.
image.png.ac7343e6fc1226ff7083a2226c7844fd.png

Modbus in my drive works properly as I checked it by modbus testing software on my PC (checking means sending and receiving words and operating drive remotely). BTW. Mtester - great and free software. Register which I try to read (2101 in drive, so 2100 in PLC) has value 65 - no matter as there are no received data.
image.png.c0d2d09d2a51aef8b73da8abe196a13d.png

MI 2 status is 4 and 5 alternately.

Termination is done at both ends.

Do you have any other ideas?

Once more - when I want to set PLC Net ID with this block, numbers from 1-63 are CANopen and from 64 RS485? Does it have meaning? In my program, PLC is 1 when drive is 2. I tried also 64 and 65 with no success.
image.png.777b8bd0ab66223f4675175ffd271a87.png

KR, Bartosz

1_Communication test.vlp

image.png

Share this post


Link to post
Share on other sites

Hi Borec

Com 1 normally will not function if you are connected to your PC at the same time.

Did you try communication with the danfoss drive on com 2 and using com 1 to connect the PLC to the PC.

Regards

Denis

 

Edited by sgull
Sorry mixed up com ports. Com 1 is for PC

Share this post


Link to post
Share on other sites

USB com to PC does override local com port, however the packet your scope is showing would indicate port is under MODBUS control.  1 stop bit is more common. Dude, your data presentation is totally awesome. "A problem well defined is a problem half solved".  Vision is sending "datagram" out, high probability your VFD is not recognizing message to send an answer back. I take it polarity swap did nothing?

Share this post


Link to post
Share on other sites

Hello,

thanks for support. I tried everything and finally helped... actualization of the software.

I downloaded the the latest version of Visilogic 9.8.79 and updated the PLC OS, now it works.

KR,
Bartosz

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.


×
×
  • Create New...