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

Use a Global Constant as timeout value in Test Action

Bakkertje
2015-11-27
2015-11-27
  • Bakkertje - 2015-11-27

    Hi All,

    How can I use a Global Constant as timeout value in Test Script?
    I have a Test Action, with a TestManager.Monitoring CompareVariable command and there I must specify a Timeout value. This value is different when I test on the Hardware or on the SoftPLC.
    Now I set "$GLOBALS.iTimeout" which I set as Assignment at top of the Test script.
    But when the test run I get the error: "Required parameter should be a value of an integer type"

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

     
  • mkeller - 2015-11-27

    Hi Bakkertje.

    If you want to use variables in input fields of the test action you have to use the placeholder syntax. There are only a few special input fields which accept the name of a parameter without the curly brackets.

    In your case you have to write the following text: {$GLOBALS.iTimeout}

    Important: Global variables of the parent test script are not available in the "REMOTE CALL"-ed test script.

    BR
    Martin

     
  • Bakkertje - 2015-11-27

    Hi Martin,

    That works. Thanks

     

Log in to post a comment.