Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Power fail detection

 

I am looking for any information I can find that relates to power failure and systems shutdown in cRIO systems.

 

I know there is a dual supply option, but I can find nothing on the systems side that detects the primary supply failure.Without this detection capability I cannot close the log files

 

I am trying to prevent corruption to data logs.

 

Has anyone had any experience with power failures and logging integrity ?

 

Henry

 

 

Message 1 of 4
(4,172 Views)

This KB should help you check which power input is being provided as well as the input voltage. As for logging integrity, you will want to save your file regularly just in case you lose power. Reliance will help to prevent file system corruption, but if you lose power while writing to a file you will lose whatever you have written. If you are worried about two supplies for the power input turning off and losing power completely, you may want to use either a UPS or another source of temporary power. If you are switching from one power source to another (this is not the case of a UPS), then you may want to put a large enough capacitor in line to source enough power until you can switch your source. I don't have any spec's on what kind of cap you would need, but this is something that you may want to consider.

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
Message 2 of 4
(4,171 Views)

Thanks that helps!

 

Knowing I'm on the standby system means I can start a shutdown. Can I use this technique to trigger an emergency shutdown via an  interrupt ?

The application I have cannot use a UPS, but a small battery or even a cap might be enough.

 

Any advice on the use of TDMS files vs. other - say binary or text base files?

 

How much should I worry about data corruption? Losing 1 record is not serious but loosing the log file definitely is.

 

h

 

Message 3 of 4
(4,165 Views)

I think you need to make sure that you write all of your data completely before you lose power. If you don't you may not corrupt the file, but you may lose all of the data inside of it. You can always backup data to a file that you aren't writing to, so that when you lose power you only lose the data you are currently writing.

 

The best thing to do would be to provide yourself enough time to finish writing before you lose power (to retain all of the data you have written to that file). You can monitor the power supply inputs and shut down via an interupt. This would be entirely an architecture change. If you want to monitor the voltage externally then you can always do that by measuring from a C series module and sending an "interupt" from the fpga to the RT system, or measuring power externally and sending an digital signal either through the smb connector (9074) or a digital module. Here is an example of sending an interrupt to the RT system from FPGA.

 

For the cap option I see that 10 uF cap was used which provided enough time to write 60 KB of data before they started corrupting their file, losing either all or part of the file.

 

As for which file type to use you want to evaluate what kind of information you are storing and choose based on the advantages it will provide. Here is a document to help you do that. You also want to consider how you can optomize file I/O on your RT system.  

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
Message 4 of 4
(4,162 Views)