Skip to main content
Submitted by crabtrer on Wed, 11/03/2010 - 08:10

I've got a primarily C# app that's been working with XP for the better part of 4 years, and we're starting to move everything over to Windows 7. I used SmartTerminal to register the controller like usual, but when trying to open a connection, I get an "Invalid Controller Handle" error.

Has registration been changed for Windows 7?

Thanks,
Lee

Comments 6

crabtrer on 11/03/2010 - 09:32

Okay, that makes sense, I guess. Can controllers be registered through GalilTools? We've always used SmartTerminal for that.

Thanks,
Lee

crabtrer on 11/08/2010 - 12:44

Okay, so the mechanics of connecting and communicating with a controller aren't all that different, but there is a LOT of stuff missing from the GalilTools APIs. Unless I'm missing something, almost all of the utility methods from the previous API are unavailable.

The biggest missing functionality (as far as our software is concerned) has to be the ability to wait for one or more axes to finish moving.

This seems a LOT more low-level than the previous libraries. Is there a reason for that? And are there any plans to reimplement parts of the previous API?

Thanks,
Lee

Galil_DJR on 11/08/2010 - 13:04

You are right, there are many fewer API calls. The reason for this was to simplify the calls to the fundamentals. The omitted function calls were those that were easily built with the available ones. For example, waiting for motion complete on axis A is as simple as:
[code]
while (atoi(g.command("MG_BGA").c_str()) == 1);
[/code]

Also, the previous library provided just one implementation of these convenience functions. Taking motion complete as an example, there are many implementation paths one may take. The following is a list in increasing elegance, based upon the availability of certain controller features.

1. Polling _BG. This is the lowest performance method, and is supported on all motion controllers. This is also how the previous generation library provided this feature.

2. Using data record. This doesn't require the controller to be polled, and is the most efficient way to push data to the host pc. The GalilTools lib provide record() and onRecord() to retrieve this data. Only controllers supporting the DR command would work here. QR provides a polled version of the data record.

3. Using interrupts. PCI bus controllers, and the DMC-4xxx have an interrupt mechanism which is the most elegant way to detect motion complete. interrupt() and onInterrupt() provide this functionality in the GT libs.

In conclusion, the library may look more sparse, but it is actually more powerful, faster, and is arguably easier to use.