Skip to main content
Skip table of contents

set_mode_analog_output(ch, mod )

Features

This function sets the channel mode of the controller analog output.

Parameters

Parameter NameData TypeDefault ValueDescription

ch

int

-

  • 1 : channel 1
  • 2 : channel 2

mod

int

-

analog io mode

  • DR_ANALOG_CURRENT: Current mode
  • DR_ANALOG_VOLTAGE: Voltage mode

Return

ValueDescription

0

Success

Negative value

Failed

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
# Sets analog_output channel 1 to the current mode.
set_mode_analog_output(ch=1, mod=DR_ANALOG_CURRENT) 

# Sets analog_output channel 2 to the voltage mode.
set_mode_analog_output(ch=2, mod=DR_ANALOG_VOLTAGE)
JavaScript errors detected

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

If this problem persists, please contact our support.