LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read data from PC format external disk, using Labview MAC

Hi folks,

For years I have not been able to read data files from a PC formatted (created) external disk, using Labview for Mac. More specifically:
 - I have Labview 7.01 running on OS X 10.4.11 on a PowerBook G4
 - I have a 500GB external USB/firewire disk that was formatted on a PC and has data files (custom format) that were created on the PC. I believe that C code actually creates the files, but Labview 7/PC opens the files and appends some info (I don't think the fact that C or Labview touches the files is actually relevant to this issue though).
 - I can connect the 500 GB disk to my mac, and it will mount just fine and OS X can see all of the data files (and anything else on the disk).
 - if I use my Labview app to open and read a data file it fails:
       - open/create/replace.vi (with read-only access) shows a file dialog window that lets me navigate to any file on the external disk.
       - but, the vi returns an error 7
 - if I use OS X to copy the data file to my Mac disk, my Labview app works fine.

So, does anyone know if:
 - I'm just doing something wrong in my Mac Labview app?
 - Labview 7.x solves this problem?
 - Labview 8/Mac solves this problem?
 - OS X 10.5 solves this problem; with Labview 7 or 8; or does OS X 10.5 worsen the problem?

Thanks, in advance...
0 Kudos
Message 1 of 8
(4,712 Views)
Is the 500 GB external disk formatted as a single NTFS partition?  (I'll take a wild guess and suggest that you might have better luck with FAT32, except then you'd generally be restricted to a 32 GB partition.)
0 Kudos
Message 2 of 8
(4,698 Views)
Yes, the PC disk is NTFS, in order to avoid the 32GB limit issue. The disk gets populated by a data collection program. Data files are generally below 10GB each, but trying to manage "many" disk partitions during data collection would be a major pain (plus an inefficient use of disk space given our file sizes).

Something tells me that I'm missing something easy though, because the file browser can navigate to the file, so why can't I open/read it? More specifically, why can OS X see the data files and handle copying (an open and read operation) them, but my Labview app can not open and read them?
0 Kudos
Message 3 of 8
(4,692 Views)

Hi rmp,

Can you tell us a bit more about this error that you are getting? I know you said it is error 7 but does the error say anything else? Maybe you could take a screenshot of it and post it on the forum thread.

As far as compatibility, you should be able to use LabVIEW 7.x with Mac OS X 10.3 or later. I just wanted to re-affirm that for you.

Also, have you tried open up any other VIs besides the open/create/replace.vi? Does it give you the same error with the other VIs?

I'm going to try and re-produce the issue over here on my end so if you could also let me know what exactly you have installed on the Mac (just LabVIEW or other NI products?) that would also help. Thanks in advance for the information!

 

 

Carla

National Instruments
Applications Engineer
0 Kudos
Message 4 of 8
(4,604 Views)
Hi Carla,

Thanks for the reply. If I get a description of the error 7 I see:

"Error 7 occurred at Open File

Possible reason(s):
LabVIEW:  File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on Linux.
---
LabVIEW:  File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on UNIX.
---
NI-488:  Non-existent board."

Now, I have to correct my initial posting: I am currently using LV 8.0.1 (not 7.01).

Also, I have tried other Open VIs, and tried changing the input params (like read-only)... no joy.
0 Kudos
Message 5 of 8
(4,564 Views)
What if you wire a Path constant to the VI instead, use the Path constant to browse to the file, and then run the VI?
0 Kudos
Message 6 of 8
(4,557 Views)
Hi kehander,
Thanks for the reply. I tried filling a constant path with the Mac-defined path to a data file on the USB disk (ie "DATA2:file1.dat"). This resulted in the same error message.

I then considered that maybe I was misinterpreting the LV error message, and that perhaps I was supposed to address the file using PC-notation (ie.
"DATA2\file1.dat"), even though the app is running on a Mac. No joy with this, but I get a different error msg:

"Error 1430 occurred at Open File

Possible reason(s):
LabVIEW:  The path is empty or relative. You must use an absolute path."

Can you share what your reasoning was for your suggestion... I'm not sure I understand why a constant path would produce different results?
0 Kudos
Message 7 of 8
(4,537 Views)
Well, I just thought that if you browsed for a path from a Path constant, then you would at least get to see exactly what path LabVIEW is trying to access, and whether there was something particularly wrong with it. Or that it might otherwise demonstrate something wrong with the browse-for-file dialog. I unfortunately do not have much experience with OS X.

If I was using Linux, though, I would try to mount the drive manually, perhaps using options that might not be used by whatever automatic mounting methods the OS typically employs.  (Maybe the way it is right now, the files can only be accessed through case-sensitive filenames?)

Message Edited by kehander on 02-06-2008 09:25 PM
0 Kudos
Message 8 of 8
(4,532 Views)