LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Averaging in VILogger

(Note: No VILogger category to choose from while posting.)
I am trying to get just one average value out of all the acquired data on a channel. I have read the KB Document (34PGEQ7U) and tried the averaging explained there, but that is not what I want.
I want to scan at 1000 scans/sec for 1 sec. That will leave me with 1000 readings. I want an average of this 1000 readings, which will be just one value. Can I do this in VILogger?
0 Kudos
Message 1 of 8
(3,428 Views)
You can do this with VI Logger if you run VI Logger from LabVIEW and use the VI Logger API to retrieve the data. Once the data is retrieved in LabVIEW, you use the "Add Array Elements" function and then divide by the number of scans in your array to get the average.

There is no setting in the VI Logger task that allows you to do this if you are running VI Logger in MAX.
0 Kudos
Message 2 of 8
(3,428 Views)
I don't have LabView, so I am stuck with just VILogger in MAX. I am now trying to somehow modify the data I export from VILogger (using JavaScript or similar in HTML format), but I am not sure if that's possible either. A simple average function would have been great to have to display the acquired date more meaningfully. Also there is no way to append data to an exsisting file, so every export has to be a new file or an overwrite. 😞
0 Kudos
Message 3 of 8
(3,428 Views)
I made a quick program for you that might do what you want. Put the exe and the dll in the same directory and see if it works.
Download All
0 Kudos
Message 4 of 8
(3,428 Views)
Thanks! But which directory should I run this from? When the 'Select a run' dialog box comes up it's empty. I set the default directory to '...\ViLogger\data' and that didn't work.
0 Kudos
Message 5 of 8
(3,428 Views)
The directory shouldn't matter as long as you have both the exe and dll in the same directory.
Is it possible that the scroll bar on the right in the "Select a run" dialog is all the way down and that you need to scroll up to see them?

Also, you could try to place both the exe and the dll in you \windows\system32 directory.
0 Kudos
Message 6 of 8
(3,428 Views)
Tried both. Still the 'Select a run' dialog comes up empty. I am now thinking of writing a VB app to select an exported CSV file and create an HTML out of it with averages.
0 Kudos
Message 7 of 8
(3,428 Views)
Add this dll to your system32 directory and try again.
0 Kudos
Message 8 of 8
(3,428 Views)