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

Call from a Test script another script with parameters

Bakkertje
2015-12-03
2015-12-04
  • Bakkertje - 2015-12-03

    How can I call from a Main test script another (sub) script with parameters?
    For example to use some values from the main script in the sub script.
    I get message like:

    OR

    The next software is used: Codesys V3.5 SP7 Patch 2 and Test Manager 4.0.1.1.

    IMG: TestManagerScriptWithParameters.PNG

     
  • mkeller - 2015-12-04

    Hi Bakkertje.

    I guess the first error message is from a command like CompareVariable from TestManager.Monitoring. You need use curly brackets around the script variable otherwise the variable name is interpreted as normal string.

    For the second error message I see no obvious error in your parameters for the CALL.

    BTW: You don't need to add a parameter for the global variable because the global variable is also available there. Only REMOTE CALLs don't support parameters and global variables but we already have an improvement in our bug tracking system for it.

    BR
    Martin

     
  • Bakkertje - 2015-12-04

    Hi Martin,

    Thanks for your help. I see now that I can use Global parameters also in the sub script.
    But how can I use an "Input Parameter" insite the SubScript? For example "iVarTestInput3"
    I want to use it for a TestManager.Monitoring -> CompareVariable

     

Log in to post a comment.