LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling exe build with LabView from TestStand and passing parameters to that exe

Hi,

I am not sure if this can be done and would appreciate your help.

 

I have build an exe of my LabView VI. I can insert this EXE in Teststand sequence. However, is there a way to pass parameters to this EXE from TestStand??

 

I understand that I can call the LabView VI directly from TestStand and pass parameters. However for version control and hiding source code, I would prefer calling an EXE of the VI.

 

Looking forward to your feedback.

 

-Mim

0 Kudos
Message 1 of 4
(4,102 Views)
Passing parameters to an exe is pretty simple. You can use the application property Command Line Arguements. Look at the shipping example called CommandLine. Even easier though, imho, is to use the app builder to create a DLL and use the DLL adapter in TestStand. Then, you can not only pass parameters to it, but get return values. The same arguments for using an exe with version control and no source code can be applied to a DLL. You also won't have a LabVIEW window popping up like you would with an exe.
Message 2 of 4
(4,101 Views)
Thanks for the post.
When building the exe, I selected 'Pass all command line arguments to application property'. Are you refering to this?
 
When I insert the exe in TestStand sequence, I do not see any selections for adding parameters under 'Configure Call Executable'.
 
I am not familiar with TestStand and would appreciate if you can provide more details.
 
Thanks,
Mim
0 Kudos
Message 3 of 4
(4,096 Views)

Yes, when you build it, you have select this but you also need to read the property in your VI to actually get the arguments. That's another reason I prefer to use a DLL. I can debug a VI in TestStand by using the LabVIEW adapter and then build it into a DLL without adding some additional code. You can also pass more complex parameters to a DLL than you can an exe. Also, I don't know how or even if you can pass results back from a LabVIEW exe. In my version of TestStand, there is no provision for getting anything back with the Call Executable step anyway. Without the ability to easily get something back, the Call Executable (for me at least) is not much use.

In the Configure Call Executable, you have the Argument Expression. You would enter there any parameters in the format that your VI expects to get and parse. The format can be just about anything you want. It could be a list of numbers wher you always have tp specify every parameter. It could be optional parameters where you could specify one or more like parameterx = n.

0 Kudos
Message 4 of 4
(4,092 Views)