Checking online/offline status of client process on redundant server pair

Hi,

Using Citect 2016 (update 24) I have a redundant server pair and am starting the same Cicode task at startup on the client process of both servers. The task function sits in a WHILE (1) DO loop forever with a delay between executions.

There is a count increment in the task which I only want to be performed by ONE server if both are online.

If the task ran on an alarm, trend, IO or report server, I could use ServerIsOnline() to check the status of each server pair (primary and standby), but I can't find the equivalent to this for the client process.

Any suggestions on how best to do this?

Thanks

Ash

  • On the Client you could use IODeviceInfo("MyIODev",17) to find out which I/O server is the active server for a particular I/O Device and only count when the right server is active.
    To make this work, you need to define a redundant I/O device and make sure the I/O device name (and number) is equal for both servers.
  • Hi Patrick,
    Thanks for your reply. I'm not sure that's what I'm after as the task in question is not affected by any IO servers or IO devices.
    Anyway, not to worry, I've come up with a workaround which seems to work so I'm going with that!
    Thanks,
    Ash