Professional Documents
Culture Documents
Overview
This tutorial discusses communication between a host PC, or HMI, and a private network target, which is connected to the secondary port of a dual Ethernet port LabVIEW Real-Time controller.
Ethernet port 1 is used for communication between the dual port controller and the host PC. This includes communicating with the controller via LabVIEW and Measurement & Automation Explorer
(MAX). Ethernet port 2 is used to communicate with a private network, which is not visible to the host PC.
The LabVIEW project Dual Ethernet Ports on RT.lvproj provides a method for communicating between the host PC and the private network.
In this example a cRIO 9074 is used for the dual port LabVIEW Real-Time controller; however, this process can be used for any dual port LabVIEW Real-Time controller. A cRIO 9012 is used as
the private network target in this example.
Table of Contents
1. Requirements
2. Configure the targets
3. Deploy the application
4. Configure the target for a private network
5. Establishing communication between the host PC and private network target
1. Requirements
Any dual Ethernet port LabVIEW Real-Time controller
LabVIEW 8.5 or later
LabVIEW Real-Time 8.5 or later
NI-RIO 2.3.1 or later
Ethernet crossover cable
3. Select the dual port controller under Remote Systems. Ensure that Obtain IP address from DHCP server is selected in the IP Settings field. If Obtain IP address from DHCP server is not
selected, select it and click Apply. Click Yes to reboot the controller. Wait for the controller to reboot.
1/4
www.ni.com
2/4
www.ni.com
6.
7. In the project, right-click on Private Network Target SVs and select Deploy. This will deploy the library of Shared Variable to the controller.
8. Expand Build Specifications under the Private Network Target.
9. Right-click on My Real-Time Application and ensure that the application is set as startup ( Unset as startup will be present as shown below).
10. Right-click on My Real-Time Application and select Deploy. This will deploy the startup application to the controller.
11. Reboot the controller by pressing the RESET button, and wait for it to reboot.
12. Ensure that the USER1 LED toggles when the USER1 DIP switch is toggled.
3/4
www.ni.com
The following steps will configure the private network target with a static IP address, which resides in the same subnet as the secondary port of the dual port controller. (i.e. 192.168.1.4 for the
secondary port and 192.168.1.5 for the private network target, with a subnet mask of 255.255.255.128).
1. Open MAX and select the private network target under Remote Systems.
2. Select Edit the IP settings in the IP Settings field. Enter an IP address that resides in the same subnet as the secondary port of the dual Ethernet port controller (i.e. 192.168.1.5). (For an
understanding of subnets, see Knowledge Base 3SC9P5IH)
3. Click Apply. Click OK on all dialog boxes and Yes to reboot. You have now configured the system as shown below. (Note: The host PC will most likely lose all ability to communicate with the
private network target. This behavior is expected, since the private network target is on a different subnet. Useful Tip: To maintain communication with both targets, use a second NIC in your
development machine, configured with a static IP that resides in the same subnet as the private network target.)
4/4
www.ni.com