CLICK PLC: Configuring 0-10 V Output via Modbus Guide

Brian Holt3 min read
AutomationDirectModbusTutorial / How-to
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

A LabVIEW application can command a CLICK PLC analog output by writing a numeric value through Modbus. For the reported C2-01CPU and C2-08D1-6V system, separate the task into three layers: PC-to-PLC communication, integer storage in the PLC, and analog-output scaling. Do not treat individual discrete input bits as the analog command unless the PLC logic explicitly assembles those bits into a number.

Separate Discrete Inputs from the Analog Command

A discrete input represents an individual on/off state. A value such as 200 or 10 is a multi-bit numeric word, not one discrete input. Store the command in a PLC numeric location, validate its range, and move or scale it into the analog-output value required by the configured output channel.

Data item Function Required handling
Discrete input Represents an on/off condition Combine multiple bits in PLC logic only if a physical binary-coded interface is required
Modbus value Carries the requested output command from LabVIEW Write it as the PLC's expected integer data type and address
Analog-output value Commands the 0-10 V output Apply the scaling configured for the output channel

Configure LabVIEW as the Modbus Master

The PLC must operate as the Modbus server, also described as the slave, while LabVIEW operates as the master. The evidence identifies a static PLC IP address, an enabled Modbus Server setting, and basic IP tests as the relevant connection checks.

  1. Assign the C2-01CPU a static IP address that is reachable from the PC network.
  2. Use ipconfig /all on the PC to confirm its interface address and network configuration.
  3. Run to test basic IP reachability.
  4. Confirm that Modbus Server mode is enabled in the CLICK configuration.
  5. Before troubleshooting LabVIEW code, use a separate Modbus master to verify that the intended PLC data location accepts a write.
  6. Configure LabVIEW to write the same address and data representation proven by that test.

Apply and Verify the Voltage Scaling

The reported system required a command value of 10 to obtain 1 V. That single observation supports the measured point 10 counts → 1 V, but it does not prove the complete output range or the configured scale. Check the CLICK analog-output configuration before assuming that every 10-count change always equals 1 V.

PC command → Modbus data location → PLC range/scaling logic → analog output

Verify the command at each boundary: confirm the value written by LabVIEW, confirm the same integer in the PLC, confirm the value presented to the analog-output channel, and measure the physical voltage. Use the configured endpoints to derive the actual conversion instead of guessing from one point.

Diagnose Corrupted or Unexpected Values

If LabVIEW sends 10 but the PLC displays a different value, first check the Modbus address and data type. The evidence specifically identifies two hypotheses: LabVIEW may be writing one 16-bit integer while the receiving side reads another register, or one side may interpret the integer data as floating point. Confirm the address, word count, byte or word interpretation, and signed-versus-unsigned representation on both sides without changing the analog scaling until the PLC shows the intended integer.

Communication and scaling are separate faults. A “PLC slave is not connected” indication requires network and server-mode checks; a successful connection with the wrong numeric value requires address and representation checks.

FAQ

Can LabVIEW control a CLICK PLC 0-10 V output?

Yes. Configure LabVIEW as the Modbus master, enable the PLC's Modbus Server mode, and write the numeric command to the PLC location used by the analog-output logic.

Why does sending 10 from LabVIEW not appear as 10 in the PLC?

Check whether both sides use the same Modbus address and interpret the transfer as one 16-bit integer. Reading the wrong register or interpreting integer data as floating point can produce an unexpected value.

Why does the CLICK PLC report that the slave is not connected?

Confirm the PLC has a reachable static IP address, verify reachability with ping, inspect the PC configuration with ipconfig /all, and ensure Modbus Server mode is enabled.

Back to blog