LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV -> Igor?

A colleague of mine wants to write data from LabVIEW into files of
Igor waves to analyze in Igor. I told him that I could find such
conversion VI's, as I had used them years ago. Alas, all I could find
are LV 3.0 VIs. Nothing in the Dev Zone.
Does anyone know of more recent LV-Igor VI's that are available?
Thanks,
Dave

-------------------------------------------------------------
David Thomson 303-499-1973 (voice and fax)
Original Code Consulting dthomson@originalcode.com
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Developer
Certified Instrument Driver Developer
-------------------------------------------------------------
Research S
cientist 303-497-3470 (voice)
NOAA Aeronomy Laboratory 303-497-5373 (fax)
Boulder, Colorado dthomson@al.noaa.gov
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary,
and those who don't.
0 Kudos
Message 1 of 15
(6,034 Views)
> A colleague of mine wants to write data from LabVIEW into files of
> Igor waves to analyze in Igor. I told him that I could find such
> conversion VI's, as I had used them years ago. Alas, all I could find
> are LV 3.0 VIs. Nothing in the Dev Zone.
> Does anyone know of more recent LV-Igor VI's that are available?

I suspect that the older VIs still work and that the Igor binary is the
same. If you can contact the author, you might see about having them
submit the VIs for devzone. I'm sure someone at NI would be willing to
convert them to LV6 or 7.

Greg McKaskle
0 Kudos
Message 2 of 15
(6,034 Views)
To convert from 3.0 to 6.x or 7, you need to order a free conversion utility from National Instruments. Click here for more info.
LabView 6.x and 7 include an automatic conversion when you load a VI created with a previous version, but that only works back to 4.0. The good news is that you can get the 3.0 converter free, but it's not available on-line.
0 Kudos
Message 3 of 15
(6,034 Views)

For all who are looking for more recent VIs to export LV arrays into Igor binary waves:

http://www.igorexchange.com/project/LVarray2ibw

0 Kudos
Message 4 of 15
(4,958 Views)

Woof!  That is one big program.  Is there a way to write directly to binary waves in a data acquisition program?

 

Thanks, Matt

0 Kudos
Message 5 of 15
(4,897 Views)

That's what it does. It is so big because every data array in LV (uint8, uint16, uint32, float32, ...) needs an own subvi for every dimension. But if you use the polymorphic VI 'Array2ibw.vi', this subvi will be picked automatically.

0 Kudos
Message 6 of 15
(4,869 Views)

sfox,

 

Sorry about that, I don't think I was entirely clear.  It actually doesn't do that.  What I mean is for a continuous acquisition; this program is for a completed acquisition (i.e. arrays already defined and built).  For instance, I have a system that is operating for extended periods of time, but stuffs the data into files no larger than 50 Mb.  Currently the data is written to binary - I open a new file when necessary and the write continuously until the max file size is reached or the user requests a shutdown.  At that point, I will close the file.  Now, as this program is written (the LV-> Igor wave), you need to have the wave of interest already built.  I can get around this by simply executing this polymorphic set of VIs in the background at the end of an acquisition, but:

  1. It seems that this could be more efficient if we just ditch the binary data and go straight to the Igor Wave format.
  2. As it is written, I am a little concerned that we may chew up CPU time while we are trying to operate concurrently and thus introduce jitter into the system.

I think this is possible, but I haven't really delved into this.  The one gotcha seems to be that you need to know the size of the wave before we actually write the wave.  This would be problematic as we might run into some memory issues if we just preallocate a huge chunk of memory before hand.  Any thoughts on this?

 

Also, I think that the program as it is can probably stand to be updated.  Maybe using classes instead of polymorphic VIs.

 

Cheers, Matt

0 Kudos
Message 7 of 15
(4,848 Views)

Hi Matt,

 

Igor binary waves are not suited for continous acquisition, because you have to know not only the length of the wave but also each value in order to calculate the checksum which is required for a valid file.

Referring to your example: I think 50 MB of data is not very much. This can be easily done in memory. As soon as the LV array reaches this limit, you can save it to disk and start again. If you insert the polymorphic VI in your program, LabView will replace it with the specific VI that is required for the data array you connected. Not being able to write to an Igor binary wave continously is a limitation of this file format you have to deal with. I know of other people who use the hdf5 file format for this purpose. There is a very good Igor xop that can read hdf5 files. Maybe this is an option for you.

 

I don't know much about LabView classes. At the time I wrote the VIs I looked about the old VIs of Gary Johnson that was written for Igor 4 where Igor waves had only one dimension.

Updating the VIs means a lot of work, but what are the benefits? A slightly slimmer VI is none in my opinion and I cannot think of an Igor feature, that is not already supported.

0 Kudos
Message 8 of 15
(4,825 Views)

Thanks, sfox.  That is what I thought. 

 

Unfortunately, memory does become an issue, even though the amount seems so small (LV2010 takes a huge hunk just to run).  I think a work around for me might be to write to binary and then to call these polymorphic VIs after closing the previous file to convert the binary to Igor waves.

 

Excellent job, though.  I started putting something together before I found these VIs a while back and just through my hands up as the wave header was just too much. 

 

Cheers, Matt

0 Kudos
Message 9 of 15
(4,800 Views)

I would second the opinion of using HDF5 data format. We save our LabVIEW acquired data in HDF5 then the user can use whatever software or programming language they are comfortable with, including IGOR to analyze.

--Russ

0 Kudos
Message 10 of 15
(4,765 Views)