01-06-2004 04:36 PM
01-07-2004 07:11 AM
01-07-2004 07:38 AM
01-20-2011 02:57 AM
For all who are looking for more recent VIs to export LV arrays into Igor binary waves:
02-14-2011 04:29 PM
Woof! That is one big program. Is there a way to write directly to binary waves in a data acquisition program?
Thanks, Matt
02-15-2011 01:00 AM
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.
02-15-2011 10:50 AM
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:
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
02-16-2011 01:27 AM
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.
02-16-2011 09:41 AM
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
02-17-2011 12:00 PM
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