Sometimes I want to run a script whereas the application is already present (and running) on the PLC. Especially by testing different scripts for the same application the "login sequence" takes a "a lot" of time. How can I anyway use functions like "onelineapp.read_value..." without execute "onlineapp = online_create..." ? Mabye there is another command available ?
You cannot read values from the application without first connecting to the device. The login() method is what you use to connect to the device. It works exatlys the same when you login interactively with the codesys UI: The monitoring in the POU editors only works when you're connected / logged in to the application.
When the exact same application is already running on the PLC, and you have the appropriate online information around locally (for example from the project archive), the login will just login without any download or online change, so the runnint application is not disturbed.
If you want a way which is more independent of the concrete compilation of the application, you should look into the SymbolConfiguration object and access it via OPC / OPC UA or PLCHandler.
OPC support is available in CODESYS V3 since ever (and also works with V2). OPC UA support is available as a preview in V3.5 SP5, and the release is planned for SP6. PLCHandler is an extra product which contains our communication stack as a native library (sharing codebase with our runtime and gateway).
Check out the CODESYS store: http://store.codesys.com/CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions