Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2008, 11:13:14 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach SDK plugin questions and answers.
| | |-+  Movement plugin problems
Pages: 1   Go Down
Print
Author Topic: Movement plugin problems  (Read 704 times)
0 Members and 2 Guests are viewing this topic.
fieldofcows
Regular Member

Offline Offline

Posts: 1


View Profile
« on: July 12, 2008, 06: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
Logged
da21
Active Member

Online Online

Posts: 80



View Profile WWW
« Reply #1 on: July 13, 2008, 03:33:17 AM »

yes i'll give you a help , contact me directly off list and we can work through it with out cloggin up the forum

i'll need to know your setup etc

Dave
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!