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

Logic AND test

SaSystem
2015-10-01
2015-10-01
  • SaSystem - 2015-10-01

    Hi,

    I created a simple project in ST that make a logic AND (c:=a AND b).
    I'd like to test the four combination of entry variable verifying the correct exit values. (Like a truth table).
    How I can do it with Test Manager?

    Thanks

     
  • mkeller - 2015-10-01

    Hi SaSystem.

    You have the following options:
    Use the test actions for the monitoring, see TestManager.Monitoring
    Use the ScriptEngine and write a small python script which is execute with ExecuteScript from TestManager.Scripting
    * Create an IEC Unit Test and execute it with the IecUnitTest element of the Test Manager

    The Test Manager comes with examples for the first and third option. The project files are in the directory "c:\ProgramData\CODESYS Test Manager" and the test scripts are installed in the test repository "Default Test Repository". Take a look.

    We are currently implementing something like a truth table for the Test Manager but there is no release date defined yet.

    BR
    Martin

     
  • SaSystem - 2015-10-01

    Hi,

    I tried the third way but it shows me that it can't find the POU. How I can resolve it?

    P.S. I set a Load Project Action before launch the IECTest.

    Thanks

     
  • mkeller - 2015-10-01

    Hi SaSystem.

    SaSystem hat geschrieben:
    I tried the third way but it shows me that it can't find the POU. How I can resolve it?

    The Test Manager searches FBs and programs which have the attribute 'test'.

    {attribute 'test'}
    

    Search the online help for "IEC Unit Test" and select the result "Editor IEC Unit Test".

    SaSystem hat geschrieben:
    P.S. I set a Load Project Action before launch the IECTest.

    That's okay. While developing an IEC Unit test you can use a test script, which only contains the IecUnitTest element, because the project is already loaded and configured for a PLC.

    BR
    Martin

     

Log in to post a comment.