Skip to main content
Skip table of contents

get_digital_input(index)

기능

컨트롤러의 디지털 입력 점접에서 신호를 불러오기 위한 명령문으로 디지털 입력 점접 값을 읽습니다.

인수

인수명자료형기본값설명

index

int

-

1 ~ 16까지의 숫자이며, 컨트롤러에 장착된 I/O의 접점 번호

리턴

설명

1

ON

0

OFF

음수값

실패

예외

예외설명

DR_Error (DR_ERROR_TYPE)

인수들의 데이터형 오류 시

DR_Error (DR_ERROR_VALUE)

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

DR_Error (DR_ERROR_RUNTIME)

C Extension 모듈 에러 발생 시

DR_Error (DR_ERROR_STOP)

프로그램 강제 종료 시

예제

PY
in1 = get_digital_input(1) #1번 접점 읽기
in8 = get_digital_input(8) #8번 접점 읽기

JavaScript errors detected

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

If this problem persists, please contact our support.