3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

set_mode_tool_analog_input()

Definition

set_mode_tool_analog_input(ch, mod)

Features

Set of activated tool analog input's mode in the Teach Pendant.

Parameters

Parameter Name

Data Type

Default Value

Description

ch

integer

-

The channel number of Tool Analog Input

  • Range

    • M/H Series: 1-4 (X1, X2)

    • A/E Series: 1-2 (X1)

mod

integer

-

The mode of Tool Analog Input

0: Current mode

1: Voltage mode

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
TOOL_CURRENT = 0
TOOL_VOLTAGE = 1
channel = 1
mode = TOOL_VOLTAGE

val = set_mode_tool_analog_input (ch=channel, mod=mode)
if val < 0:
	tp_log("set_mode_tool_analog_input error: " + str(val))
else:
    val = get_tool_analog_input(ch=channel)
    if val < 0:
		tp_log("get_tool_analog_input error: " + str(val))
	else:
		tp_log("get_tool_analog_input ch[" + str(channel) + "]: " + str(val))
		if mode == TOOL_VOLTAGE:
			tp_log(" V")
		elif mode == TOOL_CURRENT:
			tp_log(" mA")

Keyword

set / tool / analog_input / set_ / set_mode / set_mode_tool / set_mode_tool_analog / analog_input