diff --git a/solution/tc_project_app/Test/common/FB_tcUNIT_common.TcPOU b/solution/tc_project_app/Test/common/FB_tcUNIT_common.TcPOU index fa2a214..887ef5a 100644 --- a/solution/tc_project_app/Test/common/FB_tcUNIT_common.TcPOU +++ b/solution/tc_project_app/Test/common/FB_tcUNIT_common.TcPOU @@ -5,6 +5,7 @@ FUNCTION_BLOCK FB_tcUNIT_common VAR + END_VAR]]> @@ -12,7 +13,7 @@ END_VAR]]> @@ -21,7 +22,7 @@ END_VAR]]> @@ -31,7 +32,7 @@ END_VAR]]> of the axis within GVL.aAxes[] to test against. + iTargetAxis: UINT := 1; // The of the axis within GVL.aAxes[] to test against. END_VAR]]> @@ -96,7 +97,7 @@ END_VAR]]> ExpectedResult := tcUNIT_gvl.fDEFAULT_TARGET_ACCELERATION; fbCommon.mPrepareDefaultMove(iTargetAxis); -Result := GVL.aAxes[1].stConfig.fAcceleration; +Result := GVL.aAxes[iTargetAxis].stConfig.fAcceleration; AssertEquals(Expected := ExpectedResult, Actual := Result, @@ -110,6 +111,7 @@ TEST_FINISHED();]]> VAR Result: BOOL; ExpectedResult: BOOL; + nCycle: UINT; nMaxCycles: UINT := 30; END_VAR]]> @@ -119,7 +121,7 @@ END_VAR]]> // example of test that requires multiple cycles to complete. Due to stateful behaviour of the axis structure. ExpectedResult := TRUE; -GVL.aAxes[1].stControl.bEnable := ExpectedResult; +GVL.aAxes[iTargetAxis].stControl.bEnable := ExpectedResult; Result := GVL.aAxes[iTargetAxis].stStatus.bEnabled; @@ -167,7 +169,7 @@ AssertEquals_LREAL(Expected := ExpectedResult, VAR Result: BOOL; ExpectedResult: BOOL; - + nCycle: UINT; nMaxCycles: UINT := 30; END_VAR]]> diff --git a/solution/tc_project_app/Test/standard_library_tests/tcUNIT_STD_LIB_RUN.TcPOU b/solution/tc_project_app/Test/standard_library_tests/tcUNIT_STD_LIB_RUN.TcPOU index e7cb079..55deaca 100644 --- a/solution/tc_project_app/Test/standard_library_tests/tcUNIT_STD_LIB_RUN.TcPOU +++ b/solution/tc_project_app/Test/standard_library_tests/tcUNIT_STD_LIB_RUN.TcPOU @@ -5,7 +5,7 @@ PROGRAM tcUNIT_STD_LIB_RUN VAR // Declare standard library POU tests to be run - fbFB_Axis: FB_Axis_TEST; + fbAxisTest: FB_Axis_TEST; END_VAR]]>