From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-22-2008 11:52 AM
I am using a NI 9802 in a cRIO chassis to store large files during data acquisition. I want to poll the particular SD card that I am writing to to find out how much free memory space remains on the card so that when it fills up I can switch to writing to the other card or terminate the data acquisition if both cards are full. My problem is that the Get Space function is returning inconsistent values. I have a 2GB card in slot 0 and a 512MB card in slot 1 and without writing any data to any of the cards I have received any and all combinations of 2GB and 512MB for one or both cards slots using the Get Space function. If anyone else out there has experienced this problem and have found a way to get correct values from this function, I would appreciate any help.
Thanks
Eric
10-23-2008 05:54 AM
Hi Eric,
Thanks for the post and I hope your well today!
I noticed you had received any support yet - so lets see if I can help at all.
I have looked into issues with Get Space function - and was unable to find any errors.
I would have thought this approach would be fine:
How do I Get LabVIEW to Measure the Free Space of a Specified Path?
http://digital.ni.com/public.nsf/allkb/217C5D90221B1FDF862569D6006C0A35?OpenDocument
AND
Checking Available Storage Space on a LabVIEW Real-Time Controller
http://digital.ni.com/public.nsf/allkb/4BCAB18196B0728686256BDC0076921C?OpenDocument
*This link contained an example vi - maybe try it out and compare differences in your approaches.
Im also aware you can use the "File/Directory Info.vi" to find out the size of a file or directory that you specify in the path. You can use this data to figure out how much you have left in a specific folder in your PDA.This could work for a cRIO...
And this link also talks about methods,
How to View Used and Available Storage Space on a Fieldpoint Controller with LabVIEW
http://digital.ni.com/public.nsf/allkb/6AE61514952EBDD486256E0100694B66?OpenDocument
Please let me know how you get on,
Kind Regards
10-23-2008 08:14 AM
Thanks Hillman,
The Volume Info function worked well for me. I guess I got tunnel vision about the functions that were available to me to solve my problem. I was focused on using the Methods available from the FPGA tool set and didn't remember about the general file I/O functions.
However, I am still curious as to why the Get Space method was not functioning correctly for me. I know that the NI 9802 is a relatively new product and its use has not been heavy enough to uncover all of the bugs in its application. I would be interested in finding out the actual root cause of the problem.
Regards,
Eric
10-23-2008 08:54 AM - edited 10-23-2008 09:01 AM
Hi Eric,
Thanks for the reply.
Im glad that it works and yes, its a fair question to ask why the Get Space method didn't work.
*edit*
I have noticed in the LabVIEW there is an example of this function: Help>>Find Examples>>Hardware Input/Output>>compactRIO>>Module Specific>>File Input/Output>>NI 9802 Methods.lvproj - does this work?
Could you please send me your code? and exact details of your hardware setup? and proof/more details of the error your seeing?
I will try to replicate the error / pass this information on the our R&D team if required.
Kind Regards,
10-23-2008 11:10 AM
Hi Hillman,
I cannot give you my exact code that I am having problems with due to IP restrictions my company has, but I did pull out a clip of my code and tested it to make sure it demonstrated the same behavior, it does, and you can analyze it. The clip that I pulled together contains a VI for the FPGA, a VI for the Real Time Controller, and the LV project that organizes my hardware setup. Hopefully it will be easier for you to learn about my setup from the project file instead of me trying to verbally describe everything.
Details of my error are as follows: I have an empty card in both slots of the 9802, the card in slot 0 is a 2GB card and the card in slot 1 is a 512MB card. When my program runs, sometimes it reports that both slots have 0 bytes of free space, sometimes it reports that both slots have 512MB of free space and sometimes it reports both slots have 2GB of free space.
Thanks for your help.
Eric
10-24-2008 05:08 AM
Hi Eric,
I will look into this.. I am currently locating the 9802 module for the cRIO.
I will let you know my outcomes.
Kind Regards,
10-27-2008 04:43 AM
Hi Eric,
Thanks for waiting and I hope your well today.
I located the NI 9802 module this morning and have tried this example code. (See attachment).
I would recommend trying this out and then comparing you code to it.
I have found one word of warning, and that is: if you have a file open/writing to a file at the time of using get space (etc) it could give erroneous/incorrect values.
Let me know how you get on,
Kind Regards,
10-27-2008 07:37 AM
Hillman,
Many thanks for you assistance. Kindly though, I do not have LV 8.6 installed on my computer yet, would you please repost you example for version 8.5.1?
Regards,
Eric
10-27-2008 07:47 AM
Hi,
Sorry.
Kind Regards,