ScriptName "delay" ScriptAuthor "(dA)" ScriptVersion "[1]" SetErrorHandler ( : AddressLable1 ) ; var vb_error : Byte ; // V1.0 17.07.02 create example // V1.1 24.10.02 SetErrorHandler included // Delay ( Const Time=1000 ) ; // Execution of the actual script is delayed for given time. // The time is in milliseconds and can take directly values from 1 to 65535. // It is not possible to hold the time in a variable. // Path: gateway control -> delay // delay (time) ; // Fieldbus -> yes // RS 232 -> yes // min value = 1 // max value = 65535 // Possible return code for an error, please see notice below // Value out of valid range // Example // Before: // : start ; // Set ( RS_State_LED , StaticRED ) ; // Set ( RS_State_LED , StaticGREEN ) ; // : stop ; : start ; Set ( RS_State_LED , StaticRED ) ; Delay ( 1000 ) ; Set ( RS_State_LED , StaticGREEN ) ; Delay ( 3000 ) ; jump : start ; // At start the RS_State_LED is set to static red. Then the delay wait for // 1000 ms. After the delay the RS_State_LED is set to static green. // After a delay of 3000 ms the RS_State_LED is set to static red again. // Notice: If the delay is declared about the maximum, the Compiler give // an Error "Value out of valid range". // Set ( RS_State_LED , StaticRED ) ; // Delay ( 65536 ) ; // Set ( RS_State_LED , StaticGREEN ) ; // stop ; : AddressLable1 ; Get ( ErrorCode , vb_error ) ; //user evaluation for the value of Errorcode return ;