Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

Where can I find the format for .lvm files for FGEN?

Looking for the file format/memory map needed to program the FGEN 5411 for Arb generation.
0 Kudos
Message 1 of 14
(16,375 Views)
You can find the .lvm format on the page Specification for the LabVIEW Measurement File (.lvm), Version 1.0.  I would highly recommend you use NI-HWS instead, however, as your performance will be much better.  LVM is a text format, HWS a binary format based on HDF5.
Message 2 of 14
(16,369 Views)
Thanks a bunch.  That helps.  Does NI have a similar spec for the HWS file?  I went to the link for HDF5 and got snowed right away.  I'm working in VB, so I'k looking for a few simple rules for some pretty primitive files.
0 Kudos
Message 3 of 14
(16,357 Views)
The first bad news - HDF5 is not supported in VB.  It has C, C++, Java, and F90 interfaces (yes, scientists the world over still use FORTRAN).  HWS only has C and LabVIEW interfaces.  If you can call C interfaces from VB, you will be there.

Second bad news - there is no HWS spec available.  It is about 40 pages and has never been put in a presentable state.  However, HDF5 is a self-describing file format, so you can figure most of it out yourself by browsing the file.  Download HDFView and go for it.  However, let me give you some hints in case you decide to do it.  HWS data is stored in wfm_groupn groups in the HDF5 file (think of HDF5 as a file structure in a file.  The group is the folder).  Each wfm_group contains four groups - traces, axes, vectors, and id.  The id group gives information about versioning and who stored the file.  A trace is a top level object which points to axes and vectors.  Axes contain information for a single axis of data.  This axis could be explicit (contains data), or implicit (calculated).  If it is explicit, it will point to one of the vectors in the vector group.  This format allows reuse of axes without copying the data.  It is very similar to SCPI-DIF, if you are familiar with that format.

Note that HDF5 has a very steep learning curve, but is worth the effort, since there is very little you may want to do with binary files that it cannot do.  However, in your case, the lack of VB support is probably a deal breaker.  HDF5 is supported by most major analysis packages (e.g. Matlab, Mathematica), if that helps any.

You may also want to try simple binary or the TDM binary format.  TDM is an XML/binary hybrid used the the LabVIEW storage VIs.  I could not find a published spec for it, but being XML, you can probably figure it out.

My apologies for not being more help.  If you are getting satisfactory performance from the LVM file, I would stick with it.
0 Kudos
Message 4 of 14
(16,353 Views)
As an alternative to using LVM or HWS, you can use a raw binary file consisting of 16-bit signed integers or 64 bit double precision floating point values. You can use the niFgen_CreateWaveformFromFileI16 or niFgen_CreateWaveformFromFileF64 functions in Visual Basic to download these files directly to your 5411 device. These files require no header information or formatting, just the raw waveform data.

Drew Creel
NI Software Engineer
Signal Generators Group

Drew Creel
NI Software Group Manager
RF and Signal Generators
0 Kudos
Message 5 of 14
(16,344 Views)
Does anyone have a matlab script or other alternatives to do this?
0 Kudos
Message 6 of 14
(15,990 Views)

Not sure if this answers your exact question, but there is an NI-HWS API for VB6.  You can get it here

http://digital.ni.com/public.nsf/allkb/A48F896EB0F557B5862572050004B567

Evan Cone
National Instruments
RF R&D
0 Kudos
Message 7 of 14
(15,985 Views)

Unzipped file has a .bas extension which could not be regconized, link to documentation also got no results.

The captured audio file that I try to load into the NI FGEN is automatically save in the .dat format then got converted to .mat by matlab.

0 Kudos
Message 8 of 14
(15,981 Views)
Can anyone tell me how do i convert Re: How to convert a .mat or .txt(raw  data) file
0 Kudos
Message 9 of 14
(14,974 Views)

Hello,

This attached zip file contains VI's to convert text file to binary file. IQ_Convert_Binary_Text_File_to_Binary_I16.vi is the main file in the zip file and it converts text data to I16 format binary file which can be directly downloaded to the Aribitrary Waveform Generators.

Let me know if you have any questions.

 

 

Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments
0 Kudos
Message 10 of 14
(14,963 Views)