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.
- Set up the bCX via the "Email setup" controller webpage. This will require at least one Outgoing SMTP Server be accessible to your controller.
- 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.
- 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')
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
If TS > 2 then goto Wait30s
Note: For LAN Systems a workstation can monitor the other workstations using the CommStatus attribute.