Skip to main content
Skip table of contents

wait(time)

Features

 This function waits for the specified time.

Parameters

Parameter NameData TypeDefault ValueDescription

Time

Float

-

Time [sec]

Return

ValueDescription

0

Success

Negative value

Error

Exception

ExceptionDescription

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

DR_Error (DR_ERROR_RUNTIME)

C extension module error occurred

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

PY
wait(1.3)  # Waits for 1.3 seconds.

while 1:  # Checks contact no. 1 every 0.1 second.       
if get_digital_input(1) == ON:
set_digital_output(1, ON)    
wait(0.1)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.