LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed!! Why do I keep losing the connection to my cRIO?

Hello,

 

I do it in the timed loop. Here is my post with my problem. There are files with my project. I changed a little bit since then but an idea is the same.

 

http://forums.ni.com/t5/Real-Time-Measurement-and/I-am-loosing-connection-with-cRIO-NI-9024/m-p/1611...

 

Kamil

0 Kudos
Message 11 of 16
(2,106 Views)

Hi Nemesis,

 

Since you are performing the File I/O in a timed loop, what is most likely happening is that the disk operation is taking too long and your thread is becoming starved.  When this happens, the cRIO no longer has time to communicate to your host and you lose connection.

 

I would recommend either:

1) Increasing the period of your timed loop

2) Not writing to file as often (batch)

3) Configuring your program into a Producer/Consumer architecture where your consumer does the file I/O

 

It makes sense that writing to the USB drive takes less time as it will be flash memory, having much lower overhead for file I/O.

 

Have a great day,

 

Chris V

Applications Engineer
National Instruments
0 Kudos
Message 12 of 16
(2,094 Views)

Hi Chris V,

 

Thank you for your tips.

 

Some explanations, I want to find a transfer function of my system and I did project that allow me to record data for different frequencies. (Link above)

 

Regarding the tips:

 

1) If I increase the period of the timed loop I will not be able to save sufficient number of samples, especially for higher frequencies. Or another way, is it possible to save a packets of samples. I mean read for example 10 samples from faster loop and then save these 10 samples in other loop once?

 

2) I would like to have separately file for each frequency. If I save it in one file for example, afterward I have to do post-process of data.

 

3)I though that I am doing a producer/consumer loop but maybe I do not understand principle. I have to read again. (any links will be appreciate)

 

Your explanation regarding USB has a sense and good to know.

 

Kamil

 

0 Kudos
Message 13 of 16
(2,087 Views)
0 Kudos
Message 14 of 16
(2,076 Views)

Hi Nemesis,


That second link is definitely a good one.

 

Check out this one too for a good explanation of the Producer/Consumer Architecture: https://www.ni.com/en/support/documentation/supplemental/21/producer-consumer-architecture-in-labvie...

 

Have a great day,

 

Chris V

Applications Engineer
National Instruments
Message 15 of 16
(2,063 Views)

Just I want to add that in the first one is explained about the time of saving on the disc. It is not recommended to do it faster than one minute. I think there is problem why my project is crashing.

 

Anyway thank you for help and time.

 

Kamil

0 Kudos
Message 16 of 16
(2,053 Views)