Position error counter, General purpose counter, Position error counter general purpose counter – ADLINK HSL-4XMO User Manual

Page 81

Advertising
background image

Operation Theory

71

Position Error Counter

The position error counter is used to calculate the error between
the command position and the feedback position. It will add one
count when the HSL-4XMO outputs one pulse and subtracts one
count when the HSL-4XMO receives one pulse (from EA, EB). It is
useful in detecting step-loses (stalls) in situations of a stepping
motor when an encoder is applied.

Since the position error counter automatically calculates the differ-
ence between pulses outputted and pulses fed back, it is inevita-
ble to get an error if the motion ratio is not equal to “1.”

To obtain a position error reading, use the function call
HSL_M_get_error_counter(). To reset the position error counter,
use the function call HSL_M_reset_error_counter(). The position
error counter will automatically clear to “0” after home move is
complete.

X

Relative Functions:

HSL_M_get_error_counter()
HSL_M_reset_error_counter():

General Purpose Counter

The general purpose counter is very versatile. It can be any of the
following:

1. Pulse output – as a command position counter

2. Pulse input – as a feedback position counter

3. Manual Pulse input – Default status.

4. Clock – an accurate timer (9.8 MHz)

The default setting of the general purpose counter is set to manual
pulse. (Refer to section 4.1.9 for a detailed explanation of manual
pulsing). To change the source type, use the function
HSL_M_set_general_counter(). To obtain the counter status, use
the function HSL_M_get_general_counter().

X

Relative Functions:

HSL_M_set_general_counter()
HSL_M_get_general_counter()

Advertising