Test case R1020
Full test suiteDevice test case
Time : sleep
This test case it part of the test suite proposed for new devices.
Test case ID: R1020
Language: ST
tests2/t1020.st(* sleeps 615 secs *) PROGRAM T1020 VAR dt1,dt2:DT; t1,t2 : TIME; s1,s2 : STRING; r1,r2 : LREAL; f1,f2 : REAL; d1 : DINT; cont : INT; END_VAR cont := cont +1; dt1 := _GEB_NOW_TIMESTAMP(1); _GEB_SLEEP_MSECS_(615); t1 := _GEB_ELAPSED_TIME(dt1); // _GEB_MSG_(TIME_TO_STRING(t1)); r1 := TIME_TO_LREAL(t1); f1 := TIME_TO_REAL(t1); d1 := TIME_TO_DINT(t1); _GEB_ASSERT_(r1 > 600.0 AND r1 < 630.0 ); _GEB_MSG_(LREAL_TO_STRING(r1)); _GEB_ASSERT_EQDOUBLE_(r1,f1); _GEB_ASSERT_(REAL_TO_INT(f1) = d1); s1 := LREAL_TO_STRING( f1); END_PROGRAM PROGRAM AAA_WARMUP VAR X:INT; END_VAR _GEB_SLEEP_MSECS_(2); END_PROGRAM