Use Igor Pro 6.22 to Control Hardware

Hello, I'm an Intern at Alta Devices, which uses Igor 6.22 extensively.

A little about myself: I am new to Igor, am only just now learning what ActiveX means for software and hardware, and I have a background in Mechanical Engineering.

I'm on a project that will be using wafer presenters (hardware) from another company. The actions performed on these wafer presenters are written as ActiveX controls, which are called by a GUI the company wrote in VB6. My first question is this (I have done a good amount of searching, with no avail): is it possible for Igor to call ActiveX Scripts directly?

Also, in researching ActiveX in relation to Igor, I discovered there was an example file called "CallMicrosoftWord". When I try to run this project and use its macro, I receive the error seen in the image attached, and this is hampering my ability to learn ActiveX with Igor. My second question is this: what could be causing this error, and is there a way to get around it (download someone elses [fileFromImage].vbs, for example)?

Image link: http://www.igorexchange.com/files/images/Error_CallMicrosoftWord.PNG

Other Information: what I gather is that Igor can be used as a server, where other programs can easily call Igor, but I have heard that Igor cannot be used as a client, or in other words to call other programs. I am hoping this is not the problem/dead end for my project.

I greatly appreciate any help or redirection. Thanks.
Just yesterday I fixed the problem with CallMicrosoftWord.ipf. It was writing a script file to the Igor Pro folder. That was fine in XP but causes problems in VISTA and Windows 7.

I changed it to write to the Igor User Procedures folder. The fixed file will be in an Igor beta to be released soon, but I have also attached it here. Replace your "Igor Pro Folder\WaveMetrics Procedures\Utilities\CallMicrosoftWord.ipf with the one in the attached zip file and then try the example experiment again.

Quote:
is it possible for Igor to call ActiveX Scripts directly?


No. Igor can be an Active X Automation server but not an Active X Automation client.

CallMicrosoftWord.ipf shows how to fake being a client. It writes a Visual Basic script and then asks Windows Script Host to execute the file.

If your ActiveX controls can be controlled through Visual Basic, you may be able to achieve what you want using this technique. Start by running the CallMicrosoftWord demo (after installing the new procedure file). Then read CallMicrosoftWord.ipf and see if you can make sense of it. Hopefully someone with Igor programming experience is available at your location.

Next, copy CallMicrosoftWord.ipf to the Igor User Procedures folder and rename it with your own name. This is your personal file that you can now modify. Start with the simplest possible task and then try progressively more complex tasks.

I will be in an airplane much of tomorrow but will be available afterwards.
hrodstein wrote:
...
Next, copy CallMicrosoftWord.ipf to the Igor User Procedures folder and rename it with your own name. This is your personal file that you can now modify. Start with the simplest possible task and then try progressively more complex tasks.


Just to be clear, Howard means to copy CallMicrosoftWord.ipf to:

C:\Users\YourName\My Documents\WaveMetrics\Igor Pro 6 User Files\User Procedures

The simplest way to locate this folder is by choosing "Show Igor Pro User Files" from Igor's Help menu.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
It's probably better to copy it to:

Igor Pro 6 User Files\Igor Procedures

since this is a procedure that you will be using all of the time.

To learn about Igor Pro User Files, execute:
DisplayHelpTopic "Special Folders"

Thanks very much.

I was able to run the example properly this time, once I copied the CallMicrosoftWord.ipf file to C:\Program Files (x86)\WaveMetrics\Igor Pro Folder\WaveMetrics Procedures\Utilities, where the original one was stored (and replaced the original).

As it turns out, the company did mention their GUI is in VB6, and the GUI then runs the ActiveX scripts, so there is hope this will be possible. I will be working closely with them and their machine next to confirm.

Again, thanks for your prompt response. I hope you have a safe flight, and I will try to post something here upon success of the task at hand.

Troy, Alta Devices Metrology Intern
A little update: I talked with the company (Franklin MCI) that makes the equipment (Wafer Presenter S468) we are trying to interface with, and I learned a lot.

It turns out that the machine is communicated with by serial, so that is a valid option (using the VDT2 commands). However, they wrapped up some standard command-sets in an .ocx file, and if we could take advantage of this, that would be spectacular. Is there any way to take advantage of a .ocx file through Igor?

If not, porting their code into Igor code is my next best bet.

Thanks,

Troy, Alta Devices Metrology Intern
Quote:
It turns out that the machine is communicated with by serial, so that is a valid option (using the VDT2 commands). However, they wrapped up some standard command-sets in an .ocx file, and if we could take advantage of this, that would be spectacular. Is there any way to take advantage of a .ocx file through Igor?


A .ocx file is an "ActiveX control" - a visual widget implemented using ActiveX (previously called OLE and based on COM). ActiveX controls are meant to be embedded in standalone programs. However, Igor does not support embedding ActiveX controls.

In theory you could write an Igor XOP to embed the ActiveX control. I did that once. It was painful. I created documentation and an example. I don't recommend it unless you have an pretty-good understanding of C++, ActiveX, and MFC.

Quote:
If not, porting their code into Igor code is my next best bet.


I think this will be much easier.