12-03-2013 07:36 AM
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
12-04-2013 07:26 AM - edited 12-04-2013 07:27 AM
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.
12-04-2013 01:06 PM
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.
12-05-2013 11:06 AM
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.
12-09-2013 09:41 AM
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
04-08-2014 10:26 AM
Did you make any progress on the issue of reading Fits files?
04-08-2014 10:42 AM
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.
04-08-2014 11:16 AM - edited 04-08-2014 11:19 AM
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.
04-08-2014 11:49 AM
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.
04-08-2014 12:16 PM
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.