Skip to main content
Skip table of contents

set_digital_outputs(bit_list)

Features

This function sends a signal to multiple digital output contact points of the controller.

The digital signals of the contact points defined in bit_list are output at one.

Parameters

Parameter NameData TypeDefault ValueDescription

bit_list

list (int)

-

List of multiple output contacts

  • The positive contact number outputs ON: 1~16
  • The negative contact number outputs OFF: -1~-16

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
set_digital_outputs(bit_list=[1,2,3,4,5,6,7,8])  # Contact number 1-8 ON 
set_digital_outputs([-1,-2,-3,-4,-5,-6,-7,-8])    # Contact number 1-8 OFF
set_digital_outputs([1,-2,3])               # Contact no. 1 ON, no. 2 OFF, and no. 3 ON 
set_digital_outputs([4,-9,-12])             # Contact no. 4 ON, no. 9 OFF, and no. 12 OFF
JavaScript errors detected

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

If this problem persists, please contact our support.