To stop the plc while staying logged in, I need to use the <onlineapp>.stop(). The problem is that I'm not able to keep the declaration of the <onlineapp> to a next run of the script. So, I want to "ask the scriptEngine what online application is existing now"? How could I program for this question knowing that there is nothing as <active_online_application> in the scriptEngine help?
ScriptEngine has no need to remember which online application exists because it is not necessary. Just create a new online application and check if it is logged in. If not, login and stop the running app.
Check out the CODESYS store: http://store.codesys.com/CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions