Skip to main content
Skip table of contents

get_digital_inputs(bit_start, bit_end)

기능

컨트롤러의 디지털 입력 시작 접점(start_index)부터 마지막 접점(end_index)까지 한 번에 복수 신호를 불러오기 위한 명령문입니다.

인수

인수명자료형기본값설명

bit_start

int

-

입력 신호 시작 접점 번호 (1~16)

bit_end

int

-

입력 신호 끝 접점 번호 (1~16)


알아두기

bit_end는 bit_start 보다 큰 값 이어야 합니다.

리턴

설명

int (>=0)

한번에 읽은 복수 개의 접점 값

bit_start =LSB, bit_end=MSB 가 되는 비트 조합의 값

음수 값

실패

예외

예외설명

DR_Error (DR_ERROR_TYPE)

인수들의 데이터형 오류 시

DR_Error (DR_ERROR_VALUE)

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

DR_Error (DR_ERROR_RUNTIME)

C Extension 모듈 에러 발생 시

DR_Error (DR_ERROR_STOP)

프로그램 강제 종료 시

예제

PY
# input 접점: 1번=OFF, 2번=OFF, 3번=ON, 4번=ON인 경우 
res = get_digital_inputs(bit_start=1, bit_end=4)
#res 기대값 = 0b1100(이진수), 12(십진수), 0x0C(16진수)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.