Breadcrumbs

get_tool_analog_input()

Definition

get_tool_analog_input(ch)

Features

Get of activated tool analog input's value in the Teach Pendant.

Parameters

Parameter Name

Data Type

Default Value

Description

ch

integer

-

The channel number of Tool Analog Input

  • Range: 1-4

Return

Value

Description

(Current mode) 4.0 ~ 20.0 mA

(Voltage mode) 0.0 ~ 10.0 V

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
channel = 1
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))