Example Code

Process Control Application Template (SCADA)

Code and Documents

Attachment

Introduction

Hi all, here's an (industrial) process oriented template LabVIEW application. For a continuously evolving/updated code, it is possible to clone down this project from gitlab HERE. There is also a Client/Server (distributed) based solution for running the application on a embedded target and the UI on a Windows machine. You can find this example HERE.

 

These application templates are put together with the main contribution from Per Hedlund at DVel Sweden, all kudos to him

 

Overview

Have you ever had the need of a object-oriented and easily extendible process control application? Here's the one for you to experiment with. It implements most of the features from my other documents:

 

  1. Based on the open framework LabQT
  2. Streaming based I/O abstraction, using overrides with simulated readers/writers
  3. I/O using shared variables for the the ease of building interactive GUI's
  4. Feedback control easily extendible and with simple UI for configuration and channel mapping
  5. Alarm handling for aborting and notifying when something's not quite right
  6. Excel based Sequence Execution with a user programmable logic engine (single VI)
  7. Object oriented Execution Logging
  8. Simple File saving with filtering/downsampling into common formats such as .csv/txt and .tdms
  9. Usage of cRIO/sbRIO targets for advanced FPGA IO functionality and performance

 

Usage

You'll need LV2011 or newer, NI RIO drivers, Report Generation Toolkit, RT and FPGA modules.

 

Deploy the shared variables

Right-click and "deploy"

Variables.JPG

 

Run Main.vi

This is the application entry method (VI). Open it and run it:

 

Main.JPG

 

If you have no broken arrow or missing dependencies this is what would greet you.

 

UI.JPG

 

From here you should be ready to experiment and learn how this abstract framework/template/example application does. As usual any questions, missing stuff, bugs, etc - can preferably be posted in the comments section of this document.

 

Have fun and don't give in too easy.

 

Edit 1: Fixed some dependency issues

Edit 2: Added documentation

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

Comments
Treigstad
Member
Member
on

Hi! This looks like just the thing I might need to control my two flow loops. However, I am planning to use a cFP2220 with 0-10V and 4-20mA sensors and outputs for control. Any thought on porting this to that target?

I tried briefly to just remove the RIO targets and add a cFP2220 but I just got a lot of error messages and a broken arrow. Seems to be related to the deployment of variables etc. which don't get deployed to the cFP module.

Contributors