Introductory Tutorial - General Controller and PGMs

From SysCAD Documentation
Jump to navigation Jump to search
IMPORTANT: The videos here supplement the SysCAD Introductory Tutorial located in the install directory at SysCADxxx\Tutorial\SysCADIntroductoryTutorial.pdf (or SysCADBasicTutorial.pdf in earlier versions). Refer to this document for detailed instructions.

Navigation: User Guide ➔ Tutorial ➔ Tutorial Videos ➔ General Controller and PGMs

Section 2
Creating a SysCAD Project
Section 3
Project Configuration and Species Database
Section 4
Access Window and Quick View
Section 5
Chemical Reactions
Section 6
Trend Windows, PID and Ratio Controllers
Section 7
Merging and Modifying Projects
Section 8
General Controllers
Section 9
Makeups and EHX
Section 10
Graphics Window and Bulk Tag Change
Section 11
Excel Reports and Quickview

Latest SysCAD Version: 19 March 2024 - SysCAD 9.3 Build 139.35102

Related Links: General Controller, PGM Programming and Conventions, Declaring Variables, PGMs: Tag Functions


Section 8 Overview

Please use these videos together with Section 8 of the SysCAD Introductory Tutorial, which is distributed with the SysCAD full install.

We will continue to use the project that we have constructed and modified in the previous sections of the Tutorial.

In this section we will look at how to insert a General Controller into a SysCAD project and then write a simple pgm control file:

Cobalt reaction Extent = 90 + 0.012 * Autoclave Temperature
where:
Cobalt reaction Extent is the extent of the Cobalt reaction in the Autoclave (Reaction 2); and
Autoclave Temperature is the final temperature of the Autoclave, measured in Kelvin.
  1. We will initially write the pgm file with the equation as shown above with 'hard-wired' values of 90 and 0.012;
  2. We will then add visibility to the pgm to allow the user to see the measured (Autoclave Temperature) and set (Cobalt Reaction Extent) values in the General Controller access window.
  3. Next we will the change the equation in the pgm file to:
    Cobalt reaction Extent = A + B * Autoclave Temperature
    and allow the user to enter the values for A and B from the Access Window of the General Controller.
  4. We will then add maximum and minimum values when declaring A and B so that the user cannot enter a value outside of a defined range.
  5. Lastly, we will move the variables onto a new Access Window of the General Controller and add some text to the Access Window.

Text Editor for Writing pgm Files

We strongly recommend that you use VS Code or Notepad++ for editing pgm files, as it has a number of advantages over Notepad and Textpad.

The examples provided here are demonstrated using Notepad++. Please see Using Notepad++ for more information on installing this software, which is distributed with SysCAD.

NOTE:

  • In the following sections, the section number displayed alongside the videos have been updated to align with the latest tutorial documentation. These may not correspond with the original document used to create the videos.

Step 1: Insert a General Controller and write a Simple pgm File

  • Section 8.4:
    1. This is the first video in the series.
    2. This video shows you how to insert a General Controller into a SysCAD project and then write a simple pgm control file.
  • YouTube link (Allows you to watch in Full Screen mode)
  • Build 136.19571

Step 2: Display Calculated Variables in the General Controller Access Window

  • Section 8.4.1:
    1. This is the second video in the series - you must have already inserted the controller and added the text as shown in the video above.
    2. This video then shows you how to display calculated variables from the pgm file on the Access Window of the General Controller.
  • YouTube link (Allows you to watch in Full Screen mode)
  • Build 136.19571

Step 3: Allow Users to Enter Values in the General Controller Access Window

  • Section 8.4.2:
    1. This is the third video in the series. You must have already completed the steps shown in videos 1 and 2.
    2. This video shows you how to display variables from the pgm file on the Access Window of the General Controller so that users may enter the values.
  • YouTube link (Allows you to watch in Full Screen mode)
  • Build 135.15600

Step 4: Add a Range to an Input Variable

  • Section 8.4.2:
    1. This is the fourth video in the series. You must have already completed the steps in the above 3 videos.
    2. This video shows you how to add a range when declaring a user variable in a pgm file.
  • YouTube link (Allows you to watch in Full Screen mode)
  • Build 135.15600

Step 5: Add Page and Text Labels on the General Controller Access Window

  • Section 8.4.2:
    1. This is the fifth video in the series. You must have already completed the steps shown in the above 4 videos.
    2. This video shows you how to add a new Page to the Access Window of the General Controller and also how to add Text to the Access Window.
  • YouTube link (Allows you to watch in Full Screen mode)
  • Build 135.15600


NOTE: Since Build 139.32335,

  • The syntax for page label is: PageLabel "TabName".
  • The syntax for text label is: TextLabel "Text".

Optional - Finding and Fixing Common pgm Errors

  • Section 8.4: Shows you some common pgm errors - how find and fix them.
  • YouTube link (Allows you to watch in Full Screen mode)
  • Build 135.15600