LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Channel name lost when averaging waveform

Hi, I am writing an application where data is acquired for DAQ continuously. Data is averaged for example every 1ms and then written to file. Problem is that channel names are lost when doing averaging. I am using 'averaged DC-RMS.vi'. I could copy the attribute before averaging and then write them back afterwards, but doesn't sound like good solution for streaming data application with several channels. Is this a bug or feature? Is there any other way to maintain channel names?

 

BR Marko 

 

Here is sample picture:

 

 

0 Kudos
Message 1 of 10
(3,693 Views)

Hi Marko,

this information will be lost in the "average ..." vi, because the ouput is create new with only writing the start time, dt and the values. I think a solution for you can be to copy the specified vi and connect the input wavefrom to the build waveform functions. I think then you will have the attributes after the average.

 

Mike

0 Kudos
Message 2 of 10
(3,684 Views)

Hi, thanks for the help. I modified the vi to pass also attributes, not a big change in code. It works fine now. Why this is not included in the original vi ??? One thing more 'Average DC-RMS.vi' is part of NI_MAPro.lvlib. I could not find out how to save own copy to different place and not to modify original file/lib. Any ideas?

 

BR Marko

0 Kudos
Message 3 of 10
(3,676 Views)

Hi Marko,

you can copy the entire lib. Open it and disconnect the vi you want from the library.

 

Mike

0 Kudos
Message 4 of 10
(3,670 Views)

Hi, I copied the lib, but I don't know how to disconnect vi. Could you help me?

 

Marko

0 Kudos
Message 5 of 10
(3,646 Views)

Hi Marko,

the library is locked, i think you can´t disconnect it from the library. Sorry. But you can copy the code into a new vi.

 

Mike

0 Kudos
Message 6 of 10
(3,637 Views)

Hi Marko,

 

I have toiled with this same problem, without finding a solution.  It seems trivial enough, yet the answer still eludes me.  Could you please post your code for others to learn from.

 

Thanks

 

Alan

 

 

0 Kudos
Message 7 of 10
(3,493 Views)

Hi Alan,

 

What is problematic with "connect the input wavefrom to the build waveform"? Wire the input waveform to the first input of the "build waveform" function...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 10
(3,487 Views)

Hi,

 

DC RMS.vi file is located in ...\National Instruments\LabVIEW 8.2\vi.lib\measure  (I am not sure can file be still modified in LV 8.6)

 

I modified it like this (attachment):

 

 

BR Marko

0 Kudos
Message 9 of 10
(3,478 Views)

Hi Marko,

 

In spite of an unusually dense skull, I was able to work out a solution yesterday.  Armed with the hint provided by Mike, I skinned this cat slightly differently.  I know I have not modified the RMS branch; I’ll do that later.

 

Thanks everybody,

 

Alan

0 Kudos
Message 10 of 10
(3,461 Views)