how to check oisoft pi interface state?
State means interface is running or off mode, I want to do it in my .Net code.
The easiest way is probably to create a health point from PI-ICU for that interface. There is a "heartbeat" health point which will increment a counter while the interface is running (not to be confused with the heartbeat counters used for interface failover). In your code, you can then check whether this health point tag is updating or not - if it is, the interface is running, if not, the interface is offline or not reachable due to a network problem, for example.
You can use health points to check the interface status. Refer below live library for how to create health points.
Interface status can be obtained from Interface performance counters.
Device Status counter will show the connectivity between Interface and OPC/Source system.
I/O rate will shows the rate at which interface is collecting data.
State (Failover) will show the Primary/Secondary.
Uptime will provide how much interface is in running state.
Retrieving data ...