Skip to main content
Skip table of contents

wait_tool_analog_input(ch, condition, val, timeout=None)

Features

This function sends a signal at the digital contact point of the controller. A value saved in the digital output register is output as a digital signal.

Caution

This command is only available for new flanges.

Parameters

Parameter NameData TypeDefault ValueDescription

ch

int

-

I/O contact number mounted on the controller

  • Val argument existing: A number between 1 and 16
  • No val argument: 1 ~ 16 , -1 ~ -16

(A positive number means ON while a negative number means OFF.)

condition

int

-

I/O value

  • ON: 1
  • OFF: 0
valfloat-
  • current mode : 4.00 ~ 20.00(mA)
  • voltage mode : 0.00 ~ 10.00(V)
timeoutfloatNone

waiting time [sec]

If not set, wait indefinitely

Return

ValueDescription

0

Success

-1

Failed (time-out)

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_tool_analog_input(1, DR_ANALOG_CONDITION_UPPER, 5.0, 4) ## Wait until analog data received through ch 1 is equal to or greater than 5.0
JavaScript errors detected

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

If this problem persists, please contact our support.