LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save a .llb provided in vi.lib by duplicating hierarchy?

I am writing WDT to file. When using Export Waveforms To Spreadsheet File (1D).vi the data written is correct. When I try to parse the data (image attach) and not use Export Waveforms To Spreadsheet File (1D).vi (mainly because it does open and close with every write) the timestamp and data is not correct. How to parse data correctly to write to file?

 

Another option (which I am hesitant to use) is to save Export Waveforms To Spreadsheet File (1D).vi with the project and modify it but could not find how to save the hierarchy such that future versions of LabVIEW update does not replace the modified Export Waveforms To Spreadsheet File (1D).vi Vi.

Save As does not display Hierarchy option and could not find how to use LLB Manager to save the Export Waveforms To Spreadsheet File (1D).vi  from vi.lib to new location. Please advice what would be the best practice, thanks.

 

*************************************************
CLD
*************************************************
0 Kudos
Message 1 of 9
(2,571 Views)
You don't underhand the waveform data type on how the export function works. The waveform data type includes a dt.value and this is used to calculate each individual time value that is written to file. You are ignoring dt and just writing the start time.
0 Kudos
Message 2 of 9
(2,560 Views)

Could you please elaborate as to what can I modify to achieve the correct time and data using dt function or if there are any examples? I believe Export Waveforms To Sreadsheet File (1D) uses dt to calculate and for the second option I would like to use this VI but can't find a way to export and save it from the llb. I am using LV 2010. Thanks.

*************************************************
CLD
*************************************************
0 Kudos
Message 3 of 9
(2,547 Views)
Just look at the block diagram. There's an ready to use function on your waveform palette.

To do yourself, It's just a basic operation. You have a start value, an increment, and the number of elements in the array. A for loop with a shift register and an add function is all that you need
0 Kudos
Message 4 of 9
(2,539 Views)

Thanks Dennis, tried that but still does not provide the correct format after converting to string, looks like my understanding is still incorrect. I want the file to be with one value of timestamp and 4 channels. Each dequeue provides 1D array with 4 channel values. Please advice, thanks.

*************************************************
CLD
*************************************************
Download All
0 Kudos
Message 5 of 9
(2,528 Views)
I really don't know what you want. In your first post, the image says the correct format is with the export waveforms function. This writes a time value for every element in the waveform. The incorrect file has you getting the mean and writing a single value.
0 Kudos
Message 6 of 9
(2,518 Views)

yes the correct format is with the export waveforms function, I will remove the mean and try ir. As I am using write to text function this is where I need to read every value, convert to string and add to file.

Export function does what I require but dont want to open and close file with every write,I dont believe modifying the export function is a good practice?

*************************************************
CLD
*************************************************
0 Kudos
Message 7 of 9
(2,479 Views)

I did remove the mean function but still can't get the values in correct format for the file. It now write four time stamps and values of channel in next row with mutiple channel vlaues. I am looking for one reading from each channel with a single timestamp in a row. Any advice is appreciated. thanks.

 

*************************************************
CLD
*************************************************
0 Kudos
Message 8 of 9
(2,450 Views)

Hello,

 

How often is this VI being called?  Although considering performance is a good idea, it might not be necessary in this case unless you are calling it very often.

 

What exactly is happening in the subVI that you are calling (dequeue file buffer)? 

 

Nick

Applications Engineer
National Instruments
0 Kudos
Message 9 of 9
(2,426 Views)