LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

doubt regarding writing to spreadsheetfile.vi

I have created a VI that records the voltage values from 8 channels. I want to record it in the ascii file. So, I am using the write to spreadsheetfile.vi. I need to know how do I connect it in my VI. I am getting the problem of asking for multiple paths for saving when I put the spreassheetfile.vi in the while loop. But I am unable to keep it outside the while loop. Can anyone pls help me. I am attaching my VI.Thanks.
0 Kudos
Message 1 of 28
(3,559 Views)
Hello,

saving in the midle in the cycle may lead to some acquistion timming problems. Saving on every cycle iteration will increase the Ts. So I recommend that you save all the values in one array. And then, save into a file. This is only one approach.

See the attached file.
Software developer
www.mcm-electronics.com





PORTUGAL
Message 2 of 28
(3,531 Views)
I am unable to open the VI u send to me as I am using the Labview 7.1 version. Can u pls resave it in the version and send to me again. Thanks.
0 Kudos
Message 3 of 28
(3,504 Views)
sorry,

I can only save in 8.X.

See if you can undeerstand my idea with the attache picture.

Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 4 of 28
(3,496 Views)
I am not able to understand it since its not clearly visible. But I have done this for my VI.  I am able to record the data but the data recorded was something only one set of values. I want the data values to be recorded for every second. How should i make this?
0 Kudos
Message 5 of 28
(3,477 Views)

You don't understand some of the basics of LabVIEW yet. All you are passing through the while loop is the very last results and the file write will only be called once. If all you want to do is save once every second, put your file write inside the loop. You can place it inside a case statement and use the Elapsed Time function to control the case statement.

p.s. You probably don't want to use Write to Spreadsheet File. Instead, use Write to Measurement File or Export Waveforms to Spreadsheet File. You are loosing all of the timing information in your waveform and that is generally not a good thing. The mess you have with your wires is not a good thing either and why do you have separate DAQmx Create Channel functions. All you need is one.

0 Kudos
Message 6 of 28
(3,459 Views)
how do I reduce it into one DAQmx channel create function. And u said put the file in the case structure. The file u mean here is my VI or somehing else and what is the timing information I am using here and what should I do for it?
0 Kudos
Message 7 of 28
(3,448 Views)
You use a single DAQmx Create Channel by specifying multiple channels in the physical channel input. As I said, you put the file write (whatever function you decide to use) inside the case statement. Your timing information is the important sample rate. If you don't care about recreating the waveform or if your matlab code doesn't need it, then you don't need to write it to file. If you do decide to not write it and find out you need it later, then you are out of luck.
0 Kudos
Message 8 of 28
(3,445 Views)
You use a single DAQmx Create Channel by specifying multiple channels in the physical channel input. As I said, you put the file write (whatever function you decide to use) inside the case statement. Your timing information is the important sample rate. If you don't care about recreating the waveform or if your matlab code doesn't need it, then you don't need to write it to file. If you do decide to not write it and find out you need it later, then you are out of luck.
0 Kudos
Message 9 of 28
(3,448 Views)
This VI is not working properly. when I run it I am not able to see the 7th waveform running and also all waveforms do not respond at all.
0 Kudos
Message 10 of 28
(3,440 Views)