Definition
set_extenc_mode(channel, mode_AB, pulse_AZ, mode_Z, mode_S, inverse_cnt)
Features
It configures the operation mode of phase A, B, Z and S of the corresponding encoder channel.
1) Compared to versions prior to V2.7.0, Integrated mode_S parameter option - 1: Strobe Signal à Encoder Count Clear (conveyor tracking available with a single option of Encoder Count Clear), 2: works for Encoder Count Clear (for compatibility to prior version)
Parameters
|
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
|
channel |
int |
1 |
Encoder channel (1, 2) 1: Channel 1 2: Channel 2 |
|
mode_AB |
int |
0 |
Use of phase AB Mode (0 ~ 4) 0: Not Used 1: Phase A Quadrature use
2: Phase A Count
3: Phase A Up Count use
4: Phase A Down Count use
|
|
pulse_AZ |
int |
0 |
Pulse A Count per Pulse Z (0 ~ 100000) |
|
mode_Z |
int |
0 |
Phase Z Use Mode (0 ~ 1) 0: Not Used 1: A/B Count Error Compensation 2: Encoder Count Clear |
|
mode_S |
int |
0 |
Phase S Use Mode (0 ~ 1) 0: Not Used 1: Encoder Count Clear |
|
inverse_cnt |
int |
0 |
Encoder Count Direction Reverse Status 0: Forward 1: Reverse |
Return
|
Value |
Description |
|---|---|
|
N/A |
Not Used |
Exception
|
Exception |
Description |
|---|---|
|
N/A |
Not Used |
Example
set_extenc_mode(1, 2, 20000, 1, 1, 0)
# External Encoder channel 1 operation mode is set as follows
# Phase A Count, Phase B Direction Use
# Pulse A Count per Z Pulse is 20000
# Phase Z error count accumulate compensation mode use, phase S use
# Encoder Count direction is set to forward