Re: [Machinekit] BBB and charge pump

2021-04-19 Thread Charles Steinkuehler

On 4/18/2021 6:08 PM, John Dammeyer wrote:

One other  question.  If the 8xx and 9xx numbers work for the loadrt 
hal_bb_gpio statement is it possible to also use them for the stepper motor pin 
selection here:

setp hpg.stepgen.00.steppin 0x4C
setp hpg.stepgen.00.dirpin  0x4D

Changing those to the 8-- and 9-- series would make the hal file more readable.


Yes, almost all the hal_pru_generic pins can use the new 8xx/9xx pin 
numbering scheme.  The only exception is the encoder input pins, which 
require a PRU direct input to function properly.


--
Charles Steinkuehler
char...@steinkuehler.net

--
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 machinekit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/machinekit/50d362e1-52e0-be9e-f17d-230a92d11039%40steinkuehler.net.


[Machinekit] FPGA + Nmigen + CNC

2021-04-19 Thread Rik Starmans

Hey all, 

I build a simple CNC controller using Python and nmigen.  I thought this 
was nice to share as the one published by machine kit requires vivado 
 .

A video of the working Python / CNC controller can be seen here 
 .
This is not the best video and only intended to proof the software works.

The software consists out of the following elements;
   * SPI command interface  (receives command and words, copied from Luna 
)   
   *  Transactionalized FIFO (buffers instruction in sram, copied from luna)
   * SPI parser (basically an extension of SPI command interface, it 
outlines what to do  
  with command like start, stop and write.)
   *  Dispatcher; picks up commands from the FIFO buffer and dispatches 
instructions to actual hardware
* Polynomial integrator: creates pulse train for stepper motors; 
basically you send the 
coefficients for the polynomial and the number of ticks in a   
   segment. 

The motor follows the path, coef_0 * t + coef_1 * t^2 + coef_2 * t^3.
The trajectory of a motor is divided in multiple segments where a segment 
length is typically 10_000 ticks. If is longer, it is repeated. If it is 
shorter, this is communicated by setting ticks to lower than 10_000. I 
looked into using Bezier curves for motion control. The main advantage is 
that they are calculated on the circuit straight from actual positions 
using de Casteljau Algorithm. My FPGA does not have a hardware multiplier, 
so I didn't implement it. 

My current focus is building a laser scanner. Using FPGAs for CNC is a 
problem I encountered along the way.  I need FPGA's as the laser bundle is 
moving quite fast.

Anyhow, it might be of interest to you as you are active in CNC.  You don't 
need actual hardware to test the code as all can be simulated virtually 
.

Hope my project can give you some inspiration!

Best,

Rik



-- 
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 machinekit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/machinekit/a40d26b7-7789-4759-9019-0c799595ab86n%40googlegroups.com.