Systems Integration

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: User Guide -> Systems Integration

Related link: COM Automation, Command Scripts, Excel Reports

Introduction

With a mature Steady State or Dynamic SysCAD plant model there are many possible applications for using the model in design, operations and optimisation. Many of these include getting SysCAD to work with and talk to other software, including the use of automation.

This story usually begins with using the flexible SysCAD Excel interface. Excel is readily available and widely used by engineers. Data from the SysCAD model, external sources and other software can readily be organised, transferred, analysed and reported in Excel. The SysCAD modeler can manually use SysCAD and Excel for a wide range of tasks.

The next step is a recognition that some tasks have a repetitive pattern. Now we can use SysCAD Command Scripts or COM Automation to automate a sequence of commands. For example a sequence of basic commands to start SysCAD, open projects, set tags, start the solver, retrieve tag values, generate reports, close projects. Excel includes the ability to program macros in VBA so this is usually the ideal starting place for using SysCAD COM Automation. An example of this is distributed with the standard install, see file ..\SysCADxxx\Examples\01Reports\Sensitivity Analysis.xlsm. For a more detailed look at Excel Macro code see VBA Automation example. Alternatively SysCAD includes a simple scripting tool where a sequence of commands can be defined in a text file, as shown in these examples. These scripts can be executed from within SysCAD using menu commands; or the scripts can be executed from the application command line. The command line can be used programmatically, for example through the use of the Shell command in VBA as shown in this example.

The final step, when necessary, is to implement a robust digital automation solution. These are for tasks that are fully automated and executed automatically at a regular interval usually with significant interaction with other software and/or databases. Often a site would be looking to deploy these solutions on servers or cloud solutions. A Typically "systems integrator" would configure and program software to embed (integrate) SysCAD as part of larger solutions. These applications vary widely for different sites and business objectives.

At SysCAD our key focus is to continue to provide the tools, features, software APIs and ongoing development so that SysCAD plant models can be an integral part of more sophisticated digital solutions.

Data Transfer

To be useful a SysCAD plant model needs data to run scenarios and report data to be useful. There is data for model configuration (for example Model Design Criteria) and then there would be data for executing different design or operational scenarios. The type of data differs for steady state and dynamic models. A dynamic project requires additional information for initial conditions and many input parameters change as a function of time; and for reporting tag values as a function of time (trends). The three main external methods for setting/getting data to SysCAD projects are:

  1. Excel Reports - use of flexible SysCAD Excel interface to import/export tag values
  2. Text Files - use of various SysCAD control unit models such as Set Tag List and Get Tag List for getting or setting lists of tags through text files in csv format. For dynamic models their are additional control unit models such as Profile, Events, etc.
  3. COM Automation - programmatically setting/getting individual tags or lists of tags.
  4. Archive Reporter - for dynamic reporting only. Use of SysCAD historian for reporting is not recommended.

Systems Integration

...

Command Scripts vs COM Automation

The two options to "drive" SysCAD by software (ie Automation) are through the use of COM Automation and Command Scripts. Both have their uses. There are distinct advantages and disadvantages. Differences include:

  • COM Automation is interactive - the calling software can make a sequence of API calls including interrogating SysCAD and adjusting subsequent calls accordingly. On the other hand scripts are designed to simply call a fixed sequence of commands.
  • COM Automation has a significantly richer API (set of programming commands) compared to the relatively limited list of script commands. This allows for more sophisticated interactive solutions of calling software reading/writing to SysCAD in interesting ways.
  • COM Automation is limited to a single instance of SysCAD. This is an inherent limitation of using COM Automation. So COM scalability for parallel SysCAD instances on a single PC or VM is not possible.
  • COM Automation requires a higher level of programming skill or experience for a user implementing integration solutions.
  • COM Automation allows stepping through code (interactive debugging), in the IDE of whatever language was used to implement the solution.

Summary:

  • COM Automation is used where interaction while solving is required. It is usually the better option where between scenario solves the calling software is using results and controlling inputs for next solve scenario.
  • Command Scripts are used for parallel execution on a single PC. The scenario solves need to be "load and go" (interactive feedback not needed).

Workflows

...