LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRIO9074 RT jitter every 10 sec. when writing data to SD card through 9802 module

Hi, 

 

 I am trying to use cRIO 9074 to collect data from different sensors at 50Hz  and log the data to SD card plugged in 9802 module. I use FPGA- scan interface hybrid mode because some sensors are just based on analog signals and others(i.e.. IMUs) are based on RS232.  This structure worked well. I used to transfer all the data to host VI in my desktop and log them there.

 

Recently, since I have more and more sensors, I decide to log all the data locally  to SD card on cRIO 9074.  However, I have a trouble.

 

I found my data are not continuous and always miss one second after ever other 10 seconds.  So I tried to insert a FIFO to buffer the data between two timed loops. The high priority loop is in charge of collecting data and the low one is in charge of writing.  But the problem still exists.  Actually, the problem has nothing to do with FIFO because 50Hz is  slow and I have validated that 9074 can collect and write all data within 10ms(100Hz).  Even with out FIFO, the program should work.

 

Finally, I find out an phenomenon that both the  two interaction variables "i" in the two timed loops will periodically stop for one second after every 10 second( I check them through front panel and probe).  At the same time, the CPU usage increase dramatically and after one second, it will go back to normal level.  That means the RT jitter every other 10 seconds and cannot work at this instant. If I fully delete the SD writing blocks, the problem is gone and the system works very smoothly.  So most likely, the problem is due to SD card module.

 

I tried different ways, i,e, changing the loop priority,  clock resources, the size of fifos.  Nothing works.  I even reduce the system frequency by two to 25 HZ, and even by 5 to 10 Hz. The problem still exists. 

 

Attachments are two CPU usage check at 50HZ and 25HZ.  Usually it is below 80% at 50HZ so that the capability of CRIO9074 is not a problem at all. 

 

And I also attach my RT VI which is messy,  because I almost go crazy thess days due to the problem . Does anybody have chance to check is there anything wrong in my VI? Or do I need to change the configuration of CRIO 9074 or update the RT engine?  It seems like a hardware problem. 

 

Does anybody face the same problem before?

 

 

Yizhai

Rugers Univesity

 


 


 

 

0 Kudos
Message 1 of 3
(2,569 Views)

It looks like you may have forgotten to attach the files you mentioned. Seeing those attachments may lead to some other possibilities. 

 

Are you continually mounting and unmounting the SD card? It appears that mounting/unmounting the SD card in a 9802 can interrupt the scan engine, as noted here

Does that seem to relate to your issue? 

Applications Engineer
National Instruments
CLD Certified
0 Kudos
Message 2 of 3
(2,556 Views)

     

Hi,Zach-H,

 

     Thanks. Actually, my problem is already solved after I contacted one NI engineer online. 

 

     I shouldn't use timed loop to write SD card.   Because SD card batch writing is time consuming and its priority can't be high. "while loop" is good for SD card writing. 

 

 

   Yizhai

 

   

0 Kudos
Message 3 of 3
(2,547 Views)