LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make an Excel macro and Labview push to copy Labview calculated data into a cell on demand?

 

Hey there, I am a chemist so Labview and programming aren't exactly my strong point. 

We have a Labview program that we run to control and automated valve manifold that has a thermocouple and pressure transducer that displays the temperature and pressure on the "front panel" of the labview file we run.  The temperature and pressure of the manifold changes in real time while the labview is running. 
We must attach a sample to the manifold, take the pressure and temperature, then record those values in an excel spread sheet, one at a time.



What I would like to do is make a key board macro in excel to automatically type in the current read out of the temperature (and another for pressure) into which ever selected excel cell you are on, so that you don't have to switch back to the labview window to look at it.  I have a very basic understanding of macros in VB but I don't know how to get the labview to make the read outs available for the excel macros to find it.

Thanks for the help, Here is a screen shot of the block layout of the program.

Message 1 of 7
(3,270 Views)

Also here are the system stats
LabView 7.1
Excel 2002 10.26.....
Windows XP SP2

0 Kudos
Message 2 of 7
(3,267 Views)

Why not have LV put the data in Excel for you?  You can use Actvie X to do this.  There is plenty of information on the forum and knowledge base on how to use Active X and reporting to Excel.  Plus you have the example finder.  Do you have the Report Generation Toolkit?  LV7 is quite old, so I don't know if this is an option for you.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 3 of 7
(3,256 Views)

Why does your subject title say PUSH when what you are trying to do is PULL data from the LabVIEW VI or executable into Excel?

 

If you have Excel application open, then it is probably easier to have LabVIEW write to Excel using ActiveX automation. There are included examples on ActiveX automation and Excel.

0 Kudos
Message 4 of 7
(3,252 Views)

@nyc_(is_out_of_here) wrote:

Why does your subject title say PUSH when what you are trying to do is PULL data from the LabVIEW VI or executable into Excel?

 

If you have Excel application open, then it is probably easier to have LabVIEW write to Excel using ActiveX automation. There are included examples on ActiveX automation and Excel.



I'd say "push" is accurate.  He is in LabVIEW and trying to take data from LabVIEW and push it into Excel.

 

If he was writing an Excel program, then I'd say he was trying to "pull" data from LabVIEW.

0 Kudos
Message 5 of 7
(3,245 Views)

No, he says he wants to write an Excel macro.

0 Kudos
Message 6 of 7
(3,241 Views)

Bob,

 

I have a similar application where we use a macro to pull data into Excel from a LV app using DDE server.  A DDE server is implemented in LV using the NI lib and a macro in the Excel reads data from the DDE server and automatically enters several values into the correct cells.  We chose to use this method because the LV program is usually running in the background and the technician is actively using Excel. 

0 Kudos
Message 7 of 7
(3,236 Views)