Dynomotion

Group: DynoMotion Message: 1454 From: bradodarb Date: 7/8/2011
Subject: Object access
Hello,


I am testing the coordinated motion API that I have wrapped in c#. It seems that I can manipulate public members fairly well.

There is a problem I have with ArcFeed and StraightFeed.

If I pass in all the position parameters as 0.00's everything is happy, I get no errors from the kflop nor the debugger.

When I pass in values that would actually produce motion
(I am trying the exact positions as in the Simple CoordMotion C++ example)

I get an access violation exception.



I am wondering if I am instantiating the CoordMotion class poorly on the C++ side.




When I instatiate a new CoordMotion it calls this in my c++ export DLL:

dllexportmethod(args)
{
CCoordMotion *CM
CM = new CCoordMotion;
*handle = (long)CM;
CM->m_board = boardnum;
}
the handle was an Intptr in c# that was passed by reference
and I now use the handle to ref the CCoordMotion instance
in subsequent calls to the coordmotion object so it follows this pattern:



CCoordMotion *CM = (CCoordMotion *)handle;

CM->[CCoordMotion Function call here]();




Again this works fine with most members and I only get an exception when commanding actual motion( no probs sending all zeroes )

Is it OK for CKMotionDLL class and CCoordMotion class to exist simultaneously? Are the fighting over the board?


hmm... maybe I am not enabling all the motors - but I get an error from the board if I do that from KMotionDLL, and here I get no errors other than the exception.


Thanks,

Brad Murry
Group: DynoMotion Message: 1456 From: bradodarb Date: 7/8/2011
Subject: Re: Object access
I also wanted to follow up that I can call StraightTraverse to any position without issues.

_______________________________________

I can consistently produce the access violation exception with the following methods:

A.
1) Call StraightTraverse to all zero/ Or call do not call Straight feed at all.
2) Call StraightFeed or ArcFeed with any of the position params not equal to zero.

B.
1) Call StraightTraverse to a non-zero position.
2) Call StraightFeed or ArcFeed with all of the position params equal to zero.

I can make calls to all the methods without exceptions or errors if I do the following:

C.
1) Call StraightTraverse to all zero/ Or call do not call Straight feed at all.
2) Call StraightFeed or ArcFeed with all of the position params equal to zero.



-Brad Murry

--- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@...> wrote:
>
> Hello,
>
>
> I am testing the coordinated motion API that I have wrapped in c#. It seems that I can manipulate public members fairly well.
>
> There is a problem I have with ArcFeed and StraightFeed.
>
> If I pass in all the position parameters as 0.00's everything is happy, I get no errors from the kflop nor the debugger.
>
> When I pass in values that would actually produce motion
> (I am trying the exact positions as in the Simple CoordMotion C++ example)
>
> I get an access violation exception.
>
>
>
> I am wondering if I am instantiating the CoordMotion class poorly on the C++ side.
>
>
>
>
> When I instatiate a new CoordMotion it calls this in my c++ export DLL:
>
> dllexportmethod(args)
> {
> CCoordMotion *CM
> CM = new CCoordMotion;
> *handle = (long)CM;
> CM->m_board = boardnum;
> }
> the handle was an Intptr in c# that was passed by reference
> and I now use the handle to ref the CCoordMotion instance
> in subsequent calls to the coordmotion object so it follows this pattern:
>
>
>
> CCoordMotion *CM = (CCoordMotion *)handle;
>
> CM->[CCoordMotion Function call here]();
>
>
>
>
> Again this works fine with most members and I only get an exception when commanding actual motion( no probs sending all zeroes )
>
> Is it OK for CKMotionDLL class and CCoordMotion class to exist simultaneously? Are the fighting over the board?
>
>
> hmm... maybe I am not enabling all the motors - but I get an error from the board if I do that from KMotionDLL, and here I get no errors other than the exception.
>
>
> Thanks,
>
> Brad Murry
>
Group: DynoMotion Message: 1460 From: Tom Kerekes Date: 7/8/2011
Subject: Re: Object access
Hi Brad,
 
Yes I see the issue.  The TrajectoryPlanner is not ever being initialized.  As a temporary workaround try adding:
 
CM.SetAbort();
CM.ClearAbort();
 
Before making any calls that would add trajectory.  This will be fixed in the next version.
 
Thanks
TK


--- On Fri, 7/8/11, bradodarb <bradodarb@...> wrote:

From: bradodarb <bradodarb@...>
Subject: [DynoMotion] Re: Object access
To: DynoMotion@yahoogroups.com
Date: Friday, July 8, 2011, 8:28 AM

 
I also wanted to follow up that I can call StraightTraverse to any position without issues.

_______________________________________

I can consistently produce the access violation exception with the following methods:

A.
1) Call StraightTraverse to all zero/ Or call do not call Straight feed at all.
2) Call StraightFeed or ArcFeed with any of the position params not equal to zero.

B.
1) Call StraightTraverse to a non-zero position.
2) Call StraightFeed or ArcFeed with all of the position params equal to zero.

I can make calls to all the methods without exceptions or errors if I do the following:

C.
1) Call StraightTraverse to all zero/ Or call do not call Straight feed at all.
2) Call StraightFeed or ArcFeed with all of the position params equal to zero.

-Brad Murry

--- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@...> wrote:
>
> Hello,
>
>
> I am testing the coordinated motion API that I have wrapped in c#. It seems that I can manipulate public members fairly well.
>
> There is a problem I have with ArcFeed and StraightFeed.
>
> If I pass in all the position parameters as 0.00's everything is happy, I get no errors from the kflop nor the debugger.
>
> When I pass in values that would actually produce motion
> (I am trying the exact positions as in the Simple CoordMotion C++ example)
>
> I get an access violation exception.
>
>
>
> I am wondering if I am instantiating the CoordMotion class poorly on the C++ side.
>
>
>
>
> When I instatiate a new CoordMotion it calls this in my c++ export DLL:
>
> dllexportmethod(args)
> {
> CCoordMotion *CM
> CM = new CCoordMotion;
> *handle = (long)CM;
> CM->m_board = boardnum;
> }
> the handle was an Intptr in c# that was passed by reference
> and I now use the handle to ref the CCoordMotion instance
> in subsequent calls to the coordmotion object so it follows this pattern:
>
>
>
> CCoordMotion *CM = (CCoordMotion *)handle;
>
> CM->[CCoordMotion Function call here]();
>
>
>
>
> Again this works fine with most members and I only get an exception when commanding actual motion( no probs sending all zeroes )
>
> Is it OK for CKMotionDLL class and CCoordMotion class to exist simultaneously? Are the fighting over the board?
>
>
> hmm... maybe I am not enabling all the motors - but I get an error from the board if I do that from KMotionDLL, and here I get no errors other than the exception.
>
>
> Thanks,
>
> Brad Murry
>

Group: DynoMotion Message: 1463 From: bradodarb Date: 7/8/2011
Subject: Re: Object access
Excellent Tom,

I now have CoordMotion wrapped up and ready for beta.


Thanks so much,

Brad
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Brad,
>  
> Yes I see the issue.  The TrajectoryPlanner is not ever being initialized.  As a temporary workaround try adding:
>  
> CM.SetAbort();
> CM.ClearAbort();
>  
> Before making any calls that would add trajectory.  This will be fixed in the next version.
>  
> Thanks
> TK
>
>
> --- On Fri, 7/8/11, bradodarb <bradodarb@...> wrote:
>
>
> From: bradodarb <bradodarb@...>
> Subject: [DynoMotion] Re: Object access
> To: DynoMotion@yahoogroups.com
> Date: Friday, July 8, 2011, 8:28 AM
>
>
>  
>
>
>
> I also wanted to follow up that I can call StraightTraverse to any position without issues.
>
> _______________________________________
>
> I can consistently produce the access violation exception with the following methods:
>
> A.
> 1) Call StraightTraverse to all zero/ Or call do not call Straight feed at all.
> 2) Call StraightFeed or ArcFeed with any of the position params not equal to zero.
>
> B.
> 1) Call StraightTraverse to a non-zero position.
> 2) Call StraightFeed or ArcFeed with all of the position params equal to zero.
>
> I can make calls to all the methods without exceptions or errors if I do the following:
>
> C.
> 1) Call StraightTraverse to all zero/ Or call do not call Straight feed at all.
> 2) Call StraightFeed or ArcFeed with all of the position params equal to zero.
>
> -Brad Murry
>
> --- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@> wrote:
> >
> > Hello,
> >
> >
> > I am testing the coordinated motion API that I have wrapped in c#. It seems that I can manipulate public members fairly well.
> >
> > There is a problem I have with ArcFeed and StraightFeed.
> >
> > If I pass in all the position parameters as 0.00's everything is happy, I get no errors from the kflop nor the debugger.
> >
> > When I pass in values that would actually produce motion
> > (I am trying the exact positions as in the Simple CoordMotion C++ example)
> >
> > I get an access violation exception.
> >
> >
> >
> > I am wondering if I am instantiating the CoordMotion class poorly on the C++ side.
> >
> >
> >
> >
> > When I instatiate a new CoordMotion it calls this in my c++ export DLL:
> >
> > dllexportmethod(args)
> > {
> > CCoordMotion *CM
> > CM = new CCoordMotion;
> > *handle = (long)CM;
> > CM->m_board = boardnum;
> > }
> > the handle was an Intptr in c# that was passed by reference
> > and I now use the handle to ref the CCoordMotion instance
> > in subsequent calls to the coordmotion object so it follows this pattern:
> >
> >
> >
> > CCoordMotion *CM = (CCoordMotion *)handle;
> >
> > CM->[CCoordMotion Function call here]();
> >
> >
> >
> >
> > Again this works fine with most members and I only get an exception when commanding actual motion( no probs sending all zeroes )
> >
> > Is it OK for CKMotionDLL class and CCoordMotion class to exist simultaneously? Are the fighting over the board?
> >
> >
> > hmm... maybe I am not enabling all the motors - but I get an error from the board if I do that from KMotionDLL, and here I get no errors other than the exception.
> >
> >
> > Thanks,
> >
> > Brad Murry
> >
>
Group: DynoMotion Message: 1464 From: bradodarb Date: 7/8/2011
Subject: Re: Object access
Hello Tom,

I may have claimed victory a little soon.

I am able to make the calls, but now it just 'hang's at that point in code.

It set my console app come to the foreground, so I thought it was happy, but once I hooked it up to my test rig and got no motion I paused the debugger to see it was stuck on a call to StraightFeed.



Thinking that I may have so weak of a motion profile, I played around with the Motion Parameters and set accels/speeds way high, but no change.


Interesting to note that on StraightTraverse it does not move either, though it does sucessfully return from that function.




I should also state that I only have one motor hooked up to my rig.


-Brad Murry

--- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@...> wrote:
>
>
> Excellent Tom,
>
> I now have CoordMotion wrapped up and ready for beta.
>
>
> Thanks so much,
>
> Brad
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Brad,
> >  
> > Yes I see the issue.  The TrajectoryPlanner is not ever being initialized.  As a temporary workaround try adding:
> >  
> > CM.SetAbort();
> > CM.ClearAbort();
> >  
> > Before making any calls that would add trajectory.  This will be fixed in the next version.
> >  
> > Thanks
> > TK
> >
> >
> > --- On Fri, 7/8/11, bradodarb <bradodarb@> wrote:
> >
> >
> > From: bradodarb <bradodarb@>
> > Subject: [DynoMotion] Re: Object access
> > To: DynoMotion@yahoogroups.com
> > Date: Friday, July 8, 2011, 8:28 AM
> >
> >
> >  
> >
> >
> >
> > I also wanted to follow up that I can call StraightTraverse to any position without issues.
> >
> > _______________________________________
> >
> > I can consistently produce the access violation exception with the following methods:
> >
> > A.
> > 1) Call StraightTraverse to all zero/ Or call do not call Straight feed at all.
> > 2) Call StraightFeed or ArcFeed with any of the position params not equal to zero.
> >
> > B.
> > 1) Call StraightTraverse to a non-zero position.
> > 2) Call StraightFeed or ArcFeed with all of the position params equal to zero.
> >
> > I can make calls to all the methods without exceptions or errors if I do the following:
> >
> > C.
> > 1) Call StraightTraverse to all zero/ Or call do not call Straight feed at all.
> > 2) Call StraightFeed or ArcFeed with all of the position params equal to zero.
> >
> > -Brad Murry
> >
> > --- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@> wrote:
> > >
> > > Hello,
> > >
> > >
> > > I am testing the coordinated motion API that I have wrapped in c#. It seems that I can manipulate public members fairly well.
> > >
> > > There is a problem I have with ArcFeed and StraightFeed.
> > >
> > > If I pass in all the position parameters as 0.00's everything is happy, I get no errors from the kflop nor the debugger.
> > >
> > > When I pass in values that would actually produce motion
> > > (I am trying the exact positions as in the Simple CoordMotion C++ example)
> > >
> > > I get an access violation exception.
> > >
> > >
> > >
> > > I am wondering if I am instantiating the CoordMotion class poorly on the C++ side.
> > >
> > >
> > >
> > >
> > > When I instatiate a new CoordMotion it calls this in my c++ export DLL:
> > >
> > > dllexportmethod(args)
> > > {
> > > CCoordMotion *CM
> > > CM = new CCoordMotion;
> > > *handle = (long)CM;
> > > CM->m_board = boardnum;
> > > }
> > > the handle was an Intptr in c# that was passed by reference
> > > and I now use the handle to ref the CCoordMotion instance
> > > in subsequent calls to the coordmotion object so it follows this pattern:
> > >
> > >
> > >
> > > CCoordMotion *CM = (CCoordMotion *)handle;
> > >
> > > CM->[CCoordMotion Function call here]();
> > >
> > >
> > >
> > >
> > > Again this works fine with most members and I only get an exception when commanding actual motion( no probs sending all zeroes )
> > >
> > > Is it OK for CKMotionDLL class and CCoordMotion class to exist simultaneously? Are the fighting over the board?
> > >
> > >
> > > hmm... maybe I am not enabling all the motors - but I get an error from the board if I do that from KMotionDLL, and here I get no errors other than the exception.
> > >
> > >
> > > Thanks,
> > >
> > > Brad Murry
> > >
> >
>
Group: DynoMotion Message: 1466 From: bradodarb Date: 7/8/2011
Subject: Re: Object access
Hello Tom,

Scratch that last one,I had a bad axis map.


I am a little confused about the ArcFeed function args.


I have never seen arcs defined using this nomenclature, so I'm not sure what to do with it:


(double DesiredFeedRate_in_per_sec, int plane,
double first_end, double second_end,
double first_axis, double second_axis, int rotation,
double axis_end_point, double a, double b, double c, int sequence_number, int ID)


IS there a manual I am overlooking?


Thanks,
-Brad Murry

--- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@...> wrote:
>
> Hello Tom,
>
> I may have claimed victory a little soon.
>
> I am able to make the calls, but now it just 'hang's at that point in code.
>
> It set my console app come to the foreground, so I thought it was happy, but once I hooked it up to my test rig and got no motion I paused the debugger to see it was stuck on a call to StraightFeed.
>
>
>
> Thinking that I may have so weak of a motion profile, I played around with the Motion Parameters and set accels/speeds way high, but no change.
>
>
> Interesting to note that on StraightTraverse it does not move either, though it does sucessfully return from that function.
>
>
>
>
> I should also state that I only have one motor hooked up to my rig.
>
>
> -Brad Murry
>
> --- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@> wrote:
> >
> >
> > Excellent Tom,
> >
> > I now have CoordMotion wrapped up and ready for beta.
> >
> >
> > Thanks so much,
> >
> > Brad
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Brad,
> > >  
> > > Yes I see the issue.  The TrajectoryPlanner is not ever being initialized.  As a temporary workaround try adding:
> > >  
> > > CM.SetAbort();
> > > CM.ClearAbort();
> > >  
> > > Before making any calls that would add trajectory.  This will be fixed in the next version.
> > >  
> > > Thanks
> > > TK
> > >
> > >
> > > --- On Fri, 7/8/11, bradodarb <bradodarb@> wrote:
> > >
> > >
> > > From: bradodarb <bradodarb@>
> > > Subject: [DynoMotion] Re: Object access
> > > To: DynoMotion@yahoogroups.com
> > > Date: Friday, July 8, 2011, 8:28 AM
> > >
> > >
> > >  
> > >
> > >
> > >
> > > I also wanted to follow up that I can call StraightTraverse to any position without issues.
> > >
> > > _______________________________________
> > >
> > > I can consistently produce the access violation exception with the following methods:
> > >
> > > A.
> > > 1) Call StraightTraverse to all zero/ Or call do not call Straight feed at all.
> > > 2) Call StraightFeed or ArcFeed with any of the position params not equal to zero.
> > >
> > > B.
> > > 1) Call StraightTraverse to a non-zero position.
> > > 2) Call StraightFeed or ArcFeed with all of the position params equal to zero.
> > >
> > > I can make calls to all the methods without exceptions or errors if I do the following:
> > >
> > > C.
> > > 1) Call StraightTraverse to all zero/ Or call do not call Straight feed at all.
> > > 2) Call StraightFeed or ArcFeed with all of the position params equal to zero.
> > >
> > > -Brad Murry
> > >
> > > --- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@> wrote:
> > > >
> > > > Hello,
> > > >
> > > >
> > > > I am testing the coordinated motion API that I have wrapped in c#. It seems that I can manipulate public members fairly well.
> > > >
> > > > There is a problem I have with ArcFeed and StraightFeed.
> > > >
> > > > If I pass in all the position parameters as 0.00's everything is happy, I get no errors from the kflop nor the debugger.
> > > >
> > > > When I pass in values that would actually produce motion
> > > > (I am trying the exact positions as in the Simple CoordMotion C++ example)
> > > >
> > > > I get an access violation exception.
> > > >
> > > >
> > > >
> > > > I am wondering if I am instantiating the CoordMotion class poorly on the C++ side.
> > > >
> > > >
> > > >
> > > >
> > > > When I instatiate a new CoordMotion it calls this in my c++ export DLL:
> > > >
> > > > dllexportmethod(args)
> > > > {
> > > > CCoordMotion *CM
> > > > CM = new CCoordMotion;
> > > > *handle = (long)CM;
> > > > CM->m_board = boardnum;
> > > > }
> > > > the handle was an Intptr in c# that was passed by reference
> > > > and I now use the handle to ref the CCoordMotion instance
> > > > in subsequent calls to the coordmotion object so it follows this pattern:
> > > >
> > > >
> > > >
> > > > CCoordMotion *CM = (CCoordMotion *)handle;
> > > >
> > > > CM->[CCoordMotion Function call here]();
> > > >
> > > >
> > > >
> > > >
> > > > Again this works fine with most members and I only get an exception when commanding actual motion( no probs sending all zeroes )
> > > >
> > > > Is it OK for CKMotionDLL class and CCoordMotion class to exist simultaneously? Are the fighting over the board?
> > > >
> > > >
> > > > hmm... maybe I am not enabling all the motors - but I get an error from the board if I do that from KMotionDLL, and here I get no errors other than the exception.
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > Brad Murry
> > > >
> > >
> >
>
Group: DynoMotion Message: 1469 From: Tom Kerekes Date: 7/8/2011
Subject: Re: Object access
Hi Brad,
 
Sorry this is a bit confusing and comes from the original EMC code.
 
if (plane == CANON_PLANE_XY)
 
then the terms "First and Second" refer to X and Y
 
else if (plane == CANON_PLANE_XZ)
 
then the terms "First and Second" refer to X and Z
 
else // YZ
 
then the terms "First and Second" refer to Y and Z
 
 
Also the term "end" indicates the final endpoint
 
the term "axis" refers to the arc center point
 
the value "axis_end_point" refers to the final position of the arc center point (which in the XY plane would be the final position of Z if the arc moves as a helix).
 
a,b,c are the final enpoints of those axes
 
ID and Sequence Number are information that are passed through all the TrajectoryPlanning and buffering and such so that if the motion is halted we are able to determine the point in the GCode source that created that particular motion and re-wind the Interpreter back to that point.
 
I hope this helps.
TK
 

--- On Fri, 7/8/11, bradodarb <bradodarb@...> wrote:

From: bradodarb <bradodarb@...>
Subject: [DynoMotion] Re: Object access
To: DynoMotion@yahoogroups.com
Date: Friday, July 8, 2011, 12:30 PM

 

Hello Tom,

Scratch that last one,I had a bad axis map.

I am a little confused about the ArcFeed function args.

I have never seen arcs defined using this nomenclature, so I'm not sure what to do with it:

(double DesiredFeedRate_in_per_sec, int plane,
double first_end, double second_end,
double first_axis, double second_axis, int rotation,
double axis_end_point, double a, double b, double c, int sequence_number, int ID)

IS there a manual I am overlooking?

Thanks,
-Brad Murry

--- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@...> wrote:
>
> Hello Tom,
>
> I may have claimed victory a little soon.
>
> I am able to make the calls, but now it just 'hang's at that point in code.
>
> It set my console app come to the foreground, so I thought it was happy, but once I hooked it up to my test rig and got no motion I paused the debugger to see it was stuck on a call to StraightFeed.
>
>
>
> Thinking that I may have so weak of a motion profile, I played around with the Motion Parameters and set accels/speeds way high, but no change.
>
>
> Interesting to note that on StraightTraverse it does not move either, though it does sucessfully return from that function.
>
>
>
>
> I should also state that I only have one motor hooked up to my rig.
>
>
> -Brad Murry
>
> --- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@> wrote:
> >
> >
> > Excellent Tom,
> >
> > I now have CoordMotion wrapped up and ready for beta.
> >
> >
> > Thanks so much,
> >
> > Brad
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Brad,
> > >  
> > > Yes I see the issue.  The TrajectoryPlanner is not ever being initialized.  As a temporary workaround try adding:
> > >  
> > > CM.SetAbort();
> > > CM.ClearAbort();
> > >  
> > > Before making any calls that would add trajectory.  This will be fixed in the next version.
> > >  
> > > Thanks
> > > TK
> > >
> > >
> > > --- On Fri, 7/8/11, bradodarb <bradodarb@> wrote:
> > >
> > >
> > > From: bradodarb <bradodarb@>
> > > Subject: [DynoMotion] Re: Object access
> > > To: DynoMotion@yahoogroups.com
> > > Date: Friday, July 8, 2011, 8:28 AM
> > >
> > >
> > >  
> > >
> > >
> > >
> > > I also wanted to follow up that I can call StraightTraverse to any position without issues.
> > >
> > > _______________________________________
> > >
> > > I can consistently produce the access violation exception with the following methods:
> > >
> > > A.
> > > 1) Call StraightTraverse to all zero/ Or call do not call Straight feed at all.
> > > 2) Call StraightFeed or ArcFeed with any of the position params not equal to zero.
> > >
> > > B.
> > > 1) Call StraightTraverse to a non-zero position.
> > > 2) Call StraightFeed or ArcFeed with all of the position params equal to zero.
> > >
> > > I can make calls to all the methods without exceptions or errors if I do the following:
> > >
> > > C.
> > > 1) Call StraightTraverse to all zero/ Or call do not call Straight feed at all.
> > > 2) Call StraightFeed or ArcFeed with all of the position params equal to zero.
> > >
> > > -Brad Murry
> > >
> > > --- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@> wrote:
> > > >
> > > > Hello,
> > > >
> > > >
> > > > I am testing the coordinated motion API that I have wrapped in c#. It seems that I can manipulate public members fairly well.
> > > >
> > > > There is a problem I have with ArcFeed and StraightFeed.
> > > >
> > > > If I pass in all the position parameters as 0.00's everything is happy, I get no errors from the kflop nor the debugger.
> > > >
> > > > When I pass in values that would actually produce motion
> > > > (I am trying the exact positions as in the Simple CoordMotion C++ example)
> > > >
> > > > I get an access violation exception.
> > > >
> > > >
> > > >
> > > > I am wondering if I am instantiating the CoordMotion class poorly on the C++ side.
> > > >
> > > >
> > > >
> > > >
> > > > When I instatiate a new CoordMotion it calls this in my c++ export DLL:
> > > >
> > > > dllexportmethod(args)
> > > > {
> > > > CCoordMotion *CM
> > > > CM = new CCoordMotion;
> > > > *handle = (long)CM;
> > > > CM->m_board = boardnum;
> > > > }
> > > > the handle was an Intptr in c# that was passed by reference
> > > > and I now use the handle to ref the CCoordMotion instance
> > > > in subsequent calls to the coordmotion object so it follows this pattern:
> > > >
> > > >
> > > >
> > > > CCoordMotion *CM = (CCoordMotion *)handle;
> > > >
> > > > CM->[CCoordMotion Function call here]();
> > > >
> > > >
> > > >
> > > >
> > > > Again this works fine with most members and I only get an exception when commanding actual motion( no probs sending all zeroes )
> > > >
> > > > Is it OK for CKMotionDLL class and CCoordMotion class to exist simultaneously? Are the fighting over the board?
> > > >
> > > >
> > > > hmm... maybe I am not enabling all the motors - but I get an error from the board if I do that from KMotionDLL, and here I get no errors other than the exception.
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > Brad Murry
> > > >
> > >
> >
>