Breadcrumbs

get_tool_analog_input()

정의

get_tool_analog_input(ch)

기능

티치펜던트에 등록된 Tool Analog Input의 전압 (또는 전류)을 획득합니다.

인수

인수명

자료형

기본값

설명

ch

integer

-

Tool Analog Input 채널 번호

  • 범위: 1-4

리턴

설명

(전류모드) 4.0 ~ 20.0 mA

(전압모드) 0.0 ~ 10.0 V

성공

음수값

오류

예외

예외

설명

DR_Error (DR_ERROR_TYPE)

인수들의 데이터형 오류 시

DR_Error (DR_ERROR_VALUE)

인수의 값이 유효하지 않을 시

DR_Error (DR_ERROR_RUNTIME)

C Extension 모듈 에러 발생 시

DR_Error (DR_ERROR_STOP)

프로그램 강제 종료 시

예제

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))

관련 명령어