Thanks. I got it figured out. Or I should say it is working now. There was 
two parts to my problem.

1. The pulsing on the DIR line was fixed by the PID control (not sure how 
this works, but it does).
2. I had the stepper drivers set up the wrong way. They were in STEP C.W. / 
STEP C.C.W mode rather than STEP / DIR mode. That is why the pulsing on the 
"DIR" line caused the motors to drift. It was interpreted as step c.c.w. 
signal.

I'll be finalizing the wiring in the coming weeks and should be able to do 
some proper test runs beginning of December.

may I ask what you mean by (PR welcome)? Again, thank you! It was just what 
I needed.

Best regards,


Den lördag 5 november 2016 kl. 15:01:30 UTC+1 skrev Charles Steinkuehler:
>
> On 11/5/2016 8:11 AM, Johan Jensen wrote: 
> > 
> > _4. After completing the first jog command (+/- does not matter), the 
> DIR signal 
> > starts to oscillate between 0V and 4V continuously. __Not expected._ 
> > 5. If I use "disable motors" in Machinekit the DIR signal stops 
> oscillating and 
> > goes back to 0V. 
> > 
> > Any ideas on how to correct this would be greatly appreciated. Thanks. 
>
> This is "hunting" where the PRU driven step/dir generator is 
> oscillating back and forth (by a fraction of a step) around the set 
> position point due to the two asynchronous timebases (ARM CPU core and 
> PRU stepgen) and the ARM interrupt latency/jitter. 
>
> If this is causing you problems, you could add a deadband to the 
> hal_pru_generic stepgen driver (PR welcome!), or switch to using a 
> standard HAL PID control (with the PRU stepgen in velocity mode) 
> instead of the fairly simplistic PID loop found in the hpg driver. 
> There are some examples of configurations using the HAL PID + steppers 
> for hostmot2 (Mesa) hardware, and I think there have been some for the 
> BeagleBone if you dig through the group archives. 
>
> A PR for an example BegleBone configuration using HAL pid components 
> would also be welcome! 
>
> -- 
> Charles Steinkuehler 
> [email protected] <javascript:> 
>

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to