Gentlemen,
ugh - removing the divides is more involved than I thought - I have
some done - will work on more later
I am going to get my 12 year old grandson to spend a couple days here.
We will be working on a robot kit.
May have a little time later to work on this.
having some fun now :)
thanks
Stuart


On Mon, Dec 29, 2008 at 10:13 AM, Chris Radek <[email protected]> wrote:
> On Mon, Dec 29, 2008 at 09:59:47AM -0600, Stuart Stevenson wrote:
>> Gentlemen,
>>    there is a file www.mpm1.com:8080/cinci/comps/cincikins_work.c
>>    this file compiles, emc2 starts but when I change to mdi mode I get
>> nan for each of XYZAB
>>    obviously there is a problem :)
>>    I cannot see the problem
>>    would someone look at it and enlighten me a little?
>
> Beware I didn't compile or run it, but I see a couple things.  The
> most common reason for NaN is dividing by zero.  Here
>
>            double fva14 = fva11 / cos(d2r(joints[4]));
>
> you can get a zero if joints[4] is 90
>
>
> Here fva2 is in radians
>            double fva2 = atan2(-(haldata->bskew),1);
>
> but later you call d2r on that value
>            double fva25 = fva12 / cos(d2r(fva2));
>
> and there are lots of other places where you use d2r on atan2's
> output.  Maybe this is the root cause?
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
>

------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to