LabVIEW Analog Output over Ethernet: cDAQ vs EtherNet/IP

Claire Rousseau7 min read
EtherNet/IPOther ManufacturerTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

An analog output driven from LabVIEW over an Ethernet cable does not require a PLC. The simplest hardware set is an Ethernet CompactDAQ chassis with an analog output module, controlled from LabVIEW through the NI-DAQmx driver. That setup does not use the EtherNet/IP protocol, though. Decide which one you need before you buy anything, because the two paths use different hardware and different software.

Choosing between Ethernet DAQ and true EtherNet/IP

"Ethernet" is the physical network. EtherNet/IP is a specific industrial protocol: the Common Industrial Protocol (CIP), carried over TCP and UDP. An Ethernet cDAQ chassis talks to the PC over Ethernet using NI's own driver stack. A PLC scanner cannot own it as an EtherNet/IP device. A true EtherNet/IP analog output is an I/O adapter from an automation vendor. Some device on the network has to open a CIP connection to it, and that device is the scanner, or originator.

Requirement Path Hardware LabVIEW software PLC needed?
PC generates a voltage or current; no other controller on the network Ethernet DAQ Ethernet cDAQ chassis + AO module NI-DAQmx driver No
Plant spec requires EtherNet/IP I/O, and the PC is the only controller EtherNet/IP, PC as scanner EtherNet/IP adapter + AO module EtherNet/IP driver add-on that supports scanner (originator) implicit I/O No
An existing PLC already owns the I/O; LabVIEW supplies setpoints EtherNet/IP, PLC as scanner Adapter owned by the PLC EtherNet/IP add-on in adapter mode, or explicit messaging to PLC tags Yes, the existing one

Check before moving on: write down which row applies. If the only reason for "EtherNet/IP" is "I want the output on Ethernet," use row one.

Hardware set for the Ethernet cDAQ path

Buy these items before you start:

  1. Ethernet CompactDAQ chassis. Confirm on the NI product page that the chassis has an Ethernet port, not only USB. Also check the slot count against your future I/O.
  2. Analog output module. Choose voltage or current output to match the load. Check the channel count, the output range, the update rate, and the drive capability (the load impedance it can drive for voltage output, or the compliance voltage for current output) on the module datasheet.
  3. Chassis power supply. Match the input range listed in the chassis specifications.
  4. Software. Install LabVIEW, then install the NI-DAQmx driver version that the chassis and module support. The DAQmx VIs install into LabVIEW's palettes with the driver, so an entry-level LabVIEW edition is sufficient for basic AO. Check the driver readme for the LabVIEW versions it supports.

Check before moving on: open the DAQmx readme and find your chassis model, your module model, and your LabVIEW version in the compatibility tables.

Chassis network addressing and discovery in NI MAX

Prerequisite: the PC and the chassis are on the same subnet, either on a direct cable or through an unmanaged switch. Put nothing else on this link during the first bring-up.

  1. Power the chassis and connect it to the PC's Ethernet port. Confirm the link LEDs on both ends.
  2. Open NI Measurement & Automation Explorer (NI MAX) and go to Devices and Interfaces › Network Devices. Discovery depends on broadcast traffic, so allow NI MAX and the NI services through the Windows firewall.
  3. If the chassis defaults to DHCP and there is no DHCP server, it falls back to a link-local address. Either set the PC's adapter to a static address in the same subnet, or assign the chassis a static IP in NI MAX. Pick the static address that suits your plant network.
  4. Add the chassis to the system, then reserve it. Only one host can own a network cDAQ chassis at a time, and tasks fail until this PC holds the reservation.
  5. Expand the chassis and confirm the AO module appears in the correct slot. Run Self-Test.

Check before moving on: self-test passes, and the chassis shows as reserved by this host.

First analog output from a Test Panel, then from LabVIEW

Prerequisite: wire the AO channel and its common to a digital multimeter only. Do not connect the final load yet.

  1. In NI MAX, right-click the AO module and open Test Panels. Write a DC value inside the module's range, then read the DMM. A matching reading proves the wiring, the module, and the network before any code exists.
  2. In LabVIEW, build the minimum task: DAQmx Create Virtual Channel (Analog Output › Voltage or Current), DAQmx Start Task, DAQmx Write (single sample, on-demand timing), and DAQmx Clear Task. Set the channel's min and max to the range you actually need. DAQmx uses those limits to select the output range.
  3. Wire the error cluster through every VI and display it. Over a network chassis, most first-run failures show up here: the chassis is not reserved, the device name does not match NI MAX, or a value is out of range.
  4. Write three setpoints: low end, midscale, and high end. Record the DMM reading at each.

Check before moving on: each DMM reading matches its setpoint within the accuracy the module datasheet lists. If it does not, see the table below.

Symptom Likely cause Check
Chassis missing in NI MAX Subnet mismatch or firewall blocking discovery Ping the chassis IP; review firewall rules for the NI services
Task error when it starts Chassis not reserved, or reserved by another host Reservation status in NI MAX
Output reads 0 with no error DMM on the wrong terminal, or the task never started Terminal pinout on the module label; order of Start and Write
Output clips at the range limit Channel min/max narrower than the setpoint Channel min/max inputs on Create Virtual Channel
Current output reads low under load Loop resistance exceeds the module's compliance Measure loop resistance; compare it with the datasheet compliance voltage

EtherNet/IP adapter path: scanner role, EDS, and assemblies

Use this section only for rows two and three of the first table. Prerequisite: the EtherNet/IP add-on for LabVIEW supports the role you need. Implicit (cyclic) I/O to an adapter requires scanner/originator capability. Many PC-side packages support only explicit messaging or only the adapter role, so confirm this in the add-on's documentation before you buy.

  1. Get the adapter's EDS file from the adapter manufacturer. It defines the vendor ID, the product code, and the assembly instances for output, input, and configuration data.
  2. Set the adapter's IP address with the vendor's tool or its rotary switches. Ping it from the LabVIEW PC.
  3. Configure the connection in LabVIEW. Enter the output and input assembly instances and their sizes from the EDS or the adapter manual, the RPI (requested packet interval), and the connection type. A wrong assembly size makes the adapter reject the Forward Open.
  4. Scale the value. EtherNet/IP AO modules take engineering counts, not volts or milliamps. The counts-to-signal mapping is in the module manual. Scale in LabVIEW before you write.
  5. Set the adapter's behavior on connection loss (hold last value, go to a safe value, or zero), if the module supports it. The connection times out after the RPI multiplied by the timeout multiplier.

Check before moving on: the connection status in LabVIEW reports "established" (or the add-on's equivalent) with no errors, and the adapter's network status LED shows an active connection.

End-to-end output verification under the real load

  1. Connect the real load, with the DMM in series for current outputs or in parallel for voltage outputs.
  2. Step the setpoint from low to midscale to high and back again from LabVIEW. Confirm each reading is within accuracy and that it settles within your loop's update period.
  3. Stop the LabVIEW VI while it is running, then restart it. Confirm the output state after the stop matches what the process can tolerate.
  4. Unplug the Ethernet cable while the output is at midscale. On the cDAQ path, record whether the output holds its value. On the EtherNet/IP path, confirm the adapter reaches its configured fault state after the connection timeout.
  5. Reconnect the cable. Confirm that LabVIEW re-establishes communication, either the reservation or the CIP connection, and that the output returns to the commanded value without a restart. Record this reading as the commissioning baseline.

FAQ

How do I output an analog signal from LabVIEW over Ethernet without a PLC?

Use an Ethernet CompactDAQ chassis with an analog output module and the NI-DAQmx driver. Reserve the chassis in NI MAX, check the output with a Test Panel, then write values from LabVIEW with a DAQmx AO task.

Is an Ethernet cDAQ chassis an EtherNet/IP device?

No. It communicates with the host PC through NI-DAQmx over standard Ethernet, not through CIP, so a PLC scanner cannot own it as an EtherNet/IP adapter. If you need real EtherNet/IP, use a vendor I/O adapter with an EDS file.

How do I control an EtherNet/IP analog output module directly from LabVIEW?

Install an EtherNet/IP add-on that supports scanner/originator implicit I/O. Configure the adapter's output assembly instance, its size, and the RPI from the EDS file, then write scaled counts into the output assembly.

How do I fix an Ethernet cDAQ chassis that does not show up in NI MAX?

Put the PC and the chassis on the same subnet, since the chassis falls back to link-local if no DHCP server answers. Allow NI MAX and the NI services through the Windows firewall, then ping the chassis IP before retrying discovery.

Back to blog