Wired or, several runs

This test case it part of the test suite proposed for new devices.

Test case ID: R0265
Language: ST,LD

Code:
tests2/t0265.fbd
    <vars name="F1" datatype="BOOL" init="0"/>
    <vars name="F2" datatype="BOOL" init="0"/>
    <vars name="RF1" datatype="BOOL" type="EXTERNAL"/>
    <vars name="RF3" datatype="BOOL" type="EXTERNAL"/>
    <vars name="RFT1" datatype="BOOL" type="EXTERNAL"/>
    <vars name="RT1" datatype="BOOL" type="EXTERNAL"/>
    <vars name="RT2" datatype="BOOL" type="EXTERNAL"/>
    <vars name="T1" datatype="BOOL" init="1"/>
 (* graphical code omitted in this listing *)

tests2/t0265b.st


(* warning: this should run AFTER the graphical program *)
PROGRAM zzz_T0256
    VAR_GLOBAL
        RF1 ,RT1,RT2,RFT1 , RF3: BOOL ;
    END_VAR

    VAR_EXTERNAL 
        _T_PARAMS : TEST_PARAMS;
        END_VAR

(* should run twice (or more) *)

_GEB_ASSERT_(RF1 = FALSE);
_GEB_ASSERT_(RT1 = TRUE);
_GEB_ASSERT_(RT2 = TRUE);

IF _T_PARAMS.cycle > 1 THEN  
_GEB_ASSERT_(RFT1 = TRUE);
_GEB_ASSERT_(RF3 = FALSE);
ELSE
_GEB_ASSERT_(RFT1 = FALSE);
_GEB_ASSERT_(RF3 = TRUE);
END_IF;

END_PROGRAM