set_extenc_polarity(channel, polarity_A, polarity_B, polarity_Z, polarity_S)
기능
해당 엔코더 채널의 A, B상 극성과 S, Z상의 트리거 방식을 설정한다
인수
인수명 | 자료형 | 기본값 | 설명 |
---|---|---|---|
channel | int | 1 | 엔코더 채널(1,2) 1: 채널 1 2: 채널 2 |
polarity_A | int | 0 | A상의 극성(0: A상, 1: /A상) |
polarity_B | int | 0 | B상의 극성(0: B상, 1: /B상) |
polarity_Z | int | 0 | Z상의 트리거 방식(0: 하강에지, 1: 상승에지) |
polarity_S | int | 0 | S상의 트리거 방식(0: 하강에지, 1: 상승에지) |
리턴
값 | 설명 |
---|---|
N/A | 사용안함 |
예외
예외 | 설명 |
---|---|
N/A | 사용안함 |
예제
set_extenc_polarity(1, 0, 1, 0, 1)
# External Encoder channel 1을 A상, /B상, Z상(하강에지), S상(상승에지)로 설정
관련 명령어
set_extenc_mode