Just as our Modbus devices offer ability to monitor the slaves they are polling, you can also monitor the health of the HART Multidrop slaves that you're polling.
Fixed HART Devices
To monitor the health of any Fixed HART device is very simple. You look for the tag
PLX51HART4IN.Input.FixAddrData.Ch0_DeviceStatus which contains various status about the device itself. It contains tags such as...
PLX51HART4IN.Input.FixAddrData.Ch0_DeviceStatus.LoopOpen and PLX51HART4IN.Input.FixAddrData.Ch0_DeviceStatus.CurrentUnderrange, but most importantly, it contains PLX51HART4IN.Input.FixAddrData.Ch0_DeviceStatus.HARTCommsFault.
That is the tag you would want to monitor for each of your fixed HART devices.
Note: You can look at the tag PLX51HART4IN.Input.FixAddrData.Ch0_HARTStatus for more detailed information about the status of the Fixed HART device, and what might be wrong with it.
Multidrop Device Monitoring
To monitor the Multidrop devices on each channel is just as simple as monitoring for Fixed HART devices. First, you consider the tags that you've mapped the devices to. In this example, the first multidrop device on channel 0, is mapped to PLX51HART4IN.MultiDrop[0]. If you monitor the tag PLX51HART4IN.MultiDrop[0].PollStatus.0 you will notice that it will be a 1, when the device is polling, and a 0 when it is not...for any reason.
Legacy Polling
If you using Legacy polling on your Multidrop, you can check the tag PLX51HART4IN.LegacyPolling[x].Auto_Poll_CMD_Status.0, where the same applies. Bit 0 will be a 1 when we're polling, and 0 otherwise.
Monitor the Health of the PLX51-HART Module
Monitoring the module itself for health is simple. The method below assumes you've added the module into your I/O tree. If you have not, or the module is serving multiple PLCs, contact Larry Frieson at ProSoft Tech Support for information on how to monitor the health of a PLX51 from multiple PLCs. To monitor the health and state of the PLX51-HART in a PLC where the module is in the I/O tree, first create two new tags. The first, call it HARTEntryStatus, and make sure it is of INT data type. Next, create a HARTFaulted tag, and in the Alias To field, type in HARTEntryStatus.12. This will make the data type a BOOL, and give us a single flag to tell us if we're faulted or not.
Note: You can also create an Alias Tag to Bit 14, which is the RUNNING tag, but then you'd have to flip the logic, where this wouldn't be a HARTFaulted tag, but rather a HARTRunning Tag.
Next, we need to go to the HART ladder, where the PLX51 sample ladder was imported. We need to add a rung there.
In the ladder rung entry box, type in: GSV Module HART4I EntryStatus HARTEntryStatus
Then, accept the rung edits, and finalize all changes.
You'll see that our HARTEntryStatus tag is now reading 16384, which means the module is running. (Bit 14 is ON.)
Unplug the Ethernet cable from the PLX51, or pull the power connector....
We can clearly see our HARTFaulted bit is now 1. Reconnect it, and you'll see that value change back to 0.
Note: There are several values that the HARTEntryStatus can be, and they will change as RSLogix attempts to reconnect to the module. Below is a list of the flags and what they mean.
Value (Hex) | Bit Numbers | Description |
---|---|---|
16#0000 |
.0 |
Standby: the controller is powering up. |
16#1000 |
.12 |
Faulted: any of the MODULE object’s connections to the associated module fail. You can also test for Running state (16#4000), then checking the FaultCode not equal to 0. Using this bit is easier, but note that it may leave the faulted state briefly, as the processor tries to reconnect to it. |
16#2000 |
.13 |
Validating: the MODULE object is verifying MODULE object integrity prior to establishing connections to the module. |
16#3000 |
.12 |
Connecting: the MODULE object is initiating connections to the module. |
16#4000 |
.14 |
Running: all connections to the module are established and data is successfully transferring. |
16#5000 |
.12 |
Shutting down: the MODULE object is in the process of shutting down all connections to the module. |
16#6000 |
.13 |
Inhibited: the MODULE object is inhibited (the inhibit bit in the Mode attribute is set). |
16#7000 |
.12 |
Waiting: the parent MODULE object upon which this MODULE object depends is not running. |