LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA Reset during power loss? NI 9802 Module

Solved!
Go to solution

We have recently started using the NI 9802 on a cRIO system. We are getting the error -65550 discussed here: http://digital.ni.com/public.nsf/allkb/BD118434E87B9732862575C8006FD7FB

 

The article says that the error can be caused by the FPGA resetting while the drive was mounted. "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." Does a power loss reset the FPGA and require you to reformat the card??? We plan to use this as a remote system and power failure is possible. We would not be able to travel hundreds of miles back to the device to reformat an SD card in the event of a power loss. This can't be right. How could they sell a module that worked like that?

 

Also, does the card need to be formatted with FAT32 or FAT16?

---------------------------------
[will work for kudos]
0 Kudos
Message 1 of 11
(4,381 Views)
I would appreciate any help anyone can offer. Thanks guys
---------------------------------
[will work for kudos]
0 Kudos
Message 2 of 11
(4,360 Views)

Hi Rex,

 

A power failure will cause the FPGA to reset.  And this can cause the error 65550 that you received.  If you are deploying this in an area where you could lose power I would suggest using a quality UPS to prevent this error.

 

Also the card needs to be formatted as FAT32.

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 3 of 11
(4,346 Views)

I would like to submit a suggestion for the next version of this module. It would be awesome if in the rare but possible case of the crio losing power that the card did not become corrupt and you would then not need to travel all the way to the device and pull the SD cards out and reformat them with a pc before your system could be come operational. Like the ability to reformat at run-time would be a decent fail safe function. Even though you would lose all the data you had recorded onto the SD Card, wasting time and money, at least the entire system would not be fatally crippled by a simple loss of power and unexpected device reboot.

 

As it stands, even with a quality power backup battery as you have suggested, the simple possibility that you could lose power and need to manually perform a format on the SD card makes this module inferior to simply plugging in a big USB drive, both in terms of reliability and storage space. The appeal to this module, even though it could only hold two 2 gig SD cards, was its apparent ruggedness and reliability over using a usb drive.

 

Respectfully waiting for a new version of this module,

 

Rex

---------------------------------
[will work for kudos]
Message 4 of 11
(4,324 Views)
Solution
Accepted by topic author rex1030

rex1030,

 

One way you can make this system more robust is to wire the backup battery to the secondary input on the cRIO.  There are VIs you can use to monitor which power source is active (I think there are examples, otherwise I can look it up for you) so you can detect that you have switched to the backup power source and cleanly unmount your SD Card.  When power returns you can remount the card and continue where you left off (and ideally recharge the backup battery).

 

Sebastian

Message 5 of 11
(4,320 Views)

Rex,

I certainly understand your frustration with this occurrence, but as far as I understand this is a result of using flash memory in general, as any users of the first generations of USB drives for any computer platform can attest. 

The cRIO built-in memory does use flash memory, but also performs all the checking and confirmation to ensure the disk does not become corrupt. This slower write speed has become an issue for me on a few projects, and I understand that it would also be the case for any data writes to an attached USB drive.

The 9802 module gives you much faster writing speed, but with the added risk of the corruption of your card.

The above solution of programmatic mounting/unmounting based on power supply seems to cover the best of both worlds.

 

-Mello


Data Science Automation

CTA, CLA, CLED
SHAZAM!
Message 6 of 11
(4,316 Views)

Thanks for your help and understanding guys. I was certainly a little frustrated when I posted before.

 

Speleato's solution of not just having a backup battery, but programatically detecting that the backup battery had been engaged and then entering a 'safe mode' where it unmounts the card and waits for power to return would be extremely doable. This is a much more robust solution than just "use a backup battery". I really had no idea you could programatically detect that the second supply was in use. Very cool.

 

Thanks again guys.

---------------------------------
[will work for kudos]
0 Kudos
Message 7 of 11
(4,287 Views)
Hi Justin,


can you please verify the file system format? I have worked with the 9802 recently, and could only get the LabVIEW examples to run (FPGA access as well as RT access to the cards) when formatting the SD cards to FAT16...

Best regards,
Sebastian
Message Edited by SFK on 04-09-2010 02:36 PM
0 Kudos
Message 8 of 11
(3,890 Views)

I should clarify, those VIs to determine what power supply is connected are only available on the 902x controllers.  Sorry for any confusion.

 

With other models you do have the option of monitoring input voltage with an AI module. 

0 Kudos
Message 9 of 11
(3,868 Views)

SFK,

 

You are correct.  I was wrong originally, I thought it was FAT32 but it is FAT16 (also know as justs FAT).  

 

And are you speleato? Or just a different Sebastian?

Message Edited by Justin_P on 04-09-2010 09:21 AM
Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 10 of 11
(3,851 Views)