Skip to main content
Skip table of contents

set_tool_digital_outputs(bit_start, bit_end, val)

Features

This function sends the signal of the robot tool from the digital contact point. The multiple signals from the first contact point (bit_start) to the last contact point (bit_end) are output at one.

Parameters

Parameter NameData TypeDefault ValueDescription

bit_start

int

-

Beginning contact number for output signal (1~6)

bit_end

int

-

Ending contact number for output signal (1~6)

Val

int

-

Output value


Note

  • Bit_end must be a larger number than bit_start.
  • Val is the value of the combination of bits where bit_start =LSB and bit_end=MSB.
    Ex) bit_start =1, bit_end=4, val=0b1010 # No. 4=ON, no. 3=OFF, no. 2=ON, and no. 1=OFF

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
# Outputs contact 1=ON, contact 2=ON, contact 3=OFF, and contact 4=OFF.
set_tool_digital_outputs(bit_start=1, bit_end=4, val=0b0011) # 0b means a binary number. 

# Outputs contact 3=ON and contact 4=OFF. 
set_tool_digital_outputs(bit_start=3, bit_end=4, val=0b01) # 0b means a binary number.

# Outputs the ON signal from contacts 1 through 8.
set_tool_digital_outputs(1, 8, 0xff)                       # 0x means a hexadecimal number.
JavaScript errors detected

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

If this problem persists, please contact our support.