Position Controller: determine when move is complete

Comments & issues
Post Reply
ndemarco
Phidgetsian
Posts: 8
Joined: Wed Jan 12, 2022 8:46 pm
Contact:

Position Controller: determine when move is complete

Post by ndemarco »

Many position control systems include an 'in position' event, raised when the motor is within the deadband window. This enables simple, non-blocking calls to make a move: go, and let me know when you're there.

Some moves are composite, also called on-the-fly moves: Start moving with motion parameter set 1 (velocity, acceleration, tuning parameters). When in position, change to motion parameter set 2. A common example is when the system's dynamics change mid-move - a sliding platform contacts something it must push, for example.

Phidget22 includes getPosition, which can then be tested against setTargetPosition. Before I code this up, the loop seems like it would be slow and intensive (bandwidth, processor).

Is there a way to achieve this using Phidget22?
jdecoux
Labview Developer
Posts: 161
Joined: Mon Nov 13, 2017 10:20 am
Contact:

Re: Position Controller: determine when move is complete

Post by jdecoux »

While there is no "Motion Complete" event, you could potentially use the PositionChange event to check whether your motor is near the target position and set a flag from there, moving the bulk of the comparison out of your main loop.
ndemarco
Phidgetsian
Posts: 8
Joined: Wed Jan 12, 2022 8:46 pm
Contact:

Re: Position Controller: determine when move is complete

Post by ndemarco »

That approach works great, especially considering this is a 24 pulse/rev (commutations/rev) motor.
Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests