illop Posted January 20, 2017 Share Posted January 20, 2017 Hi, All I want to know status of C-applications(capp1).. in PowerPMAC (Stop or Running) How can monitoring in plc program or bgcplc..? Thanks Link to comment Share on other sites More sharing options...
Alex Anikstein Posted January 20, 2017 Share Posted January 20, 2017 UserAlgo.BgCplc[i] will be set to 1 if C PLC i is enabled and 0 if it is disabled. UserAlgo.RtiCplc will determine if the foreground C PLC is enabled. Edit: This works for C PLCs, not for C Applications--I misread. Link to comment Share on other sites More sharing options...
Clopedandle Posted January 20, 2017 Share Posted January 20, 2017 For background C applications, there is no "easy" way to know. You can technically issue the "top" command to the system shell: system "top" and then parse the response to see if your program is listed (e.g. capp1.out). Top is a Linux command that shows running processes: http://www.tecmint.com/12-top-command-examples-in-linux/ There might be a cuter Linux command out there, but I am not an expert on it. It is much easier, though, to put a global variable that increments as the program runs, for example, and then just check if that variable is incrementing to verify that the program is running. Link to comment Share on other sites More sharing options...
Recommended Posts