|
Hello,
I am having some difficulty receiving callbacks from the CCoorMotion:
I do not recieve any callbacks, but for brevity I will just discuss the
STRAIGHT_TRAVERSE_CALLBACK
In my export dll, I am trying to use the same pattern as I have done successfully with the KMotion ConsoleCallback to recieve messages back from the card such as compile errors or if I run a C program with a printf.
I am setting the objects up in the DLL like so:
STRAIGHT_TRAVERSE_CALLBACK *StraightTransverseHandler=NULL;
void LocalStraightTransverseHandler(double x, double y, double z, int sequence_number)
{
return StraightTransverseHandler(x, y, z, sequence_number);
}
Then I have an exported method to wire things up:
SetStraightTraverseCallback(long *handle, STRAIGHT_TRAVERSE_CALLBACK *p)
{
CCoordMotion *CM_dll=(CCoordMotion *)handle;
StraightTransverseHandler = p;
CM_dll->SetStraightTraverseCallback(LocalStraightTransverseHandler);
}
That I call from the c# side and pass in a delegate with the right function argument signature.
It all runs with no errors, I just do not get any callbacks when I call a straighttraverse.
**
If I open the KMotion Axis dialog and run my test app, I do see the axis dest. change there as expected.
Thanks,
Brad Murry
|