LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unzip files within labview

I have been playing around with the new zip functions in labview 8.  I like it, nice and simple.  Then I realized something.  They don't have any functions listed to unzip files?!?!  Am I missing something, or is there another method to call zip files in labview, unzip to a location, and then grab files from the unzip within labview programatically?  The only method I can think of is to have winzip installed on the machine so you can use the command line execute function (but that is an awful method IMHO).  I would have thought that if NI got the license to build zip files they would have also gotten the rights to include the unzipping as well.
0 Kudos
Message 1 of 91
(11,399 Views)
Hello,
 
I think this is only a feature to zip your whole project as it appears within the project explorer as a zip file,
so you don't need to make the folders etc. per hand e.g using the windows explorer and then need to
create a zip file.
Also it didn't make sense (for me) to be able to unzip files with LabVIEW.
 
Regards,
Chrisitan
0 Kudos
Message 2 of 91
(11,365 Views)
I know the feature you are talking about under the project window, but I am talking about the actual zip functions in the file palette.  They have functions to zip, but nothing to unzip.  Although it may not seem obvious at first why you would want to unzip under labview, there are situations which I want to do it.  My customer wants me to keep the data in a tab delimited format so they can easily open it with notepad or excel.  I also have calibration files that are kept with each data file along with some other misc. files in a small directory structure for each shot.  If I could zip the shot directory containing everything it would save a lot of space.  If they ever wanted to recall the data, I grap the zip file, unzip to the labview temp directory, read the data and cal files, and delete the extracted dir in the temp.  BUT, I can't unzip right now.
0 Kudos
Message 3 of 91
(11,344 Views)
OpenG has a ZIP library that reads/writes ZIP files.
0 Kudos
Message 4 of 91
(11,336 Views)

Nice tool.

@biographie: I know the LabVIEW functions to zip programatically, but as I talked about in the last post, they are working in the same way.

                      I hope the OpenG tool is what you are searching for!

0 Kudos
Message 5 of 91
(11,307 Views)
Yes, OpenG has quite a few VIs that some argue LabVIEW should have in the first place. Now, if they could only get decent servers for their distribution.
0 Kudos
Message 6 of 91
(11,303 Views)


@ smercurio_fc wrote:

Now, if they could only get decent servers for their distribution.



That's true...
0 Kudos
Message 7 of 91
(11,298 Views)
Unzip functions in native G would be very useful, simply because that code is supported on the RT targets. There is an unzip option in the palette in LV 8.5, but it returns error 2 if I try to unzip anything with it...if the file only contains one file it works, but it retunrs the error and with more than one file inside the archive it fails....is it supposed to work, or is there still no proper unzip support?
 
 
I have code I want to move from a PC to a RIO unit, but the lack of a G-version of unzip makes this difficult, the OpenG alternative is not native G so no luck there...It seems the VIs available in LV 8.5 could do the job, if only some minor bug-fixing was done(?)
 
 
0 Kudos
Message 8 of 91
(10,853 Views)
Mads,

Regarding LabVIEW's 8.5 unzip function, the issue has already been reported to R&D so hopefully a fix will be seen in the future.

I don't know of any native G unzip functions, but maybe some other forumers out there might have some more insight into that.


0 Kudos
Message 9 of 91
(10,804 Views)


Mads wrote:
Unzip functions in native G would be very useful, simply because that code is supported on the RT targets. There is an unzip option in the palette in LV 8.5, but it returns error 2 if I try to unzip anything with it...if the file only contains one file it works, but it retunrs the error and with more than one file inside the archive it fails....is it supposed to work, or is there still no proper unzip support?
 
 
I have code I want to move from a PC to a RIO unit, but the lack of a G-version of unzip makes this difficult, the OpenG alternative is not native G so no luck there...It seems the VIs available in LV 8.5 could do the job, if only some minor bug-fixing was done(?)
 
 


ZIP/Unzip support as native VIs is not very practical. Compression is a very tricky business and developing such algorithmes in a way that always works is not very easy and quite time consuming, not to mention that LabVIEW is not the ideal invironment to do low level bit shuffling and manipulation.
Combine that with the fact that there are ready made and VERY throughly tested open source libraries with the needed functions (of course mostly in C) and you really realize that trying to reinvint that wheel in LabVIEW itself is simply an exercise in vain.
The OpenG ZIP/UNZIP library is based on the wide spread zlib library that just about compiles on any C compiler that dates from after the early 1960ies and so it should be no problem to grab the according C source code from the OpenG Toolkit depository on sourceforge.net and recompile it with the correct C toolchain for your CRIO realtime target.
 
Oh and if you mean to transport the unzip algorithme to the FPGA target instead of the realtime target, keep dreaming. Once the FPGA chips start to reach the 1 Billion gate count this could actually start to get feasable. 3 Million gates is really nothing for such a task.
 
Rolf Kalbermatter


Message Edited by rolfk on 11-28-2007 11:22 AM
Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 91
(10,781 Views)