LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Output 2 array elements onto excel spreadsheet

Hello all, I am fairly new to LabVIEW and need some help.

I'm trying to measure the output of a multimeter and send it on the the excel filesheet.

The scenario is like this:

I'm using 4 sequences
The mutlimeter and power supply stated below are physical power supplies using VISA session


1st Sequence
Controls the power supply and adjust the voltage to 5 volts
Obtain measurements from multimeter

2nd Sequence
Timer wait 500ms

3rd Sequence
Controls the power supply and adjust the voltage to 0 volts
Obtain measurements from multimeter

4th Sequence
Timer wait 500ms

All these sequence are wrapped around by a infinite while loop. And will stop looping once the stop button is pressed.

What I want to achieve is to store the measurements of the multimeter when 5 volts and 0 volts is supplied and store it into a spreadsheet(the same spreadsheet with both measurements). These measurement will be stored continuously untill the stop button is pressed. So I can see a list of measurements.

The problem I'm having now is that it only stores the last measurement and overwrites the old ones.

Below is a copy of my VI. Please help me out here. Thank you
0 Kudos
Message 1 of 5
(3,083 Views)
Wire a True constant to the "append to file" node of the Write to Spreadsheet File.vi


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 2 of 5
(3,079 Views)
Thanks for the quick reply.

That is not really what I want to do. I want the measured outputs be put into an array and then the output of the array sent to a spreadsheet.

Here is a better explanation:

When power supply is 5V
Get the value from the multimeter and put it into an array

When power supply is 0V
Get the value from the multimeter and put it into an array

The above 2 sequence will loop inifinately untill the stop button is pressed to stop the while loop. Then all the measured data will be output from the array into a spreadsheet.
0 Kudos
Message 3 of 5
(3,065 Views)

First of all you are not sabing to an Excel file you are saving to a tab delimited text file.

A couple of suggestions:

  1. Learn datflow. if you use the error in and out clusters it will give you the same effect.
  2. inside the sequence you have two VI's one for power supply and one for the meter. there is no guarantee that the power supply is going to run first (I assume this is the way you want it) again this has to do with dataflow.
  3. I would suggest you look at some examples regarding arrays and file io and LV in general.
  4. Post the VI's for power supply and for the meter. I would like to know why they are returning the arrays and not individual readings.

Have fun, I hope I was not to brutal




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 4 of 5
(3,045 Views)
Not having the subvi's on hand, i'm just guessing here.

There's a coupla ways to accomplish this - here's an example using a shift register and a sequence local.


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 5 of 5
(3,033 Views)