3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

wait()

Definition

wait(second)

Features

This function waits for the specified time.

Parameters

Parameter Name

Data Type

Default Value

Description

second

Float

-

Time [sec]

Return

Value

Description

0

Success

Negative value

Error

Exception

Exception

Description

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

Python
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)