Supervisory Control and Data Acquisition System

LabVIEW 2013

The Supervisory Control and Data Acquisition System sample project demonstrates how to implement a supervisory control and data acquisition (SCADA) system with scalable architecture for building systems with a large number of I/O points. This sample project is based on the Queued Message Handler template and uses LabVIEW Datalogging and Supervisory Control Module features, such as HMI design, third-party connectivity, historical data logging, and alarm logging. Refer to the Queued Message Handler template and its documentation, available from the Create Project dialog box, for information about how the Queued Message Handler template works.

Features

Developer Walkthrough

Refer to ni.com for a developer walkthrough of the Supervisory Control and Data Acquisition System sample project.

System Requirements

Overview

This sample project consists of two main parts: the server and the client. Both the server and the client are based on the Queued Message Handler template.

The server consists of the following components:

The client consists of the following components:

The following illustration shows the structure of this sample project and the relationships between the user interface loops and the user interface VIs.

Note  A VI that is not a subVI of its caller VI is highlighted with a gray dotted line. For example, the Administrator Console VI is not a subVI of the Server Main VI. The Server Main VI uses the Administrator Console VI by starting an asynchronous call.

Running this Sample Project

  1. In the Project Explorer window, right-click IO Simulation»OPC Server Configuration.opf and select Open to load the configuration file for the NI OPC Servers.
  2. In the NI OPC Servers dialog box, click Yes to apply the configuration for the NI OPC Servers at run time.
  3. In the Project Explorer window, right-click IO Simulation»PLC1.lvlib and select Deploy from the shortcut menu to create a simulated OPC process.
  4. Open and run IO Simulation»cRIO.lvlib»cRIO IO Simulation.vi to create a simulated CompactRIO process.
  5. Open and run Server Main.vi to start the SCADA server.
  6. Open and run Client Main.vi to open the client.

Modifying this Sample Project

Adding Simulated CompactRIO Processes

You can add one or more simulated CompactRIO processes in this sample project. Complete the following steps to add a simulated CompactRIO process.

  1. In the Project Explorer window, right-click IO Simulation»cRIO1.lvlib and select Save»Save As from the shortcut menu.
  2. (Optional) Specify a name for the CompactRIO process.
  3. Click Continue to open the Select a Directory dialog box.
  4. Specify a directory where you want to save this library and click Save.
  5. Expand the library that you created, right-click cRIO IO Simulation.vi and select Open.
  6. (Optional) Replace the cRIO1 string input with the name that you specified for the new simulated process and save the change.
  7. Open and run cRIO IO Simulation.vi in the new library to create a simulated CompactRIO process.

Adding Simulated PLC-based Processes

You can add one or more simulated PLC-based processes in this sample project. Complete the following steps to add a simulated PLC-based process.

  1. In the Project Explorer window, right-click IO Simulation»OPC Server Configuration.opf and select Open to load the configuration file for the NI OPC Servers.
  2. In the NI OPC Servers dialog box, click Yes to apply the configuration for the NI OPC Servers at run time.
  3. In the NI OPC Servers application, expand Channel, right-click Subsystem IO Template and select Copy from the shortcut menu.
  4. Right-click Channel and select Paste from the shortcut menu to open the Device Properties dialog box.
  5. Specify the properties for the new channel and click OK. LabVIEW creates a new subsystem IO template under Channel.
  6. Select File»Save.
  7. In the Project Explorer window, right-click IO Simulation»PLC1.lvlib and select Deploy from the shortcut menu.
Tip   You also can add a simulated PLC-based process by deploying a copy of the existing simulated PLC-based library.

Adding Subsystems Bound to Simulated Processes Using the Configuration File

You can add subsystems that are bound to a simulated CompactRIO process or a PLC-based process by modifying the configuration file for the server. You do not need to create a simulated process in the variable engine before you create a bound subsystem.

  1. In the Project Explorer window, right-click Configuration Files»Server.ini and select Open to open the configuration file for the server.
  2. Add a new subsystem entry in the configuration file. For example, you can add a subsystem named Subsystem3 and specify the URL for this subsystem.
  3. Save the changes. You must restart the server for changes to take effect.

Adding Subsystems Bound to Simulated Processes Using the Server Dialog Box

You can add subsystems that are bound to a simulated CompactRIO process or a simulated PLC-based process by configuring the Server dialog box. Before you can create a bound subsystem, you must create a simulated process in the variable engine.

  1. In the Project Explorer window, open and run My Computer»Server Main.vi to display the Server dialog box.
  2. Click the Administrator Console button in the Server dialog box to open the Administrator Console dialog box.
  3. Click the Configure System button to open the Configure System Dialog dialog box.
  4. Click the add button next to the Subsystems field to open the Add Subsystem Dialog dialog box.
  5. Specify a name and binding simulated process URL for the subsystem.
  6. Click the OK button to apply the changes and close the dialog box.

LabVIEW Features and Concepts Used


Important Information

Copyright

© 2013 National Instruments. All rights reserved.

Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.

National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.

End-User License Agreements and Third-Party Legal Notices

You can find end-user license agreements (EULAs) and third-party legal notices in the following locations after installation:

Trademarks

Refer to the NI Trademarks and Logo Guidelines at ni.com/trademarks for information on National Instruments trademarks. Other product and company names mentioned herein are trademarks or trade names of their respective companies.

Patents

For patents covering the National Instruments products/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/patents.