LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading fits files in labview 64 bit

I need to read fits data files in labview on a 64 bit machine. I developed an application in labview 2012 (32 bit version on a win 7 x32 machine). This vi will not run on a win7 x64 machine. The problem is with the gfitsio library I used to read the files (downloaded from http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html). It seems they will not work with labview x64. I installed labview 32 bit on the same machine & tried to run the vi with that, but no luck.

 

Any ideas would be appreciated,

 

Thanks,

 

Joe 

0 Kudos
Message 1 of 12
(4,103 Views)

It appears the FITS libraries are 32-bit, so they cannot be called from 64-bit LabVIEW.  You should be able to call them from 32-bit LabVIEW on a 64-bit machine.  The only difficulty you may run into is locating the DLL.  64-bit versions of Windows put DLLs in different places than 32-bit. Check you system path and make sure your DLL resides in the search path.  You can also load the DLL explicitly using Windows Kernel32.dll calls before loading code which calls it.  This is awkward, but works in some cases.

 

Since the source code is available, you may be able to create a 64-bit DLL that 64-bit LabVIEW could use.  I am the wrong person to cousel you on how to do this, but it should be possible.

 

If you need more info, please ask.

0 Kudos
Message 2 of 12
(4,076 Views)

I already tried running this with Labview 2013 x32 & 2011 x32 on the 64 bit machine. I've had no luck so far. The first library vi that I use (to open the file) fails with an error 104. I had located the dll in my user.lib folder. I also moved both the gfitsio.dll & the cfitsio.dll files to the system32 folder & then to the sysWoW64 folder with the same result. At each attempt I changed the Library name property of the call library function to point to the right file in its new location.

 

Of course I still could be missing something.

 

 

 

 

0 Kudos
Message 3 of 12
(4,052 Views)

Error 104 is an undefined error, so something strange is definitely going on.  Have you tried to run the FITS verify utility on your 64-bit machine to make sure everything is set up right?  The FITS DLL should be in C:\Windows\SysWOW64 for this to work.

0 Kudos
Message 4 of 12
(4,030 Views)

The fits files are all fine as the same files work on my 32 bit system with this software. I'm not sure why the DLL files should have to go into the sysWOW64 folder as you can explicitly set up the path for them. However I left them there. I'm getting closer to a resolution I think. It seems that I might have a few issues. All my gfitsio vis were read only on the 64 bit system for some reason. It also seems to be the case that I can't read fits files if they are in a subfolder in the same folder as my vi (which itself is in the labview install folder.) If I keep these in my Labview files folder, then it looks like it will work.

 

Thanks for the pointers,

 

Joe

0 Kudos
Message 5 of 12
(4,011 Views)

Did you make any progress on the issue of reading Fits files?

0 Kudos
Message 6 of 12
(3,845 Views)

Well I ended up using the 32 bit version of Labview. Also, Labview would not read them from just any folder. I'll check later to see where I ended up putting the data files. It all works, but having to keep the 32 bit Labview on my system just for this is a pain, but the libraries for reading the fits files don't work on 64 bit apparently.

 

0 Kudos
Message 7 of 12
(3,839 Views)

Thanks for the reply, Any help is appreciated,  I'm a bit lost here. I'm using the 32 bit Labview but as you insinuated it doesn't seem to find or open files from just any directory.

0 Kudos
Message 8 of 12
(3,834 Views)

OK, do you have a 'LabView Data' folder in your Documents folder? If not, make one & then put your data files in a subfolder of that. It works for me.

 

Please let me know if this works or if you find anything else.

0 Kudos
Message 9 of 12
(3,828 Views)

Thx Joe

just before I read your reply It started to work. I have no idea what is different this time only that I started from the beginning.
I made a simple VI with only the "open file " sub VI from the library and this worked without errors. so I built on this and now I'm at the stage where I can see the image and data.

0 Kudos
Message 10 of 12
(3,819 Views)