MicroLogix 1100 Modbus RTU radio link

mylespetro

Member
Join Date
Dec 2015
Location
NS
Posts
740
Hey everyone,


Ran into a bit of an issue with a Modbus RTU radio link on a MicroLogix 1100. Just for context, we have a remote lift station with a CompactLogix doing the control, and we're writing the I/O status to the ML1100 using MSG instructions. I've checked the link there and it's working fine, I can see the I/O updating to match what's on the CPLX/HMI. The ML1100 is then plugged into a Bell 202 modem, which is then being polled from the main water treatment plant over radio, with a straight shot across the harbour, about 1.6km, I can see the antenna on the roof of the WTP standing at the lift station. EDIT: The radio link was set up by a contractor who handles all of the radio links for the municipality and he confirmed a good link, and set up the B202 for 1200 baud.


The SCADA/HMI system at the WTP is VTScada, and I've set up this new station where there was available spaces both in the polling sequence (#16) and node/station addresses (23). I do have the PLC set to be station 23 in the Modbus RTU setup on Channel 0. We were getting Modbus error code 517, which is a comms timeout error. Yesterday we realized that the radio guy just plugged the ML1100 serial cable into a gender changer and then put that into the RS232 port on the modem, so we put in a crossover cable. Once we did that, the chirp on the radio changed and the COMM0 indicator on the LCD display on the ML1100 flashed a couple times, and then again about 90 seconds later, which is the polling frequency of the SCADA system.


After changing the cable, I headed back to the WTP to check the comms in VTScada and we're still getting error code 517. I believe all of the SCADA comms are through a SCADANet B202 modem that is then connected to the PC through port COM6, which I've set as the port for our station as well. I've bench tested the application setup at my desk with identical settings to the deployed application and everything works, but that's using a USB-to-serial adapter on COM3 and then plugged into my own ML1100. I can toggle bits and adjust analogs and watch them change in VTScada with no issues, but the same thing deployed at the WTP (changed back to COM6) doesn't work.



It seems to me like the physical link is good, and that the PLC recognizes it's being polled but either data isn't being sent back or VTScada can't make the connection. Just kind of at a loss with where to go next, this is my first go at Modbus of any sort, as well as serial radio communications. I've worked with radios as an Ethernet bridge, which was super easy to set up, but this isn't working out the same way for me.


Just for info, I have the ML1100 set as follows:


Channel 0


Driver: Modbus RTU Slave
Baud: 1200
Parity: NONE
Node Address: 23

Modbus Data Table File Numbers:

Coils: 0
Contacts: 0
Input Registers: 0
Holding Registers: 9 (Not expanded)


Protocol Control:

Control Line: No Handshaking
InterChar. Timeout: 0
Pre Transmit Delay: 0
 
Last edited:
Modbus RTU is timing critical. The timing between characters and frames has a pretty tight tolerance. Some radio modems foul that up unless specifically designed to maintain this timing. With very small packets of data, you can sometimes get away with no problems even if the radio modem isn't specifically designed to maintain this timing. If the radio system is using Modbus RTU at other stations successfully, have a look at the details of these timing settings. There is sometimes a character spacing timing adjustment and/or a CTS delay that can be tweaked to improve performance. I would recommend using DF1 Radio protocol if the VTScada software supports it but that would mean all the nodes on that serial link would also need to support it.

I recall using some Micrologix with radio modems and Modbus RTU where we had to set the Pre-Transmit Delay to 20ms...I don't remember if we had to adjust the intercharacter timeout.
 
Last edited:
Modbus RTU is timing critical. The timing between characters and frames has a pretty tight tolerance. Some radio modems foul that up unless specifically designed to maintain this timing. With very small packets of data, you can sometimes get away with no problems even if the radio modem isn't specifically designed to maintain this timing. If the radio system is using Modbus RTU at other stations successfully, have a look at the details of these timing settings. There is sometimes a character spacing timing adjustment and/or a CTS delay that can be tweaked to improve performance. I would recommend using DF1 Radio protocol if the VTScada software supports it but that would mean all the nodes on that serial link would also need to support it.

I recall using some Micrologix with radio modems and Modbus RTU where we had to set the Pre-Transmit Delay to 20ms...I don't remember if we had to adjust the intercharacter timeout.

Yes I would normally have used the DF1 driver, but all of the existing nodes are using the “Modbus Compatible Device” driver and I didn’t want to risk messing up the existing comms so I just slotted ours into the existing sequence and matched their settings. I’ll see if I can get a copy of the program from an existing station, if they even use ML1100s. This was a new design by a different panel builder so it may be something completely different in the other panels.

Thanks!
 
May have figured something out, luckily I took some pictures of the dip switches on the 202 at the WTP, and it looks like it's set up for half-duplex communications. I'll try swapping the handshaking on the ML1100 to half-duplex and see if that makes it come to life.
 
Swapped the handshaking to half-duplex and no dice. When it’s set to no handshaking I can hear (through the radio) and see on the COMM0 indicator that the SCADA is polling the PLC 5 times, which is what the number of retries is set to in VTScada. When I set it to half-duplex, I didn’t see any polls come in at all. Obviously I’m still not sure what the issue is, I just checked the configuration switches on the remote 202 modem and it’s configured the same as the master 202.
 
For a bit more info, looks like the modems are set to 250ms RTS delay, not sure exactly how that affects my settings on the ML1100.
 
The remote radio is a Motorola CM200D, not exactly sure what the master radio is back at the plant.
 
So basically, the Bell 202 Modems are using the voice carrier of the Motorola radios to make a connection between each other. So here are a few things to look at.
• Is the radio making a connection to its master?
• Is the modem connected to the analog carrier connection of the radio?
• Is the modem configured correctly to communicate with its master?
o Is the modem a slave?
• You basically have two carriers that must be enabled and stabilized. This takes time which means you have to give it the time. This is what the RTS delay is for. So what happens is if you have the RTS delay set for 500mS, then when the PLC is ready to send its data the RTS line is raised which should activate the carrier on the modem and on the radio. 500mS later the data is sent on the serial port. Here is where you are going to have to do some sleuthing. You need to figure out how the radios carrier is enabled when the modem is ready to transmit. The modems carrier will be activated when the PLC raises the RTS line (assuming that it is all configured and connected correctly) but now you need the radios carrier enabled. It might be something the radio does on its own, the modems CTS line might be used to key up the radio, the RTS line might drive both the modems carrier as well as the radios. If I had to guess I’d say that the issue lies somewhere in that piece of the puzzle.
So what has to happen is;
• The PLC must raise the RTS line to enable the modems carrier.
• Somehow the radios carrier needs to be enabled (the radio needs to be keyed up).
• Enough time needs to be given for this to happen before the data from the PLC is sent.
• This process needs to happen going back the other way.
This is simpler than it sounds. Basically, a path needs to be created between the two RS232 devices. You are doing this with a set of Bell 202 modems (which uses voice band frequencies, 1200Hz and 2200Hz) communicating with each other via Motorola radios. I would start with figuring out how this is designed to work and then you can see what isn’t working.
 
• Is the radio making a connection to its master?


I believe it is, it chirps on and off and then about every 90 seconds (the polling rate of the driver in VTScada) it sounds like it starts trying to poll the ML1100 5 times (number of retries set in VTScada). As I've said above, I can also see activity on the COMM0 (serial) channel when these poll attempts come in.


• Is the modem connected to the analog carrier connection of the radio?


Again, everything would indicate that the two modems are talking. The various LEDs flash intermittently, and when what I assume are the attempts to poll the ML1100 start, the RD light lights up.


• Is the modem configured correctly to communicate with its master?


Seems like it, both modems have their configuration DIP switches set the exact same.


o Is the modem a slave?


I'm not exactly sure how to check this, I can only really tell settings from the DIP switches.


• You basically have two carriers that must be enabled and stabilized. This takes time which means you have to give it the time. This is what the RTS delay is for. So what happens is if you have the RTS delay set for 500mS, then when the PLC is ready to send its data the RTS line is raised which should activate the carrier on the modem and on the radio. 500mS later the data is sent on the serial port. Here is where you are going to have to do some sleuthing. You need to figure out how the radios carrier is enabled when the modem is ready to transmit. The modems carrier will be activated when the PLC raises the RTS line (assuming that it is all configured and connected correctly) but now you need the radios carrier enabled. It might be something the radio does on its own, the modems CTS line might be used to key up the radio, the RTS line might drive both the modems carrier as well as the radios. If I had to guess I’d say that the issue lies somewhere in that piece of the puzzle.
So what has to happen is;
• The PLC must raise the RTS line to enable the modems carrier.
• Somehow the radios carrier needs to be enabled (the radio needs to be keyed up).
• Enough time needs to be given for this to happen before the data from the PLC is sent.
• This process needs to happen going back the other way.
This is simpler than it sounds. Basically, a path needs to be created between the two RS232 devices. You are doing this with a set of Bell 202 modems (which uses voice band frequencies, 1200Hz and 2200Hz) communicating with each other via Motorola radios. I would start with figuring out how this is designed to work and then you can see what isn’t working.


This is what I'm trying to figure out, from the DIP switch settings, I have determined the following (both modems set the same way):


RTS/CTS Delay: 250ms
Carrier Detect Delay: 33ms
Carrier Loss Delay: 6ms
Anti-Streaming: None
Soft Carrier Turn-Off: 38ms
Clear-to-Send (CTS) Hold Time: 1ms
Radio Carrier Detect: Audio only
Duplex: Half duplex

I've tried a few different values (I am aware that the values are increments of 20ms) for RTS Off and Send Delay in the Channel 0 config of the ML1100, as well as Pre Transmit Delays as OkiePC mentioned, but nothing seems to do the trick.

Just to restate it, I do believe that the poll request is reaching the PLC, as I see the COMM0 indicator blink with each audible blip on the radio, but if so, something somewhere obviously doesn't line up, so I'm guessing the PLC isn't acknowledging/fulfilling the request for the data.


Thanks for the response, that's a lot of great info.
 
Last edited:
Hey everyone, just a little update on this. I managed to get out to an existing station and get the comms config from the ML1100 in that panel. It had the following settings on Channel 0:

Driver: Modbus RTU Slave
Node Address: 20
Baud: 1200
Parity: NONE

Control Line: Half Duplex Modem(RTS/CTS Handshaking)

InterChar. Timeout (x1 ms): 25
RTS Off Delay (x20 ms): 24 (480ms)
RTS Send Delay (x20 ms): 20 (400ms)
Pre Transmit Delay (x1 ms): 1


Another thing I noticed is that they're using a null modem cable between the ML1100 serial cable and the Bell 202 modem, whereas I had the ML1100 serial cable plugged into the B202 directly. Hopefully addressing the timing settings and the null modem cable will allow for communications back to the base station.
 
Back on site and I changed the timing settings to match the ones in my previous reply, and there’s also now a null modem adapter between the ML1100 serial cable and the modem. This causes the CTS modem line to come “ON” but the master still attempts to poll the PLC 5 times and then goes on down the polling sequence. When I hear the poll attempts come in, the COMM0 indicator on the PLC still lights up, and I see the RTS modem line go from “OFF” to “ON”. However it seems that there’s still something wrong because the connection times out in VTScada. At this point I’m kind of left scratching my head, I figured that duplicating the timing/delay settings of another station on the same network would solve it, but apparently not.
 
Using the 1761-PM-02 plugged into a null modem adapter which is plugged into the B202. I can’t really tell if the handshaking is happening, all I see is the RTS modem line on the ML1100 going ON and the CTS stays ON at all times.
 

Similar Topics

Hi everyone, I have to read some data via Modbus from a device that only has RS-232 ability. I purchased the 1763-NC01 cable but from what I am...
Replies
3
Views
1,340
Hi All, Just wondering if anyone can offer some help or point me in the right direction in regards to Modbus communications between a Micro820...
Replies
7
Views
5,207
Hello! Sorry with have some errors! I'm using micrologix 1100 powerflex 4M IHM, and I will do the temperature control using PID. I will...
Replies
0
Views
2,372
-Channel 0 as the modbus master port -8 slaves (Yaskawa VFD's) on a RS-485 multi-drop network -I can talk to the slaves (Yaskawa VFD's) through MD...
Replies
5
Views
9,820
HI I have 2 pf4m drives connected on modbus to my micro1100 all is working fine although i have noticed one thing.If you turn off the first drive...
Replies
3
Views
2,905
Back
Top Bottom