Test case R0113
Full test suiteDevice test case
FB/function informal calls, with OUT arguments
This test case it part of the test suite proposed for new devices.
Test case ID: R0113
Language: ST
tests2/t0113.stFUNCTION F1_R0113 : BOOL VAR_INPUT i1, i2, i3 : INT; END_VAR VAR_OUTPUT o1, o2 : BOOL; END_VAR o1 := i2 > i1; o2 := i3 > i2; F1_R0113 := o1 XOR o2; END_FUNCTION FUNCTION_BLOCK FB1_R0113 VAR_INPUT i1, i2, i3 : INT; END_VAR VAR_OUTPUT o1, o2 : BOOL; END_VAR o1 := i2 > i1; o2 := i3 > i2; END_FUNCTION_BLOCK PROGRAM R0113 VAR fbx1 : FB1_R0113; i,ii,iii : INT; fo, foo, ff, fbo,fboo: BOOL; END_VAR i := 1; ii := 3; iii := 2; (* fbx1(i, ii, iii, fbo, fboo); not allowed now *) fbx1(i1:=i, i2:= ii, i3:=iii, o1=>fbo, o2=>fboo); (* not allowed now *) ff := F1_R0113(i, ii, iii, fo, foo); _GEB_ASSERT_(fbo = 1); _GEB_ASSERT_(fboo = 0); _GEB_ASSERT_(ff = 1); _GEB_ASSERT_(fo = 1); _GEB_ASSERT_(foo = 0); END_PROGRAM