I am configuuring a Control Logix processor that will communicate over Ethernet to Flex I/O. I want to monitor the communications link and incorporate it in my control supervision scheme. Does anyone know how to do this; i.e. status bits, etc.
If you configure your flex-io in the IO tree, you get nessesary tags in your controller tags including the status bits.
I'm not sure if this is what you mean....?
I haven't done this with ethernet, but I have done it with ControlNet and I would expect it to be similar if not the same.
I have a GSV (Get System Variable) with ClassName = Module, InstanceName = name of my controlnet node, AttributeName = FaultCode, Destination = name of a Status DINT. If that DINT == 0, then the link is Okay.
My standard method is similar to the one hd_coop described; I run a routine every half-second or so that checks the EntryStatus value of the Module object for each remote connection using a GSV instruction.
The significant part of the EntryStatus (a 16-bit INT value) is bits 12-15, so I divide the value by 4095 to perform an effective 12-bit-shift. The value for a running connection is "4", while a faulted connection will cycle between 7, 3, and 1 as it faults and tries to reconnect. I often then use a single indicator BOOL to use for HMI or other logic to show that the connection is faulted.
With FLEX and POINT there is also a Status word in the Module-Defined Tag that includes a status bit for each module that can be connected. When the connection to the 1794-AENT itself fails, the controller sets all those bits true so the value of the Status word is -1. That's a quick and easy way to monitor the status of a FLEX or POINT adapter without resorting to running extra logic.