LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does I read a HWS file that contains 2 traces, in labview? (error -21508)

Solved!
Go to solution

Dear experts,

 

I have been using a PXI-5105 acquisition card to save data from 2 channels at the same time (coming from different sensors).

Up to now I have been reading the files in Matlab, taking into consideration the group name, the trace name and the coefficients of each channel. I was able to do the post-processing of the data in Matlab. I attach an example of the kind of files I'm handling if it helps, inside a zip.

 

Now I would like to implement this post-processing (FFT, etc.) in Labview. I have tried to use a couple of examples such as "hws_low_level_read.vi" or even the HI-HWS Express load utility to check the file, but it seems difficult to read it because of the 2 channels saved inside the same file.

The error -21508 appears at the "niHWS Get Wfm reference.vi". That refers to:

 

Error -21508 occurred at niHWS Get Wfm Reference.vi

Possible reason(s): NIHWS:  There is no group in the file that matches the provided group name

 

And it seems odd to me, as I'm using the same name for group (wfm_group0) and trace(vector0) than I was using in Matlab.

Anything I'm missing? Any hint on how to read it in any way?

 

Thanks you very much in advance for your help

Best regards

IñigoA

0 Kudos
Message 1 of 2
(2,484 Views)
Solution
Accepted by topic author iadin

Dear all,

 

I have been struggling with that problem today and I just wanted to post here how I have finally found a way to read the data.

It is so easy that I'm a bit ashamed, but I think it is worthy to answer in case anyone would need it.

 

The "niHWS Get wfm Reference" is asking for a Group Name and for a waveform name. I have used the "niHWS Get Group Name" and the "niHWS Get wfm Name". Both have direct outputs (strings) with the information that "niHWS Get wfm Reference" understands. You can directly link them.

But actually, in the reading of the data I found that the group name doesn't need to be fulfilled and the waveform name is "0" or "1" in cae you have 2 channels.

So, you see, it was very easy for my HWS file: put a control and select "0" or "1" for waveform name. The simpler the better, jejeje.

 

I hope it helps. And sorry for opening the question I'm now answering myself. I was completely lost yesterday.

 

Best regards

IñigoA

0 Kudos
Message 2 of 2
(2,459 Views)