Modbus coil (?) not changing state, CompactLogix L3

schexb

Member
Join Date
Nov 2019
Location
Washington
Posts
1
Going to preface this by saying I am a complete modbus newbie, so apologies if my terminology is off...


We have a Prosoft PLX31-EIP-MBTCP modbus module set up to communicate with our CompactLogix PLC (5069-L310ER). There is an external service associated with one of our manufacturing processes that writes a heartbeat to one of the coils on the PLX module, and then reads the same coil. Problem was the heartbeat wasn't.... beating. On a call w/ our IT and the external company's service tech, we confirmed the connection is good, they can see our PLC, etc - but the heartbeat kept failing, and we weren't seeing the bit flip in the PLC. The issue was resolved when we picked a higher numbered coil and it started flipping on and off as expected.


First thing I did was cross reference the PLX tag to see if it was used anywhere else in the PLC, which it wasn't. Soooo questions:

  1. I am familiar with messages - is it possible there could be a message somewhere else overwriting this? Could I even - in theory - use a message to overwrite this specific tag?
  2. Regardless of the answer above - is it possible to see message's being written to a PLC without knowing where they are coming from or what they might be writing to?
  3. If it's not a message, where else might make sense to look?


Thanks in advance!
 
Modbus can't get down to the individual bit level. The smallest increment it can read or write is one byte. If there is another command writing to a bit within the same byte as the heartbeat bit, that command could be overwriting what the heartbeat routine does.That can explain why it got better when you switched to to different address
 
I can't speak to the Allen Bradley or Prosoft concerns but Modbus is certainly capable of writing to the bit level with 'Coil' (0x or %M) memory. It can turn a single bit or a group of bits on or off depending on what function code is used and what function codes the devices support.

Modbus can change a single bit in 'Holding Register' (4x or %MW) memory IF the devices do a read-modify-write sequence. This is usually a bad idea. Ideally they use the 'Masked Write' function code to change a bit or bits in a holding register.

I'm not aware of any Modbus data commands that work specifically at the byte level. The packets may contain a byte count but odd numbered byte counts for partial holding registers would not be standard Modbus.

It looks like you'll need to investigate what function codes you are sending to the Prosoft and what codes it and the AB can work with. Everything along the chain must be onboard with what you are doing.
 

Similar Topics

Hi, I have never used modbus communication in Codesys 2.3, any tips and tricks are much appreciated. The system is a Wago 750-881 that controls...
Replies
3
Views
1,860
Hi there, I’m in the process of using an iPad as an HMI to communicate with a Schneider Modicon M221 over ethernet. I’m using Libmod with a Swift...
Replies
1
Views
2,810
Hi, I'm trying to get the coil info trough modbus but when the MSG instruction is set, I get the error: Invalid Local Adress - Modbus command...
Replies
1
Views
2,403
Hi folks, I have a Controllogix in communication with a zigbee coordinator using Logix AIO for modbus tcp. This zigbee coordinator have 3 slaves...
Replies
0
Views
45
Hi, I'm setting up a modbus master on an S7-300. It seems to work in OB1 but not when I use it in OB35. Does anyone have any ideas why? Could...
Replies
10
Views
86
Back
Top Bottom