I took a quick look at your code...
case 3:
dacclock=0;
if (cycle>=12) {
cycle=0;
}
phase=0;
cycle++;
break;Should be: case 3:
dacclock=0;
if (cycle>=11) {
cycle=0;
} else cycle++;
phase=0;
break;Ken----- Original Message -----
From: "Kirk Wallace" <[EMAIL PROTECTED]>
To: "Enhanced Machine Controller (EMC)" <[email protected]>
Sent: Saturday, December 22, 2007 10:38 PM
Subject: [Emc-users] DAC HAL Component Problems
>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.
> --
> 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
>
-------------------------------------------------------------------------
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