Getting Started with the LabVIEW Real-Time Module 4 ni.com
Adding Analog Input/Output and Data Processing to the Control Loop
Complete the following steps to add analog input/output and a PID control
VI to the control loop.
1. Place the DAQmx Read VI in the control loop on the block diagram.
(FieldPoint) Place the FP Read VI.
2. Right-click the task/channel in input of the DAQmx Read VI and
select Create»Control from the shortcut menu to create a control for
the task/channel in input on the front panel.
(FieldPoint) Create a control for the FieldPoint IO Point In input of the
FP Read VI.
3. Select Browse from the pull-down list of the task/channel in control
on the front panel to open the Select name(s) dialog box. Click the
Create New button to open the DAQ Assistant and create a new
NI-DAQmx task. Refer to the NI-DAQmx Help for information about
using the DAQ Assistant to create an NI-DAQmx task. Select the
NI-DAQmx task that you create from the pull-down list of the
task/channel in control on the front panel.
(FieldPoint) Select the device in the FieldPoint IO Point In control.
Refer to the Measurement & Automation Explorer Help for FieldPoint
for information about configuring a device.
4. Place the PID VI in the control loop on the block diagram. You also
can create custom control VIs using LabVIEW.
5. Wire the data output of the DAQmx Read VI to the process variable
input of the PID VI.
(FieldPoint) Wire the values output of the FP Read VI to the process
variable input of the PID VI.
6. Create controls for the PID gains and setpoint inputs of the PID VI.
7. Place the DAQmx Write VI in the control loop on the block diagram.
(FieldPoint) Place the FP Write VI.
8. Wire the output output of the PID VI to the data input of the DAQmx
Write VI.
(FieldPoint) Wire the output output of the PID VI to the values input of
the FP Write VI.
9. Create a control for the task/channel in input of the DAQmx Write VI
and select an NI-DAQmx task. Refer to step 3 for information about
creating an NI-DAQmx task using the DAQ Assistant.
(FieldPoint) Create a control for the FieldPoint IO Point In input of the
FP Write VI.
The block diagram for an NI-DAQmx system should look similar to
Figure 2.