Comms issues with ModBus On Redlion

cross1284

Member
Join Date
Jun 2011
Location
orange, ct
Posts
5
I have a tough problem. I am communication with potentially dozens of units over a modbus network. In my G3 software i am trying to poll information from a minimum amount of units at a time because it seems as though if the G3 tried to communicate with all of the units continously there are communication issues and extremely long wait times. Another problem related is that if one of the devices that is referenced in a custom program that is not available, either the unit is disabled or not connected/powered on, the program refuses to run. I deduce that this is because the G3 reads all the addresses before executing the code and then inserts the appropriate data in the code. If the information is not available it cant run the program. Read then Run anyway won't work for my application as this seems to attempt to read the addresses continually also, which is what im trying to avoid. I am now trying a tactic to set a flag for a specific unit inside of a program, then run another program when that flag is set. This seems to remove the pre-caching issue that the G3 does for its programs. How does this sound? Any ideas?


**Forgot to mention i am trying to disable and enable the plc devices as needed. It seems as though if i disable a device from the Comms window i can not enable it in software. And if i do have it enabled in Comms, if i disable it in software, i cant re-enable it.
 
Last edited:
I had the same problem using G306 HMI.

I ended up writing my own Modbus ASCII comm routines to build the
correct command strings, and handle send and receive.

Set up an array of Boolean flags to indicate that an ID# was online, and would only talk to it if available.

Seems to work OK, sometimes have a dropout (9600 baud may be the problem)
 
yeah, seems as though the HMI's collect the data before its referenced in the program. Found a way around this. If the unavailable registers are called in a seperate program instead of all in one program, the program calls seem to not be called the same way the main program wouldnt be called if it had unavailable registers in it. This makes it extremely annoying when trying to monitor several dozen units, that may break communications as part of their function.
 
yeah, seems as though the HMI's collect the data before its referenced in the program. Found a way around this. If the unavailable registers are called in a seperate program instead of all in one program, the program calls seem to not be called the same way the main program wouldnt be called if it had unavailable registers in it. This makes it extremely annoying when trying to monitor several dozen units, that may break communications as part of their function.

There is a program option that you can set that handle how the program responds if it doesn't get the data. In the Program Properties tab choose "Read but Run Anyway"
 
There is a program option that you can set that handle how the program responds if it doesn't get the data. In the Program Properties tab choose "Read but Run Anyway"

I would have used that option, but it reads all data all the time. Potentially I will be reading over a dozen data items, strings included, from up to 209 units in the field. If all of them were communicating at once the update rate would be horribly slow. Considering i need to see accurate live data on screen i cant wait 5 minutes for new info.
 
I would have used that option, but it reads all data all the time. Potentially I will be reading over a dozen data items, strings included, from up to 209 units in the field. If all of them were communicating at once the update rate would be horribly slow. Considering i need to see accurate live data on screen i cant wait 5 minutes for new info.

If you don't want to read the data all the time, break up your programs and call them when you want to read the data and operate on them.

You could call the program only when the current screen includes data that is covered by the program. You could call the program by the ON TICK event of the page. You can also prevent it from running every tick with a little programming using internal tags and reading the current second of the RTC.

I would also consider adding a second comms card to your devie and break up your field network in two pieces.
 
Last edited:

Similar Topics

I have been trying to add a button to an HMI Panelview version 5.1 for a couple days. Each time I download I get no data in my buttons, only...
Replies
0
Views
193
Hi Guys, I am getting intermittent comms drops on my ControlLogix PLCs (every couple of days). I am using an AOI which triggers a transaction...
Replies
0
Views
1,153
At our facility we have some strange behavior from one of our ControlLogix PLCs. It runs three palletizers. We have had some rare but very...
Replies
3
Views
1,578
Hey All, Got a comms issue that's puzzling me.... Got two identical machines, each had a MicroLogix 1000, and since the ML1000 is now deemed EOL...
Replies
15
Views
4,451
Hey guys, I have probably gone through 3 different forums looking every type of answer anywhere close to what I have, and I just cannot find a...
Replies
5
Views
1,943
Back
Top Bottom