modbus communication error

Hi,

I have 2 VFD's connected on a daisy chain to a serial port on my computer using Modbus rs485, at 19.2kbaud/s, 2stop bits, 8 data bits, no parity and slave address 1 and 2. I can communicate fine when only polling to 1 device, but when I poll 2 devices, it doesnt work, sometimes I get a successful read, sometimes I don't, and writes are never successful on the VFD's, but when only communicating to 1 device, it works without hiccups.

I've tried increasing the silent time on the VFD's from 2ms to 20ms and adding the termination resistors om the front and back of the daisy chain, both of which i think might have helped with the read sometimes but im not 100% sure.

So my local supplier tells me that his cat5 and his control cable are okay to use with modbus, I've tried both but they both give me the same problem. Is it possible that this is the problem for an application with such a short distance within 3meters? Has anyone else had this experience? Also the ground reference for rs485 interface, should it be connected with the panel ground where the VFD's are on one end via the shield wire and reference gound to the other end? On my vfd manual, it says to connect the shield to the 0V pin on the VFD side and the shield to panel ground and ground reference on the other. Which is correct?

Thanks!
 
Edit: I meant COM port not serial port, also where I'm from I can't get a hold of 120ohm shielded twisted pairs and that on my system, I'm using shielded Cat5 with 120ohm resistors. The VFD manual says that for speeds below 38.2kbauds/s there is no need for termination, does this mean since I'm daisy chaining, that the speeds add up? Or that at 19.2kbaud on each device is way below that requirement?
 
Your issue may be timing related. I've seen issues such as this where the master makes requests too quickly and can cause every other request to become corrupted. What happens is the slave may take a while to stop driving the bus after sending its response and the master tries to send its next request while the slave is still driving the bus - leading to bus contention and the new request being corrupted.

Try slowing down the rate at which your master is making requests. Most masters have a setting for this (i.e. scan rate, poll delay, request delay, etc.).

Regarding your questions on the operation of RS-485, here are some details on RS-485 and references for you to review to become more knowledgeable on RS-485.

Cable Type
RS-485 cabling consists of 1 twisted-pair for the RS-485 data signals and (ideally) 1 conductor or twisted pair for RS-485 common-mode (0V) reference, and can optionally include a shield. RS-485 cabling should be 16 - 24 AWG and have a characteristic impedance of 100 to 140 ohms (120 ohms is most common).

CAT5 cabling consists of 4 twisted-pairs of wires and typically has a characteristic impedance of 100 ohms. Therefore, it can be used for RS-485 networks. However, when applying termination, you need to match the characteristic impedance of the cabling you're using, so you should use 100 ohm resistors with CAT5 cabling (more on termination below).

Distance
An RS-485 bus can be up to 4,000ft (~1200m) long. Above this distance, RS-485 repeater devices must be used to extend the network. There is no minimum distance of an RS-485 bus, usually the shorter the cabling, the better.

Grounding
There are 2 different signals to consider regarding RS-485 and grounding - Common-Mode (0V) Reference and Shield.

The Common-Mode (0V) Reference is the logic, 0V, ground for the RS-485 + and - signals. RS-485 is a differential network, an RS-485 transceiver detects a signal by measuring the difference in the voltages between the RS-485 + signal (with respect to the Common-Mode Reference) and the RS-485 - signal (with respect to the Common-Mode Reference). The voltage for either of these signals (RS-485 + and RS-485 -) must be within the range of -7 to +12 V with respect to the Common-Mode Reference. All RS-485 devices must share a common ground reference for their Common-Mode Reference. This can be done explicitly by using a dedicated conductor in the RS-485 cable or implicitly by using an existing grounding network, such as a building's ground network, for example.

Cable shielding is used to reduce both radiated and received EMI. The cable shielding should be connected to earth ground at one end only (typically the controller end), daisy-chained between all other RS-485 devices, and taped back or capped off at the end device. The need for cable shielding is a debated topic that I won't get into here, but because RS-485 cabling uses a twisted-pair for the data signals, theoretically shielding is unnecessary, since noise will be induced equally on each signal wire and therefore cancels out when the RS-485 transceivers measure the difference between the RS-485 + and - signals (again, each with repect to the Common-Mode Reference).

Termination
Termination is used to prevent signal reflections caused by transmission-line effects of the RS-485 cabling. When a voltage transition (i.e. MARK to SPACE or SPACE to MARK transition) travels down the cable and hits an unterminated end (i.e. a change in impedance), that voltage transition (now slightly smaller and opposite in magnitude) is reflected back down the cable. The common rule is that these reflections will dampen out within 3 round trips. Given a length of cable and baud rate used, if the reflections will dampen out well within a single bit time (1 / Baud Rate), termination is not necessary. If termination is used, it must match the characteristic impedance of the cable (120 ohms for RS-485 cabling or 100 ohms for CAT5).

Note that the baud rate is for the entire RS-485 bus (i.e. the speeds DO NOT add up).

References
Other Forum Posts
https://control.com/forums/threads/...alid-response-slave-id-exception.49191/page-2

RS-485 General References
https://www.csimn.com/CSI_pages/RS-485-FAQ.html
http://www.bobtech.ro/get?download=21:rs485-wiring-guidelines
https://www2.htw-dresden.de/~huhle/ArtScienceRS485.pdf

RS-485 General Videos
https://www.ccontrols.com/video/eia.htm

Termination References
https://blog.opto22.com/optoblog/rs-485-to-terminate-bias-or-both
https://e2e.ti.com/blogs_/b/analogw...nation-is-necessary-and-how-to-do-it-properly
 
Hi, thanks for sharing all that information. Appreciate it. On the master side, there is a term called update interval on the software, which I set to 250ms, is this too fast? Also is 20ms silent time on the slave side reasonable? I only read and write at most three 16 bit registers at a time. Thanks
 
What software are you using?

The update interval may be the time it takes the software to read all registers (using multiple requests) or it could be the time between each request.

For testing purposes, you can use a large delay, such as 1 second, to confirm whether or not communications works, then later reduce the delay to an appropriate value. The appropriate delay will depend on how many registers are being read and how quickly you need values to refresh.

What is the make and model of the VFD's?

I'm not exactly sure what the silent time is on the VFD, but in Modbus RTU, message frames are separated by a silent interval of at least 3.5 character times. This setting may be a way to change how the VFD detects Modbus RTU message frames. With your serial settings (19.2kbaud/s, 2stop bits, 8 data bits, no parity) a character time is about 0.57ms, so 3.5 character times is 2ms.

It's possible that this silent time setting is what's causing your issue. If it's set too high, the slave may interpret the other slave's response plus the new request as a single Modbus RTU message. This message would be invalid and so the slave would not respond. If possible, try setting the silent time setting to a value between 2 and 5ms.
 
What software are you using?

The update interval may be the time it takes the software to read all registers (using multiple requests) or it could be the time between each request.

For testing purposes, you can use a large delay, such as 1 second, to confirm whether or not communications works, then later reduce the delay to an appropriate value. The appropriate delay will depend on how many registers are being read and how quickly you need values to refresh.

What is the make and model of the VFD's?

I'm not exactly sure what the silent time is on the VFD, but in Modbus RTU, message frames are separated by a silent interval of at least 3.5 character times. This setting may be a way to change how the VFD detects Modbus RTU message frames. With your serial settings (19.2kbaud/s, 2stop bits, 8 data bits, no parity) a character time is about 0.57ms, so 3.5 character times is 2ms.

It's possible that this silent time setting is what's causing your issue. If it's set too high, the slave may interpret the other slave's response plus the new request as a single Modbus RTU message. This message would be invalid and so the slave would not respond. If possible, try setting the silent time setting to a value between 2 and 5ms.
Hi I just got all my things and set it up exactly like the above trying values between 2 and 5ms, so I reconnected everything on a cat5 shielded cable, done the shielding and the common mode 0v connections as well as use 100Ohm terminating resistors at both ends, it worked prefectly for awhile and now im getting the same problem as before, I use 1/4w 100ohm resistors, one at the last VFD and one to my rs485 to ethernet converter, is this correct? The VFD's make are Control Technique's Commander SK, and the software I use is quickHMI, I dont think its the software's problem, but I really dont know what else to do at this point. In addition, I also tried terminating with 120ohm just to see what would happen and I got CRC checksum errors. Thanks.
 
Abit of additional info, while using 120ohm built in resistors on the SK commanders, always gives me a crc checksum error, no matter how many devices are connected, so at least I know I get a reply. I can't make any sense of this info, as the manual for the commander sk do not mention the method for termination on their devices.
 
The Serial Communications section in the Commander SK Advanced User Guide is actually quite informative. Regarding termination, the manual states to connect pins 1 and 8 together on the RJ45 connector to apply the built-in 120 ohm termination resistor. Please make sure you have read and understood this section of the manual available here:
https://acim.nidec.com/en-us/drives...wnloads/user-guides-and-software/commander-sk

However, regarding termination, I recommend NOT connecting any termination resistors. Your cabling is very short, so termination is not necessary. Furthermore, the SK manual mentioned above also makes this recommendation to not use termination in section 5.2.3 Terminating resistors.

Additionally, you mention a RS-485 to Ethernet converter. It's possible this converter is the source of your issues. Please try using a USB to RS-485 converter instead.

You may also want to try a different Modbus master tool instead of QuickHMI. Here are a few options:

ModScan
https://www.win-tech.com/

Modbus Poll
https://www.modbustools.com/modbus_poll.html

Simply Modbus
https://www.simplymodbus.ca/RTUmaster.htm
 
The Serial Communications section in the Commander SK Advanced User Guide is actually quite informative. Regarding termination, the manual states to connect pins 1 and 8 together on the RJ45 connector to apply the built-in 120 ohm termination resistor. Please make sure you have read and understood this section of the manual available here:
https://acim.nidec.com/en-us/drives...wnloads/user-guides-and-software/commander-sk

However, regarding termination, I recommend NOT connecting any termination resistors. Your cabling is very short, so termination is not necessary. Furthermore, the SK manual mentioned above also makes this recommendation to not use termination in section 5.2.3 Terminating resistors.

Additionally, you mention a RS-485 to Ethernet converter. It's possible this converter is the source of your issues. Please try using a USB to RS-485 converter instead.

You may also want to try a different Modbus master tool instead of QuickHMI. Here are a few options:

ModScan
https://www.win-tech.com/

Modbus Poll
https://www.modbustools.com/modbus_poll.html

Simply Modbus
https://www.simplymodbus.ca/RTUmaster.htm
I've tried with and without the terminating resistance as well as usb to ethernet, no luck, same problem, I think I've exhausted all my options here.
 
The Serial Communications section in the Commander SK Advanced User Guide is actually quite informative. Regarding termination, the manual states to connect pins 1 and 8 together on the RJ45 connector to apply the built-in 120 ohm termination resistor. Please make sure you have read and understood this section of the manual available here:
https://acim.nidec.com/en-us/drives...wnloads/user-guides-and-software/commander-sk

However, regarding termination, I recommend NOT connecting any termination resistors. Your cabling is very short, so termination is not necessary. Furthermore, the SK manual mentioned above also makes this recommendation to not use termination in section 5.2.3 Terminating resistors.

Additionally, you mention a RS-485 to Ethernet converter. It's possible this converter is the source of your issues. Please try using a USB to RS-485 converter instead.

You may also want to try a different Modbus master tool instead of QuickHMI. Here are a few options:

ModScan
https://www.win-tech.com/

Modbus Poll
https://www.modbustools.com/modbus_poll.html

Simply Modbus
https://www.simplymodbus.ca/RTUmaster.htm
Ive read the manual, they dont say to terminate the first and last device or the ends of the chain.
 
Please do NOT use termination. Remove any termination resistors that may be connected to your devices or RS-485 cabling. Confirm that any built-in termination is disabled on all of your VFD's (i.e. the RJ45 port's pins 1 and 8 are NOT connected together) and your converter.

Please use a USB to RS-485 converter (NOT an Ethernet to RS-485 converter) and one of the recommended Modbus tools I mentioned, such as ModScan, Modbus Poll, or Simply Modbus. Make sure to connect all 3 signals (+, -, and 0V) between the converter and all VFD's.

For reference, when termination is used on an RS-485 network, 2 termination resistors are required and each should be installed at the far ends of the cabling. One termination resistor on the first RS-485 device and one termination resistor on the last RS-485 device.

If you are still having issues, please provide the exact steps you've performed and details on the results of each of your steps so that we can better assist you resolve your issue.
 
Top