04-08-2011 12:22 PM
Hi guys.
I have connected my host pc running LV 2010 to the primary ethernet port of my cRIO-9074 using a crossover cable. I want to utilize the second ethernet port on the cRIO-9074 to read UDP messages, and I want to access these messages on my host computer. The UDP messages are sent from a local network, but for testing purposes I also use a second pc running LV 2010 to send UDP messages.
I have configured the ethernet ports on the cRIO-9074 according to this tutorial: "KnowledgeBase 4E0DGASK: Configuring the Dual Ethernet Ports on Real-Time Controllers". My host computer and the primary ethernet port belong to "Subnet A" while the second port and the second computer sending the UDP messages belong to "Subnet B" (I will list the ip-adresses and subnet masks at the end of my post).
For simplicity, I have used the VI´s from this example as a base for UDP communication. The "UDPServerOnRemoteTarget.vi", which broadcast the UDP messages, will run on the secondary computer. The "UDPClientOnRemoteTarget.vi", which reads the UDP messages, will run on my host pc.
Now, in the "UDPServerOnRemoteTarget" VI, you have to specify two IP addresses (the port# was left unchanged at 3363):
1: The IP of the ethernet port that will broadcast the UDP messages.
2: The IP of the ethernet port who will receive the messages.
In case #1 I have set the IP address to the IP address of the ethernet port on the secondary pc.
In case #2 I have tried to set the IP to: a) the IP of the secondary ethernet port on the cRIO, b) the IP of the ethernet port on my host computer and c) the IP of the primary ethernet port on the cRIO.
None of the settings yielded any results. I also tried to change the port number, which did not help.
However, if i bypass the cRIO and connect the host pc and the secondary pc directly (using both a crossover cable and a regular cat5 ethernet cable), I am able to send and receive UDP messages (both the pc´s are still on different subnets). I guess that this at least rules out any fault in the code of the VI´s.
Does anybody know what I am doing wrong here? Is it possible at all to read UDP messages that are being sent to the secondary ethernet port on the cRIO from my host pc?
I have searched the entire NI site and forums, but have not come accross anything that has solved my problem. Most of the other configuration tutorials resembling my case involves importing the device sending UDP messages into the project, but that is clearly not possible in my case, or is it?
My IP settings are:
cRIO 9074:
Primary ethernet port: 169.254.62.215
Secondary ethernet port: 192.168.0.102 (static)
Host PC: 169.254.58.4
Secondary PC: 192.168.0.144 (static)
Subnet mask on all the ports are set to 255.255.0.0
I hope someone out there can help me out.
Regards,
Phat
Solved! Go to Solution.
04-12-2011 03:58 AM
Solved.
Stupid mistake. I was running the VI's on the host pc instead of the cRIO, which explains why the direct communication between the pc's worked. Everything runs fine when compiled to the cRIO.
Regards,
Phat
08-20-2012 03:10 AM
Hello,
is it possible to transmitt an analog signal via the UDP message?
The analog signal is transmittet through an analog input card NI 9205 (I am also using the NI cRIO-9074).
This analog signal needs to be send through port 1 of the cRIO to a my PC.