HARSFEN0602ElmoHARmonicaSoftwareManual

PRELIMINARYDRAFT

13 Sensors, I/O, and Events

The Harmonica has two encoder inputs for feedback, commutation, and auxiliary reference generation.

In addition, it has an analog input, Hall sensor inputs, and digital I/O.

The digital inputs and the encoder index signals can generate events that may register the motor position, or reload the position counters, or flag a digital output, or call a special user program.

The digital outputs responds also to software events, like affirmation of the conditions to start the motor, or brakes activation upon starting or shutting the motor.

172

13.1 Modulo counting

13.1.1Modulo Counting

The variable PX counts the main position sensor. The PX variable cannot increase indefinitely. In fact, PX is limited to the range [-230...230].

For limited motions, that may be good enough.

Some applications, however, require that the motor position be counted cyclically. When a certain top position is arrived, the position counter "rolls off" and counting continues from the bottom position.

The most common examples for modulo counting are rotary pointing equipment like radar pedestals, camera pointers, or rotary robot axes. In this type of equipment, the position is normally counted modulo the mechanical rotation of the load. When the load points to a given direction, the encoder readout will be always the same, no matter how many full rotations have been made.

The Harmonica can handle modulo counting: It can run all the types of software motions with modulo position counting. Point-to-Point position motions in modulo systems are ambiguous, since any point can be reached from both directions. The Harmonica will always go the short way.

The commands relevant to modulo counting are:

Command

Description

XM

Modulo value for the main position counter.

 

When XM is nonzero, the main position sensor counts cyclically in the

 

range [-XM/2...XM/2-1].

 

When XM=0, the main position sensor count linearly, limited to the range

 

[-230...230].

YM

Modulo value for the auxiliary position counter. When YM=0, the auxiliary

 

When YM is nonzero, the auxiliary position sensor counts cyclically in the

 

range [-YM/2...YM/2-1].

 

position sensor count linearly, limited to the range [-230...230].

RM

Reference mode.

 

Must be 0 (Do not use the auxiliary reference generator) if modulo

 

counting is used.

 

For further details refer the chapter "The position reference generator"

 

Table 13-1: Commands relevant to modulo counting

If XM is nonzero with UM=5, or if YM is nonzero with UM=4, the controlled motor position will count cyclically.

When the position feedback counts cyclically:

You cant use external position referencing (RM=1).

The RLS and the FLS (Reverse and Forward limit switches) cannot behave directionally, since any position can be approached from both directions.

Page 174
Image 174
Elmo HARmonica, HARSFEN0602 software manual 172, Sensors, I/O, and Events, Modulo counting Modulo Counting