LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does my sbRIO disconnect when running VI?

Intro:

My goal is to create TCP/IPv6 capabilities for my sbRIO using the Call Library Function Node. I created my own shared object library to run custom TCP/IPv6 C functions on my sbRIO.

 

Completed:

I've tested my TCP/IPv6 functions on my sbRIO using the Eclipse IDE. It works every time with no errors.

 

I've also tested some simple "add two numbers in structures" and "pointer functions" from my custom shared object library on my sbRIO through the Call Library Function Node in LabVIEW. These also work every time with no errors.

 

Problem:

When I run my TCP/IPv6 shared object library functions in LabVIEW using the Call Library Function Node, it only works sometimes.

 

If I run VI with "Code Highlighting" on, it runs all the Call Library Node functions correctly (None of the C function throws any errors and the server and client each send a message to each other). However, when it finishes running all of the functions and reaches the end of my VI, I get the following warning, "Warning: Connection to target (myRioName) has been lost." and my sbRIO disconnects.

 

If I run my VI without "Code Highlighting" on, it does not even make it past the first Call Library Function Node. It gives the following warning, "Warning: Connection to target (myRioName) has been lost." and my sbRIO disconnects instantly.

 

Question:

Does anyone know why this would happen or how to debug/fix it?

 

Normally, because of "Code Highlighting", I would think it would be some kind of race condition, but I've ensured data flow by wiring an error signal through each block in the order of execution.

 

Let me know if I need to post more information.

0 Kudos
Message 1 of 2
(2,237 Views)

Dear JHugh,

 

It looks like you've already tested a simpler function, so you have probably already gone through most of the steps in the following article. However, there is a section on debugging that may help.

 

Integrating C Code with LabVIEW on NI Linux Real-Time Targets

 

I'm not sure how much code you are trying to call, but it may be worth trying to split it in half and then call each half separately, and see if it can make it through one or both of those without timing out (which this sounds similar to a time out error). Also, monitor your CPU and Memory usage while your code is running.

 

If you could please post your code, it would be very helpful in debugging the issue.

 

Thank you,

Alyssa H.

National Instruments

0 Kudos
Message 2 of 2
(2,188 Views)