cancel
Showing results for 
Search instead for 
Did you mean: 

L6470 - is it possible to track a given reference position profile precisely in real time?

GPern.1
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions
Dario CUCCHI
Senior II

Hi @GPern.1​ and welcome to the ST community !

The L6470 has not an input to track a given position and basically each movement command has to finish before issuing a new one.

However I can suggest two different methods to achieve a good position tracking.

First method:

Send a GoTo command to move to the first position.

When a new target position is required, you can send the following command sequence:

  • Read the current SPEED value
  • Send a Run command setting as target the current speed
  • The Run command aborts the ongoing GoTo command
  • Wait for the BUSY flag is released (i.e. motor reaches the target speed)
  • Send the new GoTo command

Second method:

You can enter the step clock mode (see section 6.7.5 in the datasheet). In this case you can provide the step clock to move step by step the motor.

The direction is the one set by the StepClock command.

Monitoring the ABS_POS register you can track the position and close the loop.

Of course In this case the profile of acceleration/deceleration are no more calculated by the POWERSTEP01, since are controlled by the external STCK signal.

In other words the external microcontroller has to compute them to achieve the desired profiles and track the position.

If you find this post useful consider to mark it as “Best Answer�? by clicking the label below “Select as Best�?.

This will help other community members with a similar question to find more quickly the solution.

Have a good day !

View solution in original post

5 REPLIES 5
Dario CUCCHI
Senior II

Hi @GPern.1​ and welcome to the ST community !

The L6470 has not an input to track a given position and basically each movement command has to finish before issuing a new one.

However I can suggest two different methods to achieve a good position tracking.

First method:

Send a GoTo command to move to the first position.

When a new target position is required, you can send the following command sequence:

  • Read the current SPEED value
  • Send a Run command setting as target the current speed
  • The Run command aborts the ongoing GoTo command
  • Wait for the BUSY flag is released (i.e. motor reaches the target speed)
  • Send the new GoTo command

Second method:

You can enter the step clock mode (see section 6.7.5 in the datasheet). In this case you can provide the step clock to move step by step the motor.

The direction is the one set by the StepClock command.

Monitoring the ABS_POS register you can track the position and close the loop.

Of course In this case the profile of acceleration/deceleration are no more calculated by the POWERSTEP01, since are controlled by the external STCK signal.

In other words the external microcontroller has to compute them to achieve the desired profiles and track the position.

If you find this post useful consider to mark it as “Best Answer�? by clicking the label below “Select as Best�?.

This will help other community members with a similar question to find more quickly the solution.

Have a good day !

GPern.1
Associate II

Thanks for your replay. Do you know a alternative component, similar to L6470,  but with the input to track in real time a given position ?

thanks again

Giuseppe

Dario CUCCHI
Senior II

You are welcome Giuseppe !

There are no drivers in the ST portfolio which have such input.

For the basic stepper drivers like STSPIN220, STSPIN820 there are two digital inputs: one for step clock and the other one for direction of the motor.

Then, there are the advanced stepper drivers like L6470, L6472 and powerSTEP01, but they all work as described above.

In all the cases, a real-time tracking position must be implemented by the user in the external microcontroller.

GPern.1
Associate II

Thanks. is it possible use the hard stop before the change position? which are the limits?

Dario CUCCHI
Senior II

Yes you can: the motor is stopped immediately when the HardStop command is issued, so there is no deceleration profile.

Maybe a hard stop at full speed can cause a step loss if the speed is high and the mechanical load is big (big inertia).

In general this can cause a less smooth movement and introduce some vibrations in the system.

However all depends on your application, you can do some tests and see if this is a suitable solution for your needs.