GoToStep

GoToStep 1:

As described in the chapter FB_TestCaseBase, there are internal variables that can be used during the implementation of test cases. Among other things, the variable nCurStep is used as a status variable for a “Case” construct, which can be used to structure test cases in the form of a state machine. The method GoToStep sets the value of the status variable nCurStep to the value passed to it. This means that in the next iteration of the “Case” construct, you will jump to exactly this step. If a different status variable is to be used, this method must be overridden when needed.

Syntax

METHOD GoToStep
VAR_INPUT
    step : UDINT; // target step
END_VAR

GoToStep 2: Inputs

Name

Type

Description

Step

UDINT

Sets the current state of the state machine to this value.