Definition
set_extenc_polarity(channel, polarity_A, polarity_B, polarity_Z, polarity_S)
Features
It configures the polarity of phase A, B and the trigger method of phase S, Z of the corresponding encoder channel.
Parameters
|
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
|
channel |
int |
1 |
Encoder channel (1, 2) 1: Channel 1 2: Channel 2 |
|
polarity_A |
int |
0 |
Polarity of phase A (0: Phase A, 1: /Phase A) |
|
polarity_B |
int |
0 |
Polarity of phase B (0: Phase B, 1: /Phase B) |
|
polarity_Z |
int |
0 |
Trigger method of Phase Z (0: Falling edge, 1: Rising edge) |
|
polarity_S |
int |
0 |
Trigger method of Phase S (0: Falling edge, 1: Rising edge) |
Return
|
Value |
Description |
|---|---|
|
N/A |
Not Used |
Exception
|
Exception |
Description |
|---|---|
|
N/A |
Not Used |
Example
Python
set_extenc_polarity(1, 0, 1, 0, 1)
# External Encoder channel 1 is set to phase A, /phase B, phase Z (falling edge), phase S (rising edge)
Related commands