LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI cRIO 9068 TCP Listener

Solved!
Go to solution

I am trying to get a TCP listener to work on the NI 9068 cRIO chassie and have been having issues with my VI not responding after it recieves a TCP connection.

 

I went to the LabVIEW TCP Named Service example project and added my 9068 cRIO chassie and moved the TCP Named Service - Server vi to it and experianced the same non responcive behavior when the Client connects to it. I added my 9082 cRIO chassie and moved the Server VI to it and it worked without issues. Note you will need to change the address in the client's block diagram to match the cRIO's IP address.

 

I am using LabVIEW 2013 SP1

 

I was wondering if anyone else has seen this before and had clues on how to resolve this issue.

 

Thanks,
Jeremy Crismore

0 Kudos
Message 1 of 12
(3,932 Views)

Hello jeremycrismore, 

 

First of all, I would like to confirm the driver compatibility with your system. Which OS are you using? 

Please check the following link to see the compatibility:

 

NI-RIO and LabVIEW Version Compatibility
http://digital.ni.com/public.nsf/allkb/577CC9A7DCFC73DF8625738400116CC3

 

Also check the readme file of your RIO driver to see if it is compatible with your OS. 

 

Regards. 

 

Ernesto

 

0 Kudos
Message 2 of 12
(3,855 Views)

Hello Ernesto,

 

I am running windows 8.1 with RIO 14.0.1, looking through the RIO readme this is supported on windows 8.1.

 

I am using LabVIEW 2013 SP1 and am running LabVIEW Real-Time 13.0.1 on the cRIO.

 

The cRIO that is not working NI 9068 is using the NI Linux RT operating system. If I put it on my other chassie NI 9082 which is running Phar Lap operating system the same code works. The server vi also runs on my windows PC without issues.

 

Cheers,

Jeremy Crismore

0 Kudos
Message 3 of 12
(3,836 Views)

Hello Jeremy, 

 

I was wondering if tou have the NI-RIO  driver for Linux. 

 

If you do not, please download it from the following link:

 

ni.com: "ni-rio" - NI Hardware Drivers
http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/ssnav:ndr/q/ni-rio/

 

Just be sure to check the readme file for compatibility and instructions. 

 

Regards, 

 

Ernesto

0 Kudos
Message 4 of 12
(3,819 Views)

Hello Ernesto,

 

That is the driver package intended to install on a linux development system. I am doing all of my development on Windows 8.1 and deploying the software to the NI 9068 Realtime Linux target.

 

I am fairly sure I am using the latest software drivers for the target. I know I am not on LabVIEW 2014, but I am not able to migrate to that right now and should not be required for a TCP server connection.

 

I have been working with this chassie for some time and have it working for most other things including UDP (both reader and writer) and TCP Client. I am only having issues when I am trying to open the TCP listener. I am fairly sure I am using the latest software drivers for the target. I know I am not on LabVIEW 2014, but I am not able to migrate to that right now and should not be required for a TCP listener to work.

 

Cheers,

Jeremy Crismore

0 Kudos
Message 5 of 12
(3,813 Views)

Hello Jeremy, 

 

If the 9082 is working I think a good thing to do would be:

 

Select the target in NI-MAX and expand it to see the software. 

 

Check which options the 9082 has installed that the 9068 does not. 

 

Confirm that they have the same software or check the options to install to see if there is one that could be used for TCP and is not installed yet. 

 

Regards. 

 

Ernesto. 

0 Kudos
Message 6 of 12
(3,785 Views)

Hello Ernesto,

 

TCP listeners are a very basic piece of network connections and should be part of the most basic deployment. Labview uses TCP connections to connect to the RT systems. I am also having problems when someone connects to the listener not when the listener opens or is waiting for someone to connect to it.

 

To double check this I formated my 9082 chassie and installed only the basic labview software with no options selected in Max. Ran the code on it and it worked fine.

 

Today I did notice a slightly different behavior from the 9068 chassie in that it responded, but only after a little over 20 seconds. This is not an acceptable responce time and all of the tasks that are in a lower priority get overrun(display update is one of those). This makes the system unresponcive and close to a timeout.

 

Thanks,
Jeremy Crismore

0 Kudos
Message 7 of 12
(3,779 Views)

Have you tried pinging the 9068 and the 9082? Is there a significant latency difference?

 

Is there other code running on the target alongside the TCP listener?

 

Cheers,

 

Andy

0 Kudos
Message 8 of 12
(3,770 Views)
The comment that it takes 20 seconds to connect sounds like it could be a DNS issue. Is your code attempting to look up the host name, on either the client or server?
0 Kudos
Message 9 of 12
(3,762 Views)

Both devices are on a private network(without internet connection) and are identified by IP and not a Host Name. With ping I get about 2ms average round trip time.

 

To check what is going on I did a test between the two and used wireshark to see what was going on and here is what I saw. It looks like after the connection is made with the listener(both take about 8ms to do the handshaking) the 9068 posts a standard query to the router trying to find the IP address 81.0.168.192 which is the mirror of my local address of 192.168.0.81. It sends a couple of these without a reply and then sends the TCP message back to my Host PC. The 9082 does not send the standard query message.

 

Cheers,

Jeremy Crismore

0 Kudos
Message 10 of 12
(3,751 Views)