V0N_hydro
Member
I have two PLCs connected by gigabit ethernet over fibre, PLC0 has NOE0100 ethernet module IOscanning PLC4 with 100ms repetitive rate. both are BMX P34 2020 CPU programmed with unity 6.0.
PLC4 detects conditions which are then latched in PLC4, the output of the latches are packed in to a word using BIT_TO_WORD, PLC0 IO scanner reads the word, and in PLC0 the bits are written back to bools using WORD_TO_BIT so PLC0 can take the appropriate action based on which bits are true.
I have been treating this process as if it were a wire - what goes in one end comes out the other - but I have found that the bits have been SET in the PLC0 without being latched in PLC4. nothing writes to the bits in PLC0 except the WORD_TO_BIT block.
I have verified the bits have been received in PLC0 without being sent from PLC4 by creating a latch for each bit in PLC0 - if it is ever set then the latch in PLC4 should have been set as well. I have found the latches set in PLC0 without being set in PLC4.
I know this error has happened at least twice in the past 2 months as it has caused nuisance shutdowns.
as a temporary remedy I have added delay prior to taking any action based on the received bits in PLC0 so that if the bit is set for a single 100ms IO scan cycle it doesn't kick off an undesired sequence of events.
In the past three months there has only been "no comms" status from the IO scanner a few times for less than a second each time, usually which coincides with building-on-line changes of the plc program, so it isn't an intermittent ethernet connection.
Has anyone ever experienced invalid or erroneous data being received on modbus TCP? The only time I have seen anything like that was multi drop modbus serial with multiple masters ( i know this is a terrible design and they moved away from it eventually) sometimes a messages can get mixed up and a master receives a response to the wrong request.
I suppose any modbus master on the ethernet network could connect to PLC0 and SET the bit as well by issuing a write coil or writing to the word itself with write holding register modbus command.
thanks for any ideas on similar problems encountered or for further troubleshooting to confirm how these bits are getting set
PLC4 detects conditions which are then latched in PLC4, the output of the latches are packed in to a word using BIT_TO_WORD, PLC0 IO scanner reads the word, and in PLC0 the bits are written back to bools using WORD_TO_BIT so PLC0 can take the appropriate action based on which bits are true.
I have been treating this process as if it were a wire - what goes in one end comes out the other - but I have found that the bits have been SET in the PLC0 without being latched in PLC4. nothing writes to the bits in PLC0 except the WORD_TO_BIT block.
I have verified the bits have been received in PLC0 without being sent from PLC4 by creating a latch for each bit in PLC0 - if it is ever set then the latch in PLC4 should have been set as well. I have found the latches set in PLC0 without being set in PLC4.
I know this error has happened at least twice in the past 2 months as it has caused nuisance shutdowns.
as a temporary remedy I have added delay prior to taking any action based on the received bits in PLC0 so that if the bit is set for a single 100ms IO scan cycle it doesn't kick off an undesired sequence of events.
In the past three months there has only been "no comms" status from the IO scanner a few times for less than a second each time, usually which coincides with building-on-line changes of the plc program, so it isn't an intermittent ethernet connection.
Has anyone ever experienced invalid or erroneous data being received on modbus TCP? The only time I have seen anything like that was multi drop modbus serial with multiple masters ( i know this is a terrible design and they moved away from it eventually) sometimes a messages can get mixed up and a master receives a response to the wrong request.
I suppose any modbus master on the ethernet network could connect to PLC0 and SET the bit as well by issuing a write coil or writing to the word itself with write holding register modbus command.
thanks for any ideas on similar problems encountered or for further troubleshooting to confirm how these bits are getting set