Skip to main content
Skip table of contents

set_digital_outputs(bit_list)

기능

컨트롤러의 디지털 출력 복수 개의 접점에서 신호를 내보내기 위한 명령문입니다bit_list에 정의된 접점들의 디지털 신호를 한 번에 출력할 수 있습니다.

인수

인수명자료형기본값설명

bit_list

list (int)

-

복수 개 출력하고자 하는 접점 list

  • 양수의 접점 번호는 ON 출력: 1~16
  • 음수의 접점 번호는 OFF 출력: -1~-16

리턴

설명

0

성공

음수값

실패

예외

예외설명

DR_Error (DR_ERROR_TYPE)

인수들의 데이터형 오류 시

DR_Error (DR_ERROR_VALUE)

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

DR_Error (DR_ERROR_RUNTIME)

C Extension 모듈 에러 발생 시

DR_Error (DR_ERROR_STOP)

프로그램 강제 종료 시

예제

PY
set_digital_outputs(bit_list=[1,2,3,4,5,6,7,8]) #1번~8번 접점 ON 
set_digital_outputs([-1,-2,-3,-4,-5,-6,-7,-8]) #1번~8번 접점 OFF
set_digital_outputs([1,-2,3]) #1번접점 ON, 2번 접점 OFF, 3번 접점 ON 
set_digital_outputs([4,-9,-12]) #4번접점 ON, 9번 접점 OFF, 12번 접점 OFF

JavaScript errors detected

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

If this problem persists, please contact our support.