Hello Guest it is April 18, 2024, 09:47:17 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - fieldofcows

Pages: 1
1
Mach SDK plugin questions and answers. / Movement plugin problems
« on: July 12, 2008, 07:12:01 PM »
Hi,

I've been toying with the idea of building my own USB interface to stepper drives (like smooth stepper) so have just started looking at how to create a Mach plugin to control motion. I've been having a bit of trouble trying to get it going.

I have based my plugin on the "BlankMovement" plugin in the SDK, referring to the other samples for details on how to get it all to work. I have managed to get a fair bit of it working correctly including jogging but am having problems with the movement ring buffer. The problem is that each entry in the buffer does not contain correct information about the commanded movement.

From what I have read and seen in example source code, I would expect the "sx, sy, etc." members of GMoves for each buffer entry to contain the present or starting position of the move and "ex, ey, etc." to contain the ending move within the timeframe of the buffer entry. This is not the case. For example, issuing the MDI command G0X100 results in the first entry in the buffer containing zeros for sx, sy, sz, ex, ey and ez. Second and subsequent entries contain the same except for sz that contains an invalid floating point value (-1.#IND00).

The problem looks suspiciously like I am using the wrong version of the SDK headers for the version of Mach that I am using although I've tried it with a few versions. The SDK version is 2.62. The versions of Mach I've tried it with are R2.63, R3.041 plus a couple of other older versions. With each version I got a slightly different result but no correct results.

I am using VS2003 to compile the plugin.

Can anybody help?!

Thanks,

Roy

Pages: 1