On Sat, 2007-12-22 at 19:38 -0800, Kirk Wallace wrote: > I hope everyone is having a happy holiday season. If this isn't your > holiday season, then I hope your having a happy normal season. Anyway... > > I got a HAL component compiled and nearly working for my serial DAC > project, but I have some issues that would like to get help on. Some > information is here: > > http://www.wallacecompany.com/machine_shop/EMC2/serial_dac/ > > I am using EMC2 2.2.2. > > I get "unrecognized type" errors when I try to use u32 in my > standard_pinout_dac.ini. I changed all u32's to s32's which stopped the > type errors. Since I am only using the lower twelve bits, I guess, it > shouldn't make a difference. > > Between the motion.spindle-speed-out float, and my 12 bit serial stream, > I am losing four MSB's. I run spindle-speed-out through scale to get 12 > TRUE bits at full RPM. Then, because my DAC component data input is u32 > (or currently s32), I convert the scaled float with conv_float_s32.comp. > Since halmeter indicates that I have a value of 4096 at my DAC component > data input, all the bits seem to be getting to my input. I "and" (&) > 0x800 with the s32 input to pull the MSB, and then shift 0x800 right for > subsequent bits. Actually, I am currently using 0x1000 instead, to fix > another problem, but this should not affect more than one bit and I have > four unruly bits. > > Thanks for any help.
I reconfigured serialdac.comp to shift datain eleven bits and & it with 0x1, then loop down to bit zero and reset to bit 11. Now everything is working fine, or at least well enough to test the hardware. Whooa -- Kirk Wallace (California, USA http://www.wallacecompany.com/machine_shop/ Hardinge HNC lathe, Bridgeport mill conversion, doing XY now, Zubal lathe conversion pending) ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
