Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Cann't mount a SD card on NI-9802 from the cRIO System

Hello,

 

i'm working at my first cRIO/RT project.

 

I use the following hardware:

cRIO 9075 (4 Slots)
- NI 9870 (4 seriel Interfaces)
- NI 9219 (4 analog input)
- NI 9481 (4 relais)
- NI 9802 (2 SD cards - up to now i use one with 32 and one with 64 MB)

 

I program on an actuall installed LabVIEW 2012 system running on Windows 7.

 

Because the FPGA is to slow for the NI-9870 Modul i cann't use the scan engine. (I discus it with the NI support.)

So i realised a FPGA project to access to the first three moduls.

 

Now i want to use the standard file I/O function from the RT-system like it was shown in the NI example "NI 9802 RT Access.lvproj".


But when i try to mount the sd card the function finished with the Error 65550:

A problem was found in the file system. Remove the SD card and run CHKDSK.

Of course i try chkdsk and also reformat the cards with FAT but it doesn't work.

 

 

Did anyone work already with that modul and got any experience?

 

When i program a low level access to the cards from the FPGA it works, but i cann't use folders and filenames by my own.

 

 

Hope i could discribe my Problem.

Oliver

0 Kudos
Message 1 of 6
(6,998 Views)

Hi Oliver,

 

this workaround should help you to solve the issue:

 

 

- When using the NI 9802 module, you should first make sure you are using at least the NI-RIO 3.1.1 Driver.  If you are not, download the newest driver that is compatible with your version of LabVIEW.

- If you have the correct driver and are still experiencing error -65550, it is most likely caused by the FPGA being reset while the card was mounted. If this is the case, the SD card will need to be removed and reformatted with a different device before it can be used in the NI 9802. 

- To prevent this error from happening in the future, do not reset the FPGA while you have an SD card mounted, reset before you mount the card or after the card is unmounted.

- One possible way to keep from accidental resets due to power loss would be the inclusion of an uninterruptable power supply.

 

 

Regards,

Matijas

0 Kudos
Message 2 of 6
(6,981 Views)

Hi Matijas,

 

i allready read your workaround before i wrote this Topic.

 

The NI-RIO driver version is 12.0 (I think the changed the version number system with LabVIEW 2012 or i didn't find the correct one.).

 

And i never switch off the power supply or reset the cRIO when i test to mount the card.

In fact the VI call the mounting node and afterwards the unmounting node.

 

You can see the relevant part of the code in the picture. (I had disabled the mountig function becuase it didn't work.)

 

 

Thanks for your help

Oliver

0 Kudos
Message 3 of 6
(6,972 Views)

Hi Oliver,

 

yes, NI just "synchronized" the RIO version number with LabVIEW (the version before 12.0 is 4.1).

 

After looking for some more information i just can tell you, that this error occurs when you want to close the FPGA reference while the mounting/unmounting node is stil working (up to a few sec.(!!)) 

I opened the project you told before on my computer and realized, taking a look on your screenshot, that some modifications are done with the RT VI (while structure is added with a 500 ms timing for example) 

To get out which component exactly causes this error, you should just try to run the standard version of this VI.

I attached it to my post. 

 

Regards,

Matijas

0 Kudos
Message 4 of 6
(6,959 Views)

Hi Matijas,

 

i tried the VI in a new project with only a while loop in the FPGA VI.

But the same error occured at once  😞

 

I zipped the whole project.

 

 

Best regards,

Oliver

0 Kudos
Message 5 of 6
(6,910 Views)

Hi Matijas, hi all,

 

I've found the problem.

 

It seemed that the NI-9802 can not handle 32MB SD cards.

 

I wrote that i trying a 32MB, a 64MB, a 512MB and at last a 2GB SD card.

But when i wrote to the card from the FPGA successfully I just test it on one card in the beginning.

After that I placed every time a method "Card Present" in the FPGA code.

The NI support told me that it doesn't work to use FPGA functions and to mount the card at one project.

 

Thanks at all,

Oliver

Message 6 of 6
(6,890 Views)