LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unzip files within labview

I took a copy of a OpenG lvzip VI  and modified it to use the new dll. Downloading the code to the RT target fails.
 
First try:
Deploying Error Code Database.vi (3,67 K)
Deploying ZLIB CRC32__ogtk.vi
Failed to download ZLIB CRC32__ogtk.vi
LabVIEW: Failed to load shared library lvzlib.out:crc32:E on RT target device.

Second try (stripped down code):

Deploying ZLIB Close Zip Archive__ogtk.vi
Failed to download ZLIB Close Zip Archive__ogtk.vi
LabVIEW: Failed to load shared library lvzlib.out:zipClose:E on RT target device.

0 Kudos
Message 21 of 91
(4,609 Views)


Mads wrote:
I took a copy of a OpenG lvzip VI  and modified it to use the new dll. Downloading the code to the RT target fails.
 
First try:
Deploying Error Code Database.vi (3,67 K)
Deploying ZLIB CRC32__ogtk.vi
Failed to download ZLIB CRC32__ogtk.vi
LabVIEW: Failed to load shared library lvzlib.out:crc32:E on RT target device.

Second try (stripped down code):

Deploying ZLIB Close Zip Archive__ogtk.vi
Failed to download ZLIB Close Zip Archive__ogtk.vi
LabVIEW: Failed to load shared library lvzlib.out:zipClose:E on RT target device.



lvzip.out in the error message seems to indicate that you are using a newer VxWorks based RT target. As I don't have VxWorks and the according GNU toolchain available I can't compile an .out shared lib for your target currently.
 
Pharlap is a mostly binary compatible system to the Win32 system in all modern Windows installations, albeit it only supports a subset of the Win32 API. It can load not to complicated Windows 32Bit DLLs directly and execute their code.
 
VxWorks however is a completely different OS that is not binary compatible with the Win32 subsystem and can not use Windows DLLs at all. It requires its own object file format and its shared libraries have normally an .out extension.
 
This DLL only can work for Pharlap based RT targets, if it works at all. To get an lvzip.out file someone with the VxWorks SDK and at least the free GNU C toolchain would need to grab the lvzip DLL source code, and get it to compile with it. There shouldn't be to many obstacles although the library makes use of a few system calls of course. I would guess it would be easiest to start from the Unix (Linux) target Makefile and create one for VxWorks from that. It might be also necessary to make small changes to the C source code to allow for the VxWorks toolchain specific preprocessor defines.
 
Rolf Kalbermatter


Message Edited by rolfk on 12-07-2007 10:29 AM
Rolf Kalbermatter
My Blog
Message 22 of 91
(4,607 Views)

Ok, was not aware of that issue. I have an old cFP module I could try it on instead though...I'll see what I can do.

 

Thanks for the effort by the way, it is really great of you to go this length to help.

0 Kudos
Message 23 of 91
(4,603 Views)


Mads wrote:

Ok, was not aware of that issue. I have an old cFP module I could try it on instead though...I'll see what I can do.

 

Thanks for the effort by the way, it is really great of you to go this length to help.


I just downloaded the gcc toolchains from the NI site and tried to build the lvzip.out file. I've ended up with following files. According to NI it is necessary to build the library for each version of VxWorks they use seperately, so this would mean you need different lvzip.out files for LabVIEW 8.2 and 8.5. Not sure how important that is, but in attached zip file you will find lvzip.out files for both versions.
 
Can't test them myself currently but let me know what you find out.
 
Rolf Kalbermatter


Message Edited by rolfk on 12-12-2007 03:55 PM
Rolf Kalbermatter
My Blog
0 Kudos
Message 24 of 91
(4,495 Views)


rolfk wrote:

 
Can't test them myself currently but let me know what you find out.
 
Rolf Kalbermatter

Trat! Messed up the library names. Try this instead.
 
Rolf Kalbermatter


Message Edited by rolfk on 12-12-2007 04:53 PM
Rolf Kalbermatter
My Blog
0 Kudos
Message 25 of 91
(4,482 Views)

Finally got around to taking a look at this.  The OpenG Zip VIs actually work fine on my Phar Lap RT target with the same old OpenG LVZLIB DLL!  Did I miss something?

0 Kudos
Message 26 of 91
(4,342 Views)


kehander wrote:

Finally got around to taking a look at this.  The OpenG Zip VIs actually work fine on my Phar Lap RT target with the same old OpenG LVZLIB DLL!  Did I miss something?


No you didn't! I wasn't sure they would work and Mads' message made me believe they wouldn't. So I tried to compile it in LabWindows/CVI with RT target selection and got all kinds of trouble. One was with a C runtime library function not being available. So I figured I make a version that does not contain that C runtime call.
As it turns out Mads was using a newer VxWorks based runtime target and there the DLLs won't work no matter how you create them. I've also read a bit more about the runtime support in Pharlap based RT systems and concluded that the original DLL should simply be fine, but didn't communicate that to well, I'm afraid, also because I wasn't really sure. The issues I had when trying to compile in LabWindows CVI are all CVI specific issues and have nothing to do with the limited support for WinAPI calls in Pharlap OS. 
 
I only wonder if the lvzlib.out shared library in my last post would work for VxWorks based targets! Smiley Tongue
 
Rolf Kalbermatter


Message Edited by rolfk on 12-21-2007 12:22 AM
Rolf Kalbermatter
My Blog
0 Kudos
Message 27 of 91
(4,334 Views)
I was trying to get the code running on a RIO unit, which is a problem.  I mixed RIO and RT in the thread though because I did not expect the OS differences.
 
It's good to hear that it runs fine on PharLap. I havent tested Rolf's new code on my RIO though. The ideal solution however would be if NI made their zip-functions (on the file palette) work properly - and work on all the targets;-)
0 Kudos
Message 28 of 91
(4,321 Views)

Hi Rolf,

 

I was wondering if you had tested the new lvzlib.out file.  For some reason when I run the a ZIP VI it causes the controller to hang.  In particular at a Call Library Reference Node.  Thanks.

Brian K.
0 Kudos
Message 29 of 91
(3,076 Views)
left blank intentionally (well ok I made an error and can't delete it Smiley Wink )
Message Edited by rolfk on 12-10-2008 07:55 AM
Rolf Kalbermatter
My Blog
0 Kudos
Message 30 of 91
(3,058 Views)