Bill Gilbert Posted July 5, 2012 Report Share Posted July 5, 2012 The group I'm working with would like me to use gzip to compress files instead of the zip palette functions in Labview. I got to thinking that the easiest way to do this would be to use the Python script node, which I saw and downloaded a couple of years ago, but never actually used. The machine I was working on got shipped away. Does the Python script node still exist, and if so, can anybody point me to the source? Searched but ended up chasing my tail. Also, if anybody has suggestions for a better way to approach this puzzle, sing out. I looked and couldn't find a gzip dll, but may not have been looking in the right places. Thanks, Bill Quote Link to comment
MikaelH Posted July 5, 2012 Report Share Posted July 5, 2012 Have you tried OpenG's VIs? Quote Link to comment
Rolf Kalbermatter Posted July 6, 2012 Report Share Posted July 6, 2012 The group I'm working with would like me to use gzip to compress files instead of the zip palette functions in Labview. I got to thinking that the easiest way to do this would be to use the Python script node, which I saw and downloaded a couple of years ago, but never actually used. The machine I was working on got shipped away. Does the Python script node still exist, and if so, can anybody point me to the source? Searched but ended up chasing my tail. Also, if anybody has suggestions for a better way to approach this puzzle, sing out. I looked and couldn't find a gzip dll, but may not have been looking in the right places. What's the reason for using gzip instead of ZIP format? Knowing that would give us a better idea about your needs. As to the Python node, you can find that under LabPython. The OpenG Tools don't support the gzip format out of the box. While it wouldn't be impossible to support it, since both make use of zlib internally, it's quite a bit of work. But integrating gzip by using LabPython is really very roundabout. Have you looked at executing the gzip executable through System Exec? Quote Link to comment
hooovahh Posted July 6, 2012 Report Share Posted July 6, 2012 But integrating gzip by using LabPython is really very roundabout. Have you looked at executing the gzip executable through System Exec? That's what I was going to suggest. At one point I was trying to interface with 7-zip through the command line and I believe it too supports gzip compression. Quote Link to comment
Bill Gilbert Posted July 6, 2012 Author Report Share Posted July 6, 2012 Thanks for system exec suggestion, I'd forgotten about that. May not be last question I ask. In answer to "why gzip?", it's basically because one guy insists on it. Wants to stream data direct from the zip files and has already written apps on his end where they are working in Linux. He asked for pepsi, but I found the fridge full of coke. I already wrote an app that looks for our raw data files and uses the LV palette functions to zip them, but "no sale". He's already found a workaround, but I thought I should see if I can do this without major time investment. Quote Link to comment
Bill Gilbert Posted July 6, 2012 Author Report Share Posted July 6, 2012 Well, downloaded the gzip exe utility, put gzip.exe in System32, and it compresses our 100MB data file to about 6MB just fine when run from the win-dos command line, When I try it in system exec with only the command line: gzip <full path to file> I get an error dialog saying "Labview: memory full". tried increasing the expected output to 10MB, no joy. Any idea what I'm doing wrong? Or is the system exec somehow limited to smaller jobs? Thanks BG Quote Link to comment
Bill Gilbert Posted July 6, 2012 Author Report Share Posted July 6, 2012 Sorry, googled it and found Knowledge Base article: http://digital.ni.com/public.nsf/allkb/EA1600EBA422E97286256AA20073C616 giving me the proper syntax. Needed cmd /c and full path to executable, which I moved to root dir. Worked! Megathanks, BG Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.