2.12.4 2.12.3 2.12.2 2.12.1 2.12 2.11.2 2.11.0.1 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
2.12.4 2.12.3 2.12.2 2.12.1 2.12 2.11.2 2.11.0.1 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

set_output(port_type, index, val=None, time=None, val2=None)

Features

This function sends a signal at the digital / analog contact point of the controller / flange.

Caution

Depending on the current flange board version and robot model, the parameters may change. Please familiarize yourself with the manual.

Parameters

Parameter Name

Data Type

Default Value

Description

port_type

int

-

type of contact point

  • DR_CONTROLLER_DIGITAL : 0

  • DR_FLANGE_DIGITAL : 1

  • DR_CONTROLLER_ANALOG : 2

index

int

-

I/O contact number mounted on the controller(It also serves as a Chnnel for the Analog output)

  • when the port_type is DR_CONTROLLER_DIGITALVal argument existing: A number between 1 and 16No val argument: 1 ~ 16 , -1 ~ -16(A positive number means ON while a negative number means OFF.)

  • when the port_type is DR_FLANGE_DIGITALwhen the model of robot is M/H with old flangeVal argument existing: A number between 1 and 6No val argument: 1 ~ 6 , -1 ~ -6(A positive number means ON while a negative number means OFF.)when the model of robot is AVal argument existing: A number between 1 and 2No val argument: 1 ~ 2 , -1 ~ -2(A positive number means ON while a negative number means OFF.)when the model of robot is M/H with new flangeVal argument existing: A number between 1 and 4No val argument: 1 ~ 4, -1 ~ -4(A positive number means ON while a negative number means OFF.)

  • when the port_type is DR_CONTROLLER_ANALOG1 ~ 2(channel)

val

float

None

I/O value

  • when the port_type is 0 or 1(digital)ON : 1OFF : 0

  • when the port_type is 2(analog)current mode : 4.00 ~ 20.00(mA)voltage mode : 0.00 ~ 10.00(V)

time

float

None

Time information (available only if the port_type is 0, 1)

  • 0.01 ~ 3,000,000(sec)

val2

int

None

I/O value

  • ON : 1

  • OFF : 0


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

Failed

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_output(1, -1) ## set_tool_digital_output(-1)
set_output(0, 2, OFF, 3, ON) ## set_digital_output(2, OFF, 3, ON)
set_mode_analog_output(ch=2, mod=DR_ANALOG_VOLTAGE) #out ch1=voltage mode
set_output(2, 1, 10.0) ## set_analog_output(2, 10)