Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write data to SDHC card on 9636 board.

Hi all.  I am using a sbRIO-9636 board on a test stand with tests that can run continuously for up to 3 years.  The test stand logs certain data and I have created a RT process to record or log those data points into a binary format on the flash (memory) of the 9636.  Since I only have 512 mb available and do not want to clutter it too much I would like to create a code to trigger when the flash memory used exceeds 256 mb, to dump the binary data stored to a 32GB SDHC card on the board.  I believe I have figured out how to generate the logic control using "SystemSession" Total Memory and Free Memory variables, however, I am having a hard time saving the data to the SD card.  All I would like to do is take the binary data I have stored in memory, convert it to a spreadsheet format or pure text array and save it to the SDHC card.

 

Also, is there a VI that can tell me if an SD card exists and how much memory is available on it?  Finally, once I have succesfully stored data to the SDHC, is there a way to view an open the data while the SD card is still in the 9636 board using a computer and the ethernet card?

 

Thank you.

0 Kudos
Message 1 of 5
(7,583 Views)

Hi gerin99,

 

You can access the SD card via the RT Controller. There is an SD Logger project in newer versions of LabVIEW 2012, but does not seem to be included in LabVIEW 2013. Basically, you write to it as you would a USB drive or the onboard flash. When the SD card is inserted, it usually shows up as a U: drive by default (assuming you have nothing else connected). 

 

sd.PNG

 

As for a function to check if the SD card exists and how much memory is available, you can use the Get Volume Info. You can then monitor the error wire to check if there is a SD card plugged in as well as viewing the total memory and free memory outputs.

 

sd1.PNG

Here is a good reference on reading from a mass storage device as well.

 

I hope this helps!

Tannerite
National Instruments
Message 2 of 5
(7,579 Views)

Does the sbRIO-9636 support the SanDisk 64GB Standard SDXC?  Is there a limit to the addressable data space of these cards that the sbRIO-9636 can support, e.g., will it read the full 64 GB?

0 Kudos
Message 3 of 5
(6,935 Views)

Hey John,

 

If you look at the operating instructions at the SD port we only specified compatibility with the SD and SDHC standards. We guarantee a specific card will work if it isn't those specs and doens't meet the industrial rating. Since we only support SDHC you should look for a sdhc option that supports the size you need. 

 

9636 Operating Instructions

http://www.ni.com/pdf/manuals/373378d.pdf

 

It depends on what the differences are between sdhc and sdxc. 

Kyle Hartley
Senior Embedded Software Engineer

0 Kudos
Message 4 of 5
(6,918 Views)

As Kyle-H mentioned, NI has not tested with SDXC. The SD association also explicitly states that that you must have an SDXC device to use SDXC media. The SD controller we use does not state that it is compatible with SDXC. You are welcome to test this out. If SDXC does work, it will almost certainly only show up as 32GB. Even then, we have not tested this so NI could not say we support this setup.

 

Here is the link to the SD Association SD, SDHC, and SDXC compatibility:

 

https://www.sdcard.org/consumers/sdxc_capabilities/using_sdxc/

Tannerite
National Instruments
0 Kudos
Message 5 of 5
(6,910 Views)