Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

I am loosing connection with cRIO NI 9024

Hello,

 

I have cRIO NI 9024 and I am trying to write/read values using NI Scan Engine. I did simple project that allows me to write data in a file every for example 20 seconds. Unfortunately after some time of execution my project the NI 9024 looses connection with PC and front panel is freezing. I cannot figure out where is problem. Has somebody any idea where is problem? I attached my project.

 

Kamil

0 Kudos
Message 1 of 8
(4,317 Views)

Try to increase the wait time in your loops.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 8
(4,307 Views)

Hello,

 

But I would like to have that kind of wait time. Even faster...

 

I did something and I think it is much better it froze only once since then. I put indicator to check errors and I got the error -2221 it means "The variable RT FIFO write buffer is full." As two loops have different wait time and I read from faster to slower it can cause buffer full. Therefore I add a cause loop in the faster loop that wait until 10ms (5 iteration by 2ms) and then add data to shared variables. I solved that problem with full buffer. Addition I disabled buffer in the Open/Create/Replace File Function and I changed attributes of files from open/create to create and from read/write to write only. Also I added in vi properties->execution and then reentrant execution.

 

I did 3 tests and they passed positive. I hope it will work correctly. Anyway if somebody see still any problem the addition answer will be appreciate.

 

Kamil 

0 Kudos
Message 3 of 8
(4,300 Views)

You need to change the architecture of your application. I am not sure if you have been to an NI Course, but you should attend the RT one if possible. They should be 2 loops in your application, one the critical loop and the other the non-critical loop. The critical loops should have the time-sensitive stuff in there while the rest is put in the non-critical loop. The communication between the loops should be handled using queues. And, the non-critical loop should be sending data to the host using shared variables, tcp/ip etc. If you arrange your architecture in this way, you shouldn't be having any problems.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 8
(4,297 Views)

Hello,

 

I put two loops. One with priority 500 and one with 100. Is not correct?

 

Kamil

0 Kudos
Message 5 of 8
(4,293 Views)

I am still loosing connection. Any ideas?

0 Kudos
Message 6 of 8
(4,265 Views)

Hello,

 

I put RT FIFO and I removed shared variables but still something is wrong. The vi works correctly but from time to time something collapses. RT FIFO shows that is full and then everything is frozen. I cannot find a mistake because any error is shown. Anybody can help me and look at my files?

 

Kamil

Download All
0 Kudos
Message 7 of 8
(4,235 Views)

Hello,

 

I found something interesting. I did more tests and I saved data on USB key and I have not got any crash. It seems to be something wrong when I save on the disc memory of the cRIO. Is there any tool that allows me to check cRIO, especially disc memory? if there are not any errors?

 

Thank you for any help.

 

Kamil

0 Kudos
Message 8 of 8
(4,191 Views)