Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Bypass of "onlineapp.login"

jester
2014-08-21
2014-08-22
  • jester - 2014-08-21

    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 ?

     
  • Anonymous - 2014-08-22

    Originally created by: M.Schaber

    Hi, Jester,

    jester hat geschrieben:
    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).

     
  • jester - 2014-08-22

    Hello M. Schaber I tried it but to be honest I have problems about getting "the appropriate online information around locally" ? May you can post an example ?

     
  • Anonymous - 2014-08-22

    Originally created by: M.Schaber

    Hi, Jester,

    jester hat geschrieben:
    Hello M. Schaber I tried it but to be honest I have problems about getting "the appropriate online information around locally" ? May you can post an example ?

    This information is saved in files with the suffix .compileinfo, .bootinfo, .bootinfo_guids and similar files which are created near the .project file when you "generate code" or "login" with a project.

    They can also be included into project archives when you select "Download information files" in the dialog, and are usually included when you use "Source Upload" and "Source Download" features to store your project source on the PLC.

    I cannot send you any example for that, because those files are implicitly handled by CODESYS, whether you login interactively or with a script.

     

Log in to post a comment.