Test case R0006
Full test suiteDevice test case
TEMP vars in PROGRAM
This test case it part of the test suite proposed for new devices.
Test case ID: R0006
Language: ST
tests2/t0006.st
(* this program is to be run 3 times *)
PROGRAM T0006
VAR_EXTERNAL
_T_PARAMS : TEST_PARAMS;
END_VAR
VAR_TEMP
TX : INT := 100;
TY : INT ;
END_VAR
VAR
X : INT := 10;
Y : INT ; // counts the current execution cycle
END_VAR
_GEB_ASSERT_(_T_PARAMS.timestorun = 3);
TX := TX + 1; // 101
TY := TY + 1; // 1
X := X + 1; // 11 , 12 , 13 ...
Y := Y + 1; // 1 , 2 , 3 ...
IF _T_PARAMS.cycle = _T_PARAMS.timestorun THEN // last iteration
_GEB_ASSERT_(X = 13);
_GEB_ASSERT_(Y = 3);
_GEB_ASSERT_(TX = 101);
_GEB_ASSERT_(TY = 1);
END_IF;
END_PROGRAM


