From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to to continuously average dynamic voltage data

Solved!
Go to solution

Hey
Thanks for that code, it helped me a lot. I'm new to Labview and was wondering how I can write the averaged signal into a text or excel file (whichever is easier)?

Thanks!

0 Kudos
Message 21 of 26
(1,938 Views)

Hi Poly…,

 


@Polyplacophora wrote:

how I can write the averaged signal into a text or excel file (whichever is easier)?


Use any of those file functions!

Start with CSV files aka delimited text files aka "spreadsheet files"…

 


@Polyplacophora wrote:

I'm new to Labview


Did you note that "Training resources" section in the header of this LabVIEW board?

Did you explore the example VIs found in the example finder?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 22 of 26
(1,935 Views)

Hi GerdW

thanks for your answer.
The problem is that this is not quite working.

Polyplacophora_0-1605020838740.png

This is the code I'm using and it will only write one measurement into my excel file. However, I would like to have one column on date, time and value.

 

All the best

Annabell

0 Kudos
Message 23 of 26
(1,933 Views)

Hi Annabelle,

 


@Polyplacophora wrote:

The problem is that this is not quite working. This is the code I'm using and it will only write one measurement into my excel file. However, I would like to have one column on date, time and value.


The code is doing exactly what you have programmed to do: "write one sample when the VI finishes"!

 

There is no code to write any timestamps and no code to write more than one sample.

I also suggested to start with plain text file functions instead of ExpressVIs and "Excel files"…

 

Hints:

As long as the AutoCleanup tool improves your code (aka make it more readable) your coding style is bad…

You really should take those "Training resources": you don't need to combine autoindexing in a FOR loop with ArraySize to determine the number of iterations…

There also is a SumArray function! And there is a Mean function…

The DAQAssistent gives you a waveform hidden in the DDT wire: that's a special LabVIEW datatype! It's so special it also contains the timestamp information you are looking for…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 24 of 26
(1,929 Views)

Thanks for not being helpful at all but rather criticise all the things I've done so far. So I'll go back to googling. 

0 Kudos
Message 25 of 26
(1,924 Views)

Hi Annabelle,

 


@Polyplacophora wrote:

Thanks for not being helpful at all but rather criticise all the things I've done so far. So I'll go back to googling. 


You also aren't helpful: attaching just images of code does not allow us to debug your code with LabVIEW. We cannot edit images with LabVIEW and so I cannot provide changes to your code as VI. And because of that I just hinted on all those things you need to improve in your VI - on your own as you didn't provide that VI so far!

 

And I named several "LabVIEW things" with the exact name used in LabVIEW so that you should be able to look them up in the LabVIEW help to actually learn them…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 26 of 26
(1,914 Views)