AlfredoQuintero
Lifetime Supporting Member
Hello: Working on a program that needs to read some data from other Rockwell PLCs. Every second my program sends "CIP Data Table Read" command and I get the expected data from the other side. I want to have a quality bit for this communication, in case there is a problem on the other side. But if I unplug the LAN cable of the other PLC, I cannot see any error in the MSG instruction. The ERR register is zero and the ER bit is always false. The only difference with the state in which the other PLC is communicating normally is that when the cable is unplugged the .EN bit is always true, whereas during normal communication the .DN and .EN bit alternate from true to false regularly.
Trying to think how to program a quality bit for the validity of the data in the destination of the MSG instruction. Something like "if the MSG instruction's .DN does not transition from false to true within X time, or if the .ER bit is true, the quality of the data in the destination tag is bad."
Is there a better way to do this and the above idea is completely stupid?
Note, at the moment I am thinking of MSG instruction because this is an application to get data from PLCs already in operation and it is not feasible to change the program in the PLCs in the factory floor, so it has to be something that is retrofitted to the plant without changes to the running PLCs, reason why I am not contemplating connected communications.
Another possibility I am entertaining would be to read some system variable that changes constantly on the other PLC, like getting some GSV wall clock info or something, however I have never done this on a remote PLC. So this is my plan B if I cannot find a solution only with MSG.
edit: Since I also would need to tell if the PLC is in fault state, I will have to figure out the way to send the GSV, I guess.
Thanks for reading down to this point.
Trying to think how to program a quality bit for the validity of the data in the destination of the MSG instruction. Something like "if the MSG instruction's .DN does not transition from false to true within X time, or if the .ER bit is true, the quality of the data in the destination tag is bad."
Is there a better way to do this and the above idea is completely stupid?
Note, at the moment I am thinking of MSG instruction because this is an application to get data from PLCs already in operation and it is not feasible to change the program in the PLCs in the factory floor, so it has to be something that is retrofitted to the plant without changes to the running PLCs, reason why I am not contemplating connected communications.
Another possibility I am entertaining would be to read some system variable that changes constantly on the other PLC, like getting some GSV wall clock info or something, however I have never done this on a remote PLC. So this is my plan B if I cannot find a solution only with MSG.
edit: Since I also would need to tell if the PLC is in fault state, I will have to figure out the way to send the GSV, I guess.
Thanks for reading down to this point.
Last edited: