Jump to content

RS485 RTU MODBUS communication Setup


Recommended Posts

Hi,

I'm new to the RS485 communication protocol.

I am trying to communicate with a Siemens SINAMICS V20 VFD with the Unitronics Unistream PLC ( USP-070-B10)

The VFD leads to a 3 phase motor

I set up the baud rate to 9600, data bit to 8, parity list to none, and stop bit to 1

In addition I set up a remote slave in COM1 of Masters drop down, in MODBUS

In the slave configuration I made a coil named "motor" that writes to address 40 every 100 ms

I spoke with a Siemens Technician about the driver settings, and could not find a setting to "ECHO" bits to the driver

I was told I need to set a transmit telegram

The is there an FC03 for "read holding register" or a way to "Echo" data to 40,100 (MODBUS)?

Any sort of references or suggestions for setting up communication?

Thank you,

Wynn Ni

 

 

 

Coils.PNG

COM.PNG

FC3 Read Holding Registers.PNG

Inverter Addresses.PNG

Mapping Table.PNG

Registers.PNG

Link to comment
Share on other sites

  • MVP 2023

A "telegram" in SiemensSpeak is just a Modbus data packet.  The UniStream will handle that for you.

I think you're confusing coils and registers.  The table you posted lists registers.  A coil is a single bit and typically has an address of 0000x, while registers are numbers and have the format 4000x.

FC 3 reads a register.  FC 6 writes a value.  Once again, the table in the UniStream will handle selecting the proper Function Code.

Tell us exactly what you want to read and write from/to the VFD.  I'm not sure what you mean by "ECHO" - does that mean write from the PLC to the VFD?

Joe T.   

Link to comment
Share on other sites

Thank you Joe!

I am new to the protocol and implantation so my terminology  is off when I made the post above.

I got off the phone with a Siemens Technician and sort of tried to convey the issue to the best of my understanding.

I think "echo" means to write from the PLC to the VFD

 

I would like to read speed of the VFD and read the status of the motor (whether it is on/off).

I would like to write to the VFD to ramp the speed of the motor to a certain value when the program begins and hold the speed constant

Just something simple to demonstrate motion and that communication is successful.

 

Much gratitude, 

Wynn Ni

 

HMI.PNG

Link to comment
Share on other sites

Not to discourage you but your task is difficult.
RS-485 is a "recomended standard" it comes in both 2 and 4 wire versions.
Mixing different suppliers, hardware interfaces, software protocols, 
 all at once will be a challenge.
Things like a the standard definition of high byte low byte position, 
 and starting count position, is 4000 or 4001 the first byte?
Neither Siemens nor Unitronics are "True" Modbus followers.
Read up on what Modbus should be and what the supplier has
 actually implemented.
All of these problems must be overcome before your own control
 logic can be effective.

I would strongly suggest you break the problem down into solvable portions.
Get the RS485 hardware right first and then get the 
 Modbus to Modbus protocol right independantly for each supplier.
The quickest and best way is using something which has been proven to work.
Use Siemens to Siemens and then Unitronics to Unitronics to solve some 
 commumication without to many unknown factors..
Use a Modbus analyser to debug and see what is 'really' going on.
Polling requires that communications both ways is correct.
Watching a cyclic broadcast will be simpler to start with.
Then when you finally have a feel for this you can hook the
 two different systems together and tweak it up.

Good luck

 

Link to comment
Share on other sites

  • MVP 2023

Start simple.

1.  Delete the "Coils Periodic" entries in your Modbus table.  I'm not sure what this is doing.

2.  In your "Registers Periodic" table, enter 43 as the address for your Speed tag, delete your Temperature SP entry, and add an INT tag for Motor reading address 34.  Note that this will return the number 0 or 1, and you'll have to do something in your logic to change that into a coil for your display.

3.  We'll worry about writing to the drive after you get this working.

Post your code if you have more questions.  If we can look at your program we can see things that aren't on the screen shots.

Joe T.

Link to comment
Share on other sites

On 1/7/2020 at 9:35 AM, wynn.c.ni@gmail.com said:

Thank you both

I ended up getting the drive to function with the I/O pins of the PLC, and using a different configuration setting for the VFD

I avoided using RS485 but might need to use it in the future. I'll keep in mind to use equipment from the same suppliers in the future.

I see, so address 43 is frequency, which controls the speed of the motor

and 34 is the address for Stop/Run

I was a bit confused by the syntax, but I see that uni stream subtracts 400001 from the MODBUS address to read from

Best Regards

Wynn Ni

 

 

Link to comment
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...