LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Manipulate an .exe file with Labview

I have an equipment that comes with an .exe software analysis package, and enables you to perform measurements and the measured results are stored in a .txt file. However, the user has to click a series of buttons to perform all the analysis before the measured results can be obtained. Is it possible to develop/use a Labview program that allows the automation of the clicking of those buttons so that real-time analysis can be performed for a closed-loop system?
0 Kudos
Message 1 of 18
(4,480 Views)
Does the .exe have an ActiveX interface? Does it have a .NET interface? If yes to either, then yes to your question. Otherwise, you will need to use some sort of automation software, like AutoIt.
Message 2 of 18
(4,443 Views)


@KellyKelt wrote:
I have an equipment that comes with an .exe software analysis package, and enables you to perform measurements and the measured results are stored in a .txt file. However, the user has to click a series of buttons to perform all the analysis before the measured results can be obtained. Is it possible to develop/use a Labview program that allows the automation of the clicking of those buttons so that real-time analysis can be performed for a closed-loop system?



It depends on the button type.  If not standard Window objects, like LabVIEW buttons, you have to simulation clicks, like AutoIt did.  The fact that you have to click a series of buttons make it hard to simulate.  Image while you're simulating clicks, user accidently touched mouse!

 

On the otherhand, If they are standard Window objects, you can send a mouse click message to it.  It can't distingush whether the message is from the OS, or from LabVIEW.  You can even capture the window, make it part of (a child window) of your VI.

 

In any case, automate an application, has to be customize made.

 

George Zou

http://gtoolbox.yeah.net

 

George Zou
Message 3 of 18
(4,429 Views)
Hi smercurio_fc,

Many thanks for the information. The .exe file does not come with any interface files, but a bunch of .dll files. I had a look at AutoIt, and it seems to be the promising tool I need.

Thanks again!

Best regards,
KellyKelt
0 Kudos
Message 4 of 18
(4,411 Views)
Hi Zou,

Many thanks for the information you have provided. AutoIt seems to be able to solve my problems. Thanks for taking the time to reply me.

Cheers,
KellyKelt
0 Kudos
Message 5 of 18
(4,410 Views)
Hi I have a similar application where the s/w corresponds to controlling  NI h/w.But good thing is i have labview backend codes of it.So i am able to automate the s/w.But i was struck at where when i am providing some input to this s/w simultaneously i need to provide similar settings to other GUI which was developed in (c#).Can i automate that with labview??.So that everything is in labview.Can i get dump of all controls from exe to labview VI by doing something so that i can automate it. 
0 Kudos
Message 6 of 18
(4,140 Views)

Your question is a bit confusing. You said you have software that controls some NI hardware, and you have LabVIEW "backend codes" for it so you are able to automate it. I don't really understand what that means. Is this LabVIEW code that you have? If it's NI hardware you should be able to control it directly from LabVIEW. You then said that you need to provide some input to this software simultaneously. Simultaneously to what? You then said you have some other GUI written in C#, and want to know if you can automate that.

 

Now I'm confused as to what you're trying to automate. Smiley Surprised

Message 7 of 18
(4,120 Views)
I also have a similar problem. We have a program that came with a test machine but needed to create a program to record the values from not only the machine but also other instruments through RS-232. My boss created a program written in visual basic to accomplish this that called OLE methods from the test machine's .exe. Now we want to switch to a program written in Labview but I can't seem to get the .exe registered as an ActiveX .EXE on my development computer. I always get Error 3005. I've opened the program, tried manually registering it using the START-Run-<ActiveX .exe location> /regserver, and the Registration Utility on some knowledgebase, I've even just pasted a copy of the .exe into the Windows system32 folder with no luck. My last resort is to create a dll in visual basic that makes the reference (if possible) and use it in my Labview program.
0 Kudos
Message 8 of 18
(4,029 Views)
As far as I know, unless the VB app was also configured as an OLE server you won't be able to register it since there's nothing to register. As far as how to do that, it's been so long since I've used VB 6 that I don't remember. Check the documentation, as it will be in there.
0 Kudos
Message 9 of 18
(4,023 Views)
I don't know what language the test machine's program was created in. I don't understand why, if the OLE methods are accessible in visual basic; I can't seem to make the connection with Labview.
0 Kudos
Message 10 of 18
(4,021 Views)