Adding Networked Serial Ports to Your (Compact) FieldPoint or PXI System
You can address these ports in a straightforward manner, and from LabVIEW there is no difference between programming serial communication through an ENET device or through the built-in serial ports on the controller. You use the same VISA communication VIs (shown below) to communicate across the local ports or the networked serial ports.
To address the networked serial ports on the ENET box, change the addressing string in the Resource Name control. Once you install and set up the ENET device in Measurement & Automation Explorer (MAX), simply identify it as your VISA resource with the string "ASRL::<hostname or IP address>::<remote Serial port number>::INSTR". For example, in the VISA resource field below, the configured IP address for the ENET device would be “10.0.03.546”, and the port being accessed is port 1.

For step-by-step instructions on the installation and configuration of the ENET device, please see the
ENET-232 Series and ENET-485 Series User Manual for Windows 2000/NT 4.0 and Linux x86/Solaris 2.x
Advantages
Using the ENET device offers several advantages with your embedded Real-Time system:
- The ENET device provides additional ports to communicate to several additional serial devices
- Using the ENET device, the same serial device can be accessed by multiple LabVIEW Real-Time controllers and/or other systems
- Using the ENET device, you can communicate with serial devices in locations where it is physically impossible to connect via a serial cable
- For time-critical data streaming, the ENET device assumes the processing workload and increases the speed of transfer by streaming large packets of data at a time
Best Programming Practices
You should implement certain programming practices when using the ENET device with your LabVIEW Real-Time system:
The TCP/IP communication protocol does not guarantee real-time acquisition. While large amounts of data streaming at high speeds is faster with the TCP/IP-based transfer protocol, the ENET device is subject to any possible traffic or latency issues inherent with Ethernet networks. To avoid execution delays with your real-time code, we recommend you run the critical portion of the code in parallel to the serial communication. If serial communication is a critical portion of your code, either use a local serial port or limit the Ethernet traffic to avoid jitter and delay.
The ENET device works most efficiently when sending large serial messages or when communicating at high baud rates. The graphs below illustrate the data transfer rate for both the ENET device and a local serial port. These benchmarks were created using an NI FieldPoint FP-2000 module.


As the size of the data size (B) increases, the throughput (B/s) of the ENET connection is much higher than that of the local connection. Additionally, at faster baud rates, the ENET device has a higher throughput than the local connection.
For additional information on programming in serial and VISA, see the Related Links below.
Related Links:
NI-VISA Help
Serial Quick Reference Guide
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).

