Knowledge Base
Showing results for 
Search instead for 
Did you mean: 

How to write a program to monitor if a standalone CyberStation is offline?


Using the SendMail function in the NC2 and ACX2 to know if CyberStation is shut down would be a nice feature.



NC2, CX9680, bCX4040, bCX9640, ACX5720, ACX5740


When a standalone CyberStation is not monitored 24x7 and it is emailing critical alarms or pulling extended logs, it is important that it remains up and running as much as possible. How can the newer controllers' email capability be used to add this functionality.


The SendEmail function can be used for this purpose.

  1. Set up the bCX via the "Email setup" controller webpage. This will require at least one Outgoing SMTP Server be accessible to your controller.
  2. The workstation commstatus is not a supported function within Plain English (although it may appear to compile in a program), so the workaround is to write a workstation program that sets a numeric in the controller on fixed timeframe. An InfinityProgram in the controller can monitor that numeric value and send the email if the value is not updated.
  3. Here are two sample programs for your use that provide a starting point for this application:

'Fallthru program in CX triggered by minute which sends an email every 30 minutes while the workstation is offline
'Note: Set (Minute-Heartbeat) long enough for a CyberStation reboot/restart to avoid false alarms on an intentional shutdown. 

If Minute = 10 and (Minute - WSHeartbeat) > 4 then goto Sending
If Minute = 25 and (Minute - WSHeartbeat) > 4 then goto Sending
If Minute = 40 and (Minute - WSHeartbeat) > 4 then goto Sending
If Minute = 55 and (Minute - WSHeartbeat) > 4 then goto Sending

SendEmail('theemailaddresshere', Date, 'CyberStation is offline')
Goto Wait30m

If TM < 29 then goto Wait30m

If TS > 60 then Goto Checking
'Looping, autostart program in workstation

If TS > 29 then goto SetRemoteFlag

MyNetwork\My_bCX\WSHeartbeat = Minute
Goto Wait30s

If TS > 2 then goto Wait30s

Note: For LAN Systems a workstation can monitor the other workstations using the CommStatus attribute.

Tags (1)
Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎2018-09-06 01:04 PM
Updated by: