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

정의

set_analog_output(ch, val)

기능

컨트롤러 아날로그 출력에 해당하는 채널의 값을 출력합니다.

인수

인수명

자료형

기본값

설명

ch

int

-

  • 1 : channel 1

  • 2 : channel 2

val

float

-

analog 출력 값

  • 전류 모드인 경우: 4.0~20.0 [mA]

  • 전압 모드인 경우: 0~10.0 [V]

리턴

설명

0

성공

음수값

실패

예외

예외

설명

DR_Error (DR_ERROR_TYPE)

인수들의 데이터형 오류 시

DR_Error (DR_ERROR_VALUE)

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

DR_Error (DR_ERROR_RUNTIME)

C Extension 모듈 에러 발생 시

DR_Error (DR_ERROR_STOP)

프로그램 강제 종료 시

예제

Python
set_mode_analog_output(ch=1, mod=DR_ANALOG_CURRENT) #out ch1=current mode
set_mode_analog_output(ch=2, mod=DR_ANALOG_VOLTAGE) #out ch1=voltage mode

set_analog_output(ch=1, val=5.2) #channel 1에 5.2 mA 출력
set_analog_output(ch=2, val=10.0) #channel 2에 10V 출력

Keyword

set / analog / output / set_analog / analog_output