Skip to main content
Skip table of contents

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 NameData TypeDefault ValueDescription

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
Phase B Quadrature use

2: Phase A Count
Phase B Direction use

3: Phase A Up Count use
Phase B Not Used

4: Phase A Down Count use
Phase B Not Used

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

ValueDescription

N/A

Not Used

Exception

ExceptionDescription

N/A

Not Used

Example

PY
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

Related commands

set_extenc_polarity

JavaScript errors detected

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

If this problem persists, please contact our support.