Example PGM Files

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: User Guide ➔ Getting Started ➔ Example PGM Files


Simple Examples Subroutines Examples Dynamic Examples Steady State Overall Mass Balance Array and Matrix Examples
Basic
Layout
Simple
Calculations
Initialise
PreStart
Multi-Step Trigger Checking
Project
Counter, While
and Random
Belt Filter
Wash Loss
Startup
Actions
Mass
Balance
Mass
Balance
Species
Balance
Elemental
Balance
Lookup
Value
Set
Values
Tridiagonal
System
Example User Defined Classes
Set Species Splits Agitator
Power
Reaction
Finder
Aq Feed Conc
Calculator
Evaporation
Correlation
Bayer Liquor
Class
Check
Element Bal
Optimise Controllers
for sensitive PIDs
Relaxed Cross Page Connector Calculate BPE
using TCE
Set Pond Bed Slurry
Volumetric Flow using
TCE Density Basis

Latest SysCAD Version: 13 May 2026 - SysCAD Build 139.37082
Related Links: PGMs


The above tables contain some quick access links for examples listed below. For more information and full example lists, please see below:

Simple Example PGM Files

Subroutine Examples

Example Model Procedure files

MP Example Files:

NOTE: A variation of the Tank Volume code, written in PGM format, is used in the Nickel Copper Example Project. For more information, refer to: GC_Controller (GC_Tanks).

PGM Files using Class and Functions

Using Array and Matrix

The following PGM examples demonstrate the use of the Array and Matrix Class.

Quick Mass balance

The Predefined Class TagSelect can be used to generate quick mass balance checks for a project.

NOTE: The Nickel Copper Project example project uses these quick mass balance checks, along with a more detailed variation of the elemental balance. For more information, refer to the example project: GC_Controller (Overall_Mass_Balance).

Species Check

The following PGM examples can be used to check species at the end of a project solve. They demonstrate the use of the Species Database, TagSelect, String Array, Array classes, as well as String Functions.
NOTE: From Build 139 onwards, the used/unused species lists can be accessed directly via the Plant Model - Species tab, without needing to create them in the PGM file.

Species Properties

The following PGM example can be used to retrieve species data. It demonstrates the use of the Species Database and Array classes.

User Defined Class and Functions

Class - Introduction and Function/Subroutine can be written as part of the main PGM file OR separately in its own file. If the Class or function/subroutine can be used by multiple PGM or projects, it is best to store the code in a separate file, so it can be re-used easily. Please see Sharing Classes between Projects for more information.

Some simple Class examples can be found on page: Class - Examples.

In the following examples, the Class definition is stored in a separate pgm file, the class pgm file is inserted using the include file syntax when it is required.

In the following examples, the Class is written as part of the PGM code. User may copy the class definition into its own file if required.

Example - For Dynamic Projects