09-13-2010 10:16 PM - edited 09-13-2010 10:17 PM
Hi,
I am using a dual ethernet port RT controller but have no idea how to get it to work.
Basically i have three devices, 1) Host PC, 2) RT controller and 3) 3rd party device. My VI consists of a simulation loop and a TCP communication part where it will send the output of the simulation loop to the 3rd party device.
I tried using host PC to directly link with the 3rd party device and it works perfectly. I also tried using host PC to run my VI on the RT controller and it works perfectly too. The problem arises when i try to put the RT controller into the picture. It seems that i cant get the second ethernet port to work as the 3rd party device is unable to receive the data. I saw some of the NI tutorial on dual ethernet but they are basically using another NI RT controller on port 2 rather than a 3rd party device.
My host PC IP address is 169.254.115.1 and RT controller IP address (port 1) is 169.254.115.247.
My 3rd party device IP address is 172.18.14.50 and RT controller IP address (port 2) is 172.18.14.100. I am using a crossover cable to link these two together.
Do i have to get this 3rd party device to be detected in MAX first? I can't reset the IP address of this 3rd party device as it is a standalone device. It has a PC attached but it is purely to display the data the device is receiving.
So i wish to know if i have to build additional model/function in my VI to use port 2 of the RT controller? My desired outcome is to load my VI on the RT controller to run the simulation in real time and at the same time send the output data of the simulation loop to my 3rd party device. Any help is appreciated. Thank you.
09-14-2010 03:12 AM
I have used multiple Network Cards within a standard PC environment and you need to tell the PC which port to use for a particular comms transaction (otherwise it will always use the same one).
You need to use the route command to force a particular port.
Read here:
http://www.windowsnetworking.com/articles_tutorials/Making-Sense-Windows-Routing-Tables.html
Here is my LabVIEW example using the systemexec vi. I am not sure how this translates to RT!
09-14-2010 10:30 AM
What are the rest of your IP settings for the RT system - netmask, gateway? Have you tried switching which of the two ports is connected to the third-party device (switching the IP addresses as well, of course)?
09-14-2010 07:08 PM
Hi Nathand,
The rest of the IP settings are all 0.0.0.0.
Do you mean trying to use port 2 to connect to the host PC and port 1 to the 3rd party device? I have tried that and the result is the same.
09-14-2010 08:02 PM
Yes, that's what I was suggesting.
A netmask of 0.0.0.0 probably won't work. Try setting it to 255.255.255.0 on both ports.
09-14-2010 08:06 PM
Hi Nathand,
Very sorry. I have already tried setting both subnet mask to 255.255.255.0. As for default dateway, i left it blank.
09-16-2010 11:55 AM - edited 09-16-2010 11:57 AM
Have you tried using a crossover cable between the RT machine and the 3rd party device? Maybe your PC has an auto-detect ethernet card that will automatically swap the transmit and receive lines which would allow it to work, but if neither the RT system nor the 3rd party device have that capability and you're using a standard straight-through ethernet cable, the communication won't work.
EDIT: Oops, after posting this I reread your original post and noticed that you said you are using a cross-over cable. Sorry for the non-useful post.