Creating Virtual Channels with the API
- Updated2025-12-03
- 1 minute(s) read
The following example illustrates the difference between physical and virtual channels and demonstrates how to create virtual channels with the API.
Problem
Create an NI-DAQmx virtual channel to measure temperature in the range 50° C to 200° C using a J-type thermocouple wired to channel 0 on an M Series device configured as Device 1. Use LabVIEW or LabWindows™/CVI™ to write your application.
Solution
- Call the AI Temp TC instance of the DAQmx Create Virtual Channel VI in LabVIEW (DAQmxCreateAIThrmcplChan function in LabWindows/CVI).
- Use Dev1/ai0 as the physical channel on the device to which the thermocouple signal is connected.
- Specify myThermocoupleChannel as the name to assign to your virtual channel.
- Select the appropriate values for the thermocouple type and range inputs. NI-DAQmx applies these attributes to the virtual channel.