LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 7 produced when saving to a spread sheet file using a compact rio

Hi

 

Im having a little difficultly saving to a spread sheet file using a compact rio. I bundled the data from a NI 9215 with a timer and stuck it into an x-y graph and that works fine as it goes round in shift registers. But then I passed the data out of my while loop unbundled it, turned it into a 2d array and tried to write it into a spread sheet file using the appropriate i/o vi provided by labview 8.2. I have hooked up all the requirements like format, and file path. But it keeps returning error 7 and says that my file path is incorrect. I’ve tried using a constant file path, ive tried creating the file before running the program, ive tried just writing the file straight to a disk in this case h:\test.asc but every time it comes back with error 7. I then went to a lab downstairs to see how they did it and the method I’m using it works down there but is exactly the same as mine upstairs. I’m a little confused by this one.

 

Any pointers would be much appreciated.

 

Dan
0 Kudos
Message 1 of 5
(3,938 Views)
Hi Dan,

If you are passing an "h:\test.asc" file path to any of the File I/O LV functions, it is expected that you will get error 7, since drive "h:" does not exist on those targets. Unless you are using a USB drive, in which case I'm not sure what the drive letter for the drive is. According to the following discussion, it will be drive "u:".

http://forums.ni.com/rss/message?board.id=170&message.id=231156

In order to troubleshoot why you can't write to disk, I suggest you first play with the "File/Directory Info" node (File I/O>>Advanced File Funtions) to ensure you are using the correct drive letter.

Hope it helps.

JMota

Message Edited by JMota on 08-08-2007 01:22 PM

0 Kudos
Message 2 of 5
(3,930 Views)

Hi

 

I apologise I didn’t specify I was only using a NI cRIO-9004 not realising you could get ones that had a USB port. I thought mine would behave in the same way as a DAQ device and write the file back onto the main computer hard drive. Is this not what happens if not how do you make it do that. The computer is a networked system with its own C:\ harddrive, but my personal space is on H:\ which must be like a pretend hard drive, or alternatively can you make the cRIO write it to a memory stick within a USB port of the programming PC itself. Or can you write onto memory of cRIO but then how do you download the data?

 

Also I apologise that I posted the message twice only did cos I thought it might be in the wrong forum.

 

Thanks

 

Dan
0 Kudos
Message 3 of 5
(3,917 Views)
Dan,

There are a few ways you can transfer data / files from a CompactRIO controller like the cRIO-9004 onto a host PC. It all depends on your needs.

- (simplest) write to a file locally on the cRIO controller and then use an ftp client to access the file from the cRIO. The cRIO comes with an ftp server built-into LV RT.
- transfer the data using an RT FIFO to the PC, and then have the PC store the data locally.
- depending on your needs, you may be able to run the Host VI for your cRIO application on the host PC. That way you have full access to the resources on the PC (but you loose the determinism and speed of running the Host VI on the cRIO controller)

As far as I know, you can't access a network share from within a cRIO controller, so that's what you were failing to access the H: drive.

Hope this clarifies things.

JMota
0 Kudos
Message 4 of 5
(3,913 Views)
Hi Daniel,

In specifing h:\ as your path you are refering to a mapped network drive. This network drive is mapped by Windows and there is no facility to do such a thing under a Real-Time operating system. When you mention the Lab Downstairs is this a windows PC?

Unfortunately you can not save to a network directory from a Real Time controller. The Real-Time operating system does not support it. You have to save the file to the Compact RIO's flash memory then transfer to your Windows PC via FTP as JMota suggested.

Regards

Jon B
Applications Engineer
NI UK & Ireland
0 Kudos
Message 5 of 5
(3,840 Views)