On the side: this was my first experiment with hal. Allow me to
congratulate the developers of emc. Nice job and we came a long way from
the early days with all the hassle to install. :-) Thanks again.

Would using stepgen be a solution instead of using siggen and scale? The
square wave would then be outputted in the base thread and be as such
nicer looking. I also assume it would be simpler.

With siggen:

loadrt siggen
loadrt scale
loadrt conv_float_u32
loadrt conv_u32_bit

addf conv-float-u32.0 servo-thread
addf conv-u32-bit.0 servo-thread

setp scale.0.in 0.0
setp scale.0.gain 0.15
setp scale.0.offset 0.0
addf scale.0 servo-thread
setp siggen.0.offset 0.5
setp siggen.0.amplitude 0.5
addf siggen.0.update servo-thread

net spindle-cmd <= motion.spindle-speed-out => scale.0.in
net spindle-freq <= scale.0.out => siggen.0.frequency
net spindle-fl2int <= siggen.0.square => conv-float-u32.0.in
net spindle-int2bit <= conv-float-u32.0.out => conv-u32-bit.0.in
net spindle-out <= conv-u32-bit.0.out

net spindle-out => parport.0.pin-14-out

Geert De Pecker wrote:
> Kirk,
> 
> You pointed me in the right direction. With siggen and scale, I was able
> to produce a frequency from the spindle control. I posted the mill.ini and
> mill.hal on http://users.skynet.be/gedp/FILES/index.html.
> 
> The signal isn't very stable because I had to put it in the servo-thread
> (probably needed because of the floating point) and the original 1msec
> period of this on 400Hz is on the low side.
> 
> Next problem: the analog voltage on the C11 board doesn't go to the max
> input voltage. I measured the voltage across the sherline potentiometer
> and it is 9.2 volts. With the bench supply set to 9.2 and attached to
> the analog voltage of the board, the max output is 8.2 volts. I'll see
> what is gives when I try ot on the sherline speed control.
> 
> Otherwise, the output voltage is very linear with the ordered spindle speed.
> 
> Thanks again for pointing this out,
> 
> Geert
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to