FB_TestCaseBasePrep

FB_TestCaseBasePrep 1:

FB_TestCaseBasePrep is an extension of FB_TestCaseBase. When instantiating this function block, you can specify a function block of the type FB_TestPrepBase. This makes it possible to move the steps into a separate function block in order to reach the operating point of a test case. It offers virtually the same methods for detecting errors to determine whether errors occur even before a test case reaches its operating point.

Example of how to use or assign a preparation step to a test case:

Declaration of the test case using the extended test case class FB_TestCaseBasePrep:

FUNCTION_BLOCK FB_TestCase1 EXTENDS FB_TestCaseBasePre

Declaration of the preparation step:

FUNCTION_BLOCK FB_ TestCasePrep1 EXTENDS FB_TestPrepBase

Instantiation in the declaration part of the test program's main POU:

    fbPreperation    : FB_TestCasePrep1;
    fbTestCase       : FB_TestCase1(fbPreperation);