Example Code

Using Control Design & Simulation to create a PID Controller with Generic Plant

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW Control Design and Simulation Module
  • LabVIEW
  • LabVIEW Control Design and Simulation Module

Code and Documents

Attachment

Description

Overview

The example demonstrates how to simulate a PID control with a simulated SISO model (plant).

 

Description

The example uses the LabVIEW Control Design & Simulation module to simulate a PID control with a generic Single Input Single Output (SISO) model.

 

Requirements

 Software

  • LabVIEW 2012 Base Development System (or compatible)
  • LabVIEW 2012 Control Design and Simulation Module (or compatible)

The LabVIEW Control Design and Simulation is now included in LabVIEW Professional, and it is no longer available separately.

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Setup model settings and PID parameters
  2. Run the VI

 

Additional Information or References

Create PID Controller with Generic Plant LV2012 NIVerified.vi - Front Panel.png

 

Create PID Controller with Generic Plant LV2012 NIVerified.vi - Block Diagram.png

 

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text 'NIVerified'. Read here for more information about the new Example Guidelines and Community Platform.**

Matt J - NI Tools Network

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
laloceniet
Member
Member
on

thank for this documentary, is great.

tracey66
Member
Member
on

when I loaded the file it failed on deployment and popped up the following error message:

Deploying NILVSim Get Time and IsAcceptedStep.viNILVSim Get Time and IsAcceptedStep.vi loaded with errors on the target and was closed.

LabVIEW:  Failed to load shared library NILVSim.*:SIM_GetTimeAndIsAccepted:C            . Ensure that the library is present on the RT target. Use either MAX to install NI software or FTP to transfer custom libraries to the RT target.

It seemed that I don't have a library NILVSim. Where I can get it?

Thanks.