Test case R0091
Full test suiteDevice test case
BOOL_EDGE type in user defined FB
This test case it part of the test suite proposed for new devices.
Test case ID: R0091
Language: ST
tests2/t0091.stFUNCTION_BLOCK FBA_R0091 VAR_INPUT br : BOOL R_EDGE; // raising edge bf : BOOL F_EDGE; // falling edge END_VAR VAR_OUTPUT of, or : BOOL; END_VAR VAR END_VAR or := br; // copies value from raising edge of := bf; // copies value from falling edge END_FUNCTION_BLOCK PROGRAM TEST_R0091 VAR a, b ,c: FBA_R0091 ; END_VAR a( br := FALSE, bf := FALSE); a( br := TRUE, bf := TRUE); a( br := TRUE, bf := FALSE); // falling edge in bf : or=false of=true b( br := TRUE , bf := FALSE); b( br := FALSE, bf:= TRUE); b( br := TRUE, bf:= TRUE); // raising edge in br : or=true of=false c( br := FALSE, bf := FALSE); c( br := TRUE); // raising edge in br c( bf := TRUE); // raising edge in bf : br keeps input: false or=false of=false _GEB_ASSERT_(a.bf=1); _GEB_ASSERT_(a.br=0); _GEB_ASSERT_(a.of=1); _GEB_ASSERT_(a.or=0); _GEB_ASSERT_(b.bf=0); _GEB_ASSERT_(b.br=1); _GEB_ASSERT_(b.of=0); _GEB_ASSERT_(b.or=1); _GEB_ASSERT_(c.bf=0); _GEB_ASSERT_(c.br=0); _GEB_ASSERT_(c.of=0); _GEB_ASSERT_(c.or=0); END_PROGRAM