06-14-2012 01:31 PM
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.
06-14-2012 01:33 PM
Also here are the system stats
LabView 7.1
Excel 2002 10.26.....
Windows XP SP2
06-14-2012 01:38 PM
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.
06-14-2012 01:40 PM
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.
06-14-2012 01:45 PM
@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.
06-14-2012 01:48 PM
No, he says he wants to write an Excel macro.
06-14-2012 02:02 PM
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.