This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

problem in implementing Step/Dir signal

Dear TI Community,

I have recently tried to add a step and a dir signal pin using interrupt vectors in the DRV8301-69M-KIT.

My goal is to used that Evaluation Kit as my BLDC driver to drive one axis of my CNC machine.

I have successfully drive them using LinuxCNC as my machine operator, based on the project lab. 13b. - taken from InstaSPIN Projects and Labs User's Guide.

But, it runs very slow, compared to my commercial DC brushed motor driver. It seems that the SPIN-TAC Position Move, does not respond as fast as the incoming Step signal. So synchronization with the other axis (Y-axis in this case) can not be met, hence the result is incorrect. 

I only count up the incoming step signal and fetch it to the correct value of gMotorVars.PosStepInt_MRev and gMotorVars.PosStepFrac_MRev.

Question: What is the better idea to program it in order to have a faster respond?

I am not familiar with the motor control theory, but here are some thought that crossed into my mind:

a. Using eQEP instead of interrupt

b. Instead of using STPOSMOVE_run, I should somehow fixed the velocity and acceleration ref. input of the STPOSCTL_run to the maximum value, and used the step signal as a tracking signal input for "the angle reference input" of the STPOSCTL_run.

Thank you in advanced for reading on my questions.

Looking forward for your insight about this.

best regards,

Linggar

  • Jimmy,

    SpinTAC Position Move won't interrupt an existing movement to begin another movement.  So it will wait until it has finished moving before beginning the next movement.  

    The first thing to try would be to increase the other profile settings so that it will complete movements faster.  Increase these values in the watch window:

    • gMotorVars.MaxAccel_krpmps - sets the acceleration in the profile
    • gMotorVars.MaxDecel_krpmps - sets the deceleration in the profile
    • gMotorVars.MaxJrk_krpmps2 - sets the jerk (rate of change of acceleration) in the profile

    Another option is to remove SpinTAC Position Move and directly provide references to SpinTAC Position Control.  In order to do this the position reference signal needs to be properly formatted.  I've attached a document that shows how the position reference should be formatted.

    The key is to handle the rollover in position reference from 10 to -10 and vice versa.  The units on position reference are mechanical revolutions. 

    7356.SpinTAC_Position_Move_Rollover.pdf

    I would first try adjusting the profile limits I've laid out above before removing SpinTAC Position Move from the system.