Breadcrumbs

set_tool_digital_output()

set_tool_digital_output(index, val=None)

Features

This function sends the signal of the robot tool from the digital contact point.

Caution

Depending on the robot model or flange board version, the range of the index parameter may change.

Parameters

Parameter Name

Data Type

Default Value

Description

index

int

-

I/O contact number mounted on the robot arm

  • Val argument existing: A number between 1 and 6

  • No val argument: 1 ~ 6 , -1 ~ -6

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

val

int

-

I/O value: The value to output

Note

If val is omitted, positive numbers become ON and negative numbers become OFF depending on the sign (+/-) of the index.

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
set_tool_digital_output(1, ON)	# Sets the no. 1 contact of the robot arm ON
set_tool_digital_output(6, OFF)	# Sets the no. 6 contact of the robot arm OFF
set_tool_digital_output(3		#No. 3 contact ON (A positive number means ON if the argument val is omitted.)  
set_tool_digital_output(-3)		#No. 3 contact OFF (A negative number means OFF if the argument val is omitted.)


set_tool_digital_output(index, val=None, time=None, val2=None)

Features

This function sends the signal of the robot tool from the digital contact point. After sending out the specified signal for the set time, the next signal is sent out.

Caution

Depending on the robot model or flange board version, the range of the index parameter may change.

Parameters

Parameter Name

Data Type

Default Value

Description

index

int

-

I/O contact number mounted on the robot arm

  • Val argument existing: A number between 1 and 6

  • No val argument: 1 ~ 6 , -1 ~ -6

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

val

int

-

I/O value

  • ON: 1

  • OFF: 0

time

float

-

Time(0.01 ~ 3,000,000)

val2

int

-

I/O value

  • ON: 1

  • OFF: 0

Note

If val is omitted, the positive number becomes ON and the negative number OFF according to the sign of the argument index.

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
set_tool_digital_output(1, ON, 2.0, OFF)	# Sets the no. 1 contact of the robot arm ON, OFF after 2 seconds
set_tool_digital_output(5, OFF, 0.5, ON)	# Sets the no. 5 contact of the robot arm OFF, ON after 0.5 seconds