LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read signal names out of a HWS file

I try to read a HWS file created with NI´s Digital Waveform Editor V 1.0 into LabView 7.0.
Everything goes fine except I can´t retrieve the signal names.
 
Has anyone already solved this problem ?
0 Kudos
Message 1 of 9
(3,135 Views)
Hello!

At the time this is not possible with the LabVIEW functions of NI-HSDIO to retrive the signal names. It will be included as new feature probably on the version 1.4.

Regards

Ken
0 Kudos
Message 2 of 9
(3,106 Views)
Thanks KenT !
 
Then I´ll wait for Version 1.4.
 
 
Regards
0 Kudos
Message 3 of 9
(3,099 Views)

If you are in more of a hurry, you can get the information yourself using the underlying technology of NI-HWS, HDF5. You can download a LabVIEW API on the tutorial page Can I Edit and Create Hierarchical Data Format (HDF5) files in LabVIEW?. Note that this API is not thread-safe, so use with care in LabVIEW. You can also download an HDF5 file browser, HDFView, from the HDF5 website. This will allow you to browse the file similar to the way you would browse a file directory. The signal names are in the groups wfm_group0/traces/tracen/name, where n is the number of the signal. I apologize for not posting an example, but I don't have the time (about 30 min to write and test) to do it.

This account is no longer active. Contact ShadesOfGray for current posts and information.
0 Kudos
Message 4 of 9
(3,087 Views)
One more point - don't use the HDF5 API and NI-HWS at the same time.  NI-HWS uses a modified form of the HDF5 DLL which is thread safe.  You would be using two DLLs to access the same file.  Corruption would be almost assured.
This account is no longer active. Contact ShadesOfGray for current posts and information.
0 Kudos
Message 5 of 9
(3,085 Views)
Hi,
 
my costumer wants to read and write signal names into a HWS File like its possible with the NI Digital Waveform Editor.
I tried it in LV 8.0 (NI-HSDIO 1.4.1.3) - didnt find a way to to.
 
Would be cool if its possible somehow.
 
Thanx,
Stefan
0 Kudos
Message 6 of 9
(3,006 Views)

Stefan,

There is a way to store and retrieve signal names in an HWS file. There were two VIs added to HWS 1.4 that will allow for storing and retrieving "Digital Signal String Attributes". The only string attributes that are supported are signal names. However, these VIs were not added to the HWS LabVIEW palettes. You will have drop them from their file locations:

C:\Program Files\National Instruments\LabVIEW 8.0\instr.lib\niHWS\nihws.llb\niHWS Get Digital Signal String Attribute.vi
C:\Program Files\National Instruments\LabVIEW 8.0\instr.lib\niHWS\nihws.llb\niHWS Set Digital Signal String Attribute.vi

The NI Digital Waveform Editor does not read or write information to these attributes. They are strictly for allowing HWS users to store custom signal names for their specific applications

I've included a VI (LV 8.0) that will demonstrate how to store and retrieve your signal names.

Message 7 of 9
(2,994 Views)

Finally I made it !!!!!

Thanks to DFGray. You need to have the API that DFGray mentioned earlier in this discussion.

Then you have to add some hierarchy items to the HWS file. I have added a sample VI to write signal names to a file that was created with the "normal" VIs that came with the Waveform Editor or the hardware (I´m not shure wether the one or the other).

To read the signal names this VI should serve well as a template.

Simply exchange the write VIs by the appropriate read VIs.

If there are further questions please E-Mail

Example works with LabView 7.0 !!!!

0 Kudos
Message 8 of 9
(2,971 Views)

Hello!

 

I also would like to write signal-names in HWS files in a way that the Digital Waveform Editor 2.0 can read and display them.

 

Is there meanwhile - 2009-May-26 - a thread-safe solution for LabVIEW 8.2.1 which does not have the problem which DFGray warned on 12-13-2005 ("One more point - don't use the HDF5 API and NI-HWS at the same time.  NI-HWS uses a modified form of the HDF5 DLL which is thread safe.  You would be using two DLLs to access the same file.  Corruption would be almost assured.")

 

Thank you,

With kind regards

Johannes

0 Kudos
Message 9 of 9
(2,212 Views)