LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tcp_nodelay howto

Hello,

 

 

I want to disable Nagle's algorithm in my NI 9188. I have already found this page: http://digital.ni.com/public.nsf/allkb/7EFCA5D83B59DFDC86256D60007F5839

 

But I have some troubles using the TCP_nodelay.vi. Can anybody tell me what I have to connect to this VI? Do I have to use it in my measuring vi? oder does it have to run separately? The 9188 is wired directly to my laptop. TCP/IP settings are on dynamic ip.

 

Thanks in advance!

0 Kudos
Message 1 of 13
(4,212 Views)

You need to all this vi one the specific TCP connection you are using. Essentially place this call immediately following you TCP Open. Yo need to use the native TCP calls and not the VISA calls.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 13
(4,195 Views)

I do not believe there is currently a way to disable the Nagle algorithm on RT systems such as your cRIO.  Search this forum for "Nagle RT" for more posts on this subject.  Since your cRIO is directly connected to your PC, which makes network problems very unlikely, you may want to use UDP instead of TCP.

0 Kudos
Message 3 of 13
(4,194 Views)

I have also considered using UDP instead of TCP. But I could not find out how to change the chassis to this mode. Can you help me on this matter?

0 Kudos
Message 4 of 13
(4,187 Views)

@Duncan6286 wrote:

I have also considered using UDP instead of TCP. But I could not find out how to change the chassis to this mode. Can you help me on this matter?


Do you understand the difference between TCP and UDP?  You may want to spend some time researching it.  There's no switch to flip on the chassis.  TCP and UDP can exist on the same network.  It's just a question of which functions your code uses.  If you want to use UDP, use the UDP functions.  If you want to use TCP, use the TCP functions.

 

How are you communicating with your cRIO chassis?  If you're not using the TCP (or UDP) functions directly, then this whole discussion won't make any sense.

0 Kudos
Message 5 of 13
(4,183 Views)

 I just use the DAQmx functions to communicate with the chassis. So I think I am not using any of these functions directly? 

 

 

0 Kudos
Message 6 of 13
(4,171 Views)

@Duncan6286 wrote:

 I just use the DAQmx functions to communicate with the chassis. So I think I am not using any of these functions directly? 


Right.  In fact, I didn't look closely enough at which model chassis you're using.  The 9188 is just a DAQ chassis, not a full RT system, so most of my comments don't apply.  The only way you can communicate with it is the functions that NI provides.

 

Why do you want to disable Nagel's algorithm?  What's the problem you're trying to solve?

0 Kudos
Message 7 of 13
(4,169 Views)

My VI runs with the same frequency the chassis sends data. There's always 200 ms pause, then the package arrives. This is no problem for the data acquisition as I get all the data which has been recorded in this 200 ms. But I have some timing functions running as well which only get updated every 200 ms. This is not catastrophic but bothers me a little. 

 

I have found out by searching the forum that others shared the same problem and solved it by deactivating Nagle.

 

Anyway, It says in the description that I can use UDP with this chassis but I assume I can't flip a switch in MAX for that? 😉

0 Kudos
Message 8 of 13
(4,166 Views)

Additionally, if I use a USB chassis, I don't have that problem. So it is definitely the 9188.

0 Kudos
Message 9 of 13
(4,163 Views)

So your question could more accurately be described as, "How can I speed up communication with my cDAQ 9188 chassis"?  Seems to me you're jumping to conclusions about the Nagel algorithm without understanding what you're asking.

 

Without seeing your code it's hard to make definite suggestions, but perhaps you could move the communication with the chassis to a separate loop, and use a notifier or queue to transfer that data to your main loop, which could then run at any rate you want.

0 Kudos
Message 10 of 13
(4,149 Views)