LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Return Values from an Executable?

Hi,

I appreciate taking the time to read my post.  My issue is as follows:

I am building a stand-along application in LabVIEW to configure a digital multimeter (34411A) and take a given number of measurements.

The executable will be called from a TCL interface, which is how our test infrastructure is developed.

Is there a way to have LabVIEW return values (in this case, the DMM measurements) after the executable is completed without having to write to a temporary file?

At the end of the day what I would like to do is call the executable from TCL and store the returned values in a local variable such as:

set X [exec ./dummy.exe]

Thanks,

 

 

Message Edited by iacosta on 04-21-2010 03:23 PM
0 Kudos
Message 1 of 10
(6,894 Views)

A search of this forum produced this result.  There are more.  Type in executable return value in the search box above.  You will have to wade through the results to look for Labview results.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 10
(6,877 Views)

tbob wrote:

A search of this forum produced this result.  There are more.  Type in executable return value in the search box above.  You will have to wade through the results to look for Labview results.

 


I have seen the link you provided in the past; however, the topic is from 2002.  I wanted to know if other advances have been made since.  Also, the link they provided is no longer available...

Thanks for your help

0 Kudos
Message 3 of 10
(6,873 Views)

I don't think any advancements have been made here.  Executables were not meant to generally return any values.  When you run an exe, you rarely get anything back.  The program runs, then quits.  EXE is meant to be a stand alone program.  You would be better off to create a DLL like the 2002 link advises.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 10
(6,862 Views)

Hi,

 

What are you going to be using the data for?  What is the reasoning behind not having some sort of temporary file?  Please provide a few more details as to why you'd like to do this and I'll do my best to assist. 

 

Cheers, 

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 5 of 10
(6,838 Views)

Hi,

 

We are considering migrating from a GPIB to a USB interface as it's much faster fetching a large number of points from the 34411A multimers.  LabVIEW has already a very comprehensive library of driver files for the Agilent 34411A, and  I would like to employ these to build multiple VIs to configure and acquire data with via USB and generate executables I can call from our automated test suite in TCL.

 

Calling the VIs and passing input parameters to configure the DMM has been a success; however, returning a value from an executable has been problematic.  Having temporary files would simply add an additional layer.  In my test, I need to store the DMM data in a variable such that it can 'massaged' and put in the format for post-processing.  Data manipulation is already built-in within our test.  It would make our migration a lot simpler if all I have to do is to replace a single line of code to fetch the data using a LabVIEW executable instead of our GPIB commands, which currently return values when called.

0 Kudos
Message 6 of 10
(6,780 Views)

Does you "automated test suite in TCL" require calling executables only.  By executable, do you mean an exe file?

It seems that it would be much better if you wrote the whole code in Labview and use Test Stand as the test executive.  But I'm sure that would be more costly.

How does a GPIB call return values in your current test executive (I've never heard of TCL)?

- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 10
(6,762 Views)

TCL (pronounced teekle) is a tool control language popular in scripting and test automation.  There's no point of rerewriting every single test from TCL to LabVIEW to simply change the way the data is fetched.  I would like to make the migraton process as smooth as possible. 

 

It doesn't have to be an executable, but it would be a great way to incorporate LabVIEW into our testing architecture without major disruptions.  For example, instead of using the command:

 

meter1 measure volt:DC? (Standard Commands for Programmable Instruments)

 

, which will trigger the multimeter 'meter1' and return the measured values, I would simply have simply have to call the LabVIEW executable and have it return the same values in the same fashion.

 

We are trying to make an effort to take advantage of some of the LabVIEW features , but we it may not be the right tool for our needs.

0 Kudos
Message 8 of 10
(6,744 Views)

Sorry, I would not know how to make a Labview executable output a value to Stdout.  Stdin and Stdout are the vehicles for inputting values to and getting values from an executable.  Maybe someone else can chime in here.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 9 of 10
(6,726 Views)

Just stumbled over the tcl84.dll which enables LabVIEW to run TCL scripts. Perhaps this can come in handy for some of you guys...




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)


0 Kudos
Message 10 of 10
(5,911 Views)