LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a command to another application using Labview

Hi All,
I have a query. I am using two softwares for my experiment. I am calling coboldpc from Labview. What I need to do is when I call cobold pc from Labview, as soon as coboldpc opens it should start executing new.ccf file. I am able to call coboldpc from labview . How can I pass a command 'execute new.ccf' to coboldpc by using Labview! Thanks a lot in advance to the person who has answer to this.

Maithili
0 Kudos
Message 1 of 9
(3,989 Views)
The question is how do get the cobold program a new file when you run it from the dos command line or from the Run command on the windows Start button? System Exec has two ways to pass parameters to an exe file. One way is all on the command line input - "Excel.exe filename.xls". The other way is via the standard input. If your executable supports neither, then I don't think you'll be able to do what you want. I'm not familiar with the executable you're calling but I would go through their documentation or contact them to see how the program accepts parameters. Also, a lot of programs these days have an ActiveX interface. If your program was written this way, then you can use it's ActiveX properties and methods.
Message 2 of 9
(3,989 Views)
Hello Mr.Dennis,

Thanks for the help. CoboldPc does not support the option of writing all on command line. How can I send the standard input! I have tried the option of writing a bat file. I am going through the documentation of coboldpc.

Thanks again,
Regards,

Maithili
0 Kudos
Message 3 of 9
(3,989 Views)
If the program doesn't support command line options, you're going to have to take a different approach. This first place I'd go is the vendor and see what they have to say. If it's a windows program you might be able to use window's messaging functions and control it that way. George Zou's G Toolbox has some functions for this - unfortunately I don't have a working link to his site right now.
0 Kudos
Message 4 of 9
(3,989 Views)
Hello,

I have sent some emails to the vendor. I have not yet received any constructive email from them which can help me out. CoboldPC is a windows application. How can I reach the help by which I can pass the command using windows function.

Thanks again for the guidance!

Regards,

Maithili
0 Kudos
Message 5 of 9
(3,989 Views)
Dennis Knutson wrote:
> George Zou's G Toolbox has some functions for this -
> unfortunately I don't have a working link to his site right now.

Following this link:
http://gtoolbox.yeah.net
0 Kudos
Message 6 of 9
(3,989 Views)
Hello,

While trying through command line I get an error. 'ProcessShellCoommand failed'. Do you have any idea how can I avoid this error or cause of the error.
I am not getting much by this link how to use windows programming.

Thanks again,

Maithili
0 Kudos
Message 7 of 9
(3,989 Views)
Maithili wrote:
> Hello,
>
> While trying through command line I get an error.
> 'ProcessShellCoommand failed'. Do you have any idea how can I avoid
> this error or cause of the error.
> I am not getting much by this link how to use windows programming.
>
> Thanks again,
>
> Maithili


If CoboldPc does not support the option of writing all on command line
as you mentioned before, I wouldn't surprise you'll get error.

What do you mean by "send the standard input" ? How to you use CoboldPc
manually ?
0 Kudos
Message 8 of 9
(3,989 Views)
I did a google search for CoboldPC and found the user manual. I saw that it was indeed a windows program but it does have a startup batch file capability. Have you tried calling the .bat file from the system exec vi? If you're having problems with that, setting the working directory to the path where the .bat file resides might help. If you're trying to accomplish something that CoboldPC doesn't accept in a .bat, then maybe you can use the .dlls that the documentation mention. One is called DAQ.dll for hardware control and the other is called DAN.dll for analysis. LabVIEW has the Call Library Function Node for interfacing to dll's and if the functions prototypes are defined somewhere, you could skip the whole Cobo
ldPC user interface.
0 Kudos
Message 9 of 9
(3,989 Views)