Need firmware for Chinese BoB on Mesa 7i92
As I'm almost off-grid here, it would take me a couple days to download the Xilinx IDE to compile a custom bit file.
1. Can someone provide me with a suitable bit file? PCW ?
Or did I miss a compatible one that has at least the stepgen at the right pins?
2. Is it possible to generate a 0-10kHz output for a VFD with the 7i92?
ParPortPin Function 1 Enable 2 xstep 3 ydir 4 SpindlePWMout (creating a 0-5V signal for the VFD with a buffer and low pass filter from this pin) 5 adir 6 astep 7 zstep 8 zdir 9 SpindleEnable 10 max-home-z 11 min-home-x-and-y 12 SpindleSensorIn (RPM sensor, 4 pulse per revolution) 13 probe-in 14 xdir 16 ystep 17 CoolantEnable
This is how I used it in a similar configuration (different machine) with stepgen:
net xenable => parport.0.pin-01-out
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net ydir => parport.0.pin-03-out
setp parport.0.pin-04-out-invert 1
net spindle-pwm => parport.0.pin-04-out
net adir => parport.0.pin-05-out
net astep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zstep => parport.0.pin-07-out
setp parport.0.pin-07-out-reset 1
setp parport.0.pin-08-out-invert 1
net zdir => parport.0.pin-08-out
net spindle-on => parport.0.pin-09-out
net xdir => parport.0.pin-14-out
net ystep => parport.0.pin-16-out
setp parport.0.pin-16-out-reset 1
net coolant-flood => parport.0.pin-17-out
net max-home-z <= parport.0.pin-10-in-not
net min-home-y <= parport.0.pin-11-in-not
net min-home-x <= parport.0.pin-12-in-not
net probe-in <= parport.0.pin-13-in
The step/dir wiring seems a little eccentric. Is there any reason why you can't just move wires about between the BoB and the drives to make the pinout match something that already exists?
When you say that you want a 0 to 10 kHz signal, is that a variable frequency signal that is needed? Does it need to be a true square-wave?
I could rearrange all the wiring, but as there is a common output enable on pin 1 at the db25 BoB and the available G540, DMMBOB.. bitfiles have either a PWM for the spindle at that pin OR a 3pin quad input that makes it impossible to wire up the limit switch inputs. Ideally there will be a 1pin counter for the spindle sensor (I make use of the spindle at speed function especially with heavy tools).
As the preempt-rt kernel won't run a sufficient base thread on the laptop I have to use the Mesa 7i92 to count the sensor and generate the spindle PWM. I also want to upgrade the sensor to more than 4 counts per revolution to allow heavier rigid tapping, the encoder count was limited by the base thread.
I don't think the 10kHz would need to be square wave, I guess there is a schmitt trigger at the VFD inputs. I don't plan on using the 10kHz input for now, just curious if that's possible.
Loading a firmware just to read the pinout with mesaflash --readhmid seems tedious. Just discovered the .vhd files contain pin declarations, do they represent the db25 pins? I could look at them and see if there's a suitable one to start with.
How about a small page at mesa.com listing all the pin configs for the firmwares? Many people must have gone through these steps and bother you with questions
all the best,
IOPortTag & x"00" & QCountTag & QCountQAPin, -- I/O 13 PIN 10 Input 1 (Quad A) IOPortTag & x"00" & QCountTag & QCountQBPin, -- I/O 14 PIN 11 Input 2 (Quad B) IOPortTag & x"00" & QCountTag & QCountIdxPin, -- I/O 15 PIN 12 Input 3 (Quad Idx)
The encoder inputs do not interfere in any way with using the GPIO except if you want to
use the encoder function
Note that a 1 pin encoder will not work for rigid tapping, normally 3 are needed
are needed (though 2 can work with some fancy hal work to simulate an index)
Now on to the PWM output config for the spindle..
I noticed that I have to lower the probing speed to have the same accuracy as with a base thread. I guess I could lower the servo thread interval. Any other suggestions?
The stepgens don't offer a latch-enable pin (though to do so would be plausible) so you are right that the probing speed needs to be lower to get the same accuracy.
A way to maintain probing speed might be to probe fast to contact then slowly away from contact.
(its tricky since it requires changes to the motion module to do right)
Are you sure there's any difference in probing accuracy?
motion is run in the servo thread and the AFAIK feedback position is sampled by motion at the servo thread rate
to get the probe position