Controller -- Task

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: Main Page -> Models -> Control 2 Models


General Description

The Task model can be used in both Steady State and Dynamic projects. This model is useful in a way that it allows users to access some SysCAD commands via external programs.

There are two parts to the task model:

  1. It allows the user to schedule / run a script file.
  2. It allows the user to schedule / run a SysCAD Excel report / Macro.

By default, all portions of the model are switched off. The user may enable only the fields required and leave the rest blank. In fact, none of the "On" tick boxes need be selected as once you have set up the information, you can execute the tasks manually by pressing the Execute_Now buttons.

File Formats

Formats of a Script file: Please see Command Scripts for further information.

Formats of a SysCAD Report: Please see Excel Reports for further information.

Data Sections

Summary of Data Sections

  1. SchedTask tab - Contains general information relating to the unit.
  2. Info tab - Contains general settings for the unit and allows the user to include documentation about the unit and create Hyperlinks to external documents.


Controller Task Page

Unit Type: SchedTask - The first tab page in the access window will have this name.

Tag / Symbol Input / Calc Description
Common Data on First Tab Page

Schedule SysCAD Script

Script...
On Tick Box Enables or disables the Schedule Block.
Status Feed back The status of the Script block with a brief summary of the file.
Folder Feed back The full path of the Script file.
File Input The file name of the script file. Relative File Path can be used. Note: this file must be created first. For file format, please refer to SysCAD User's manual, under Command Script.
Edit Button Allow the user to edit the file.
Browse Button Use this button to Browse for the file.
ExecuteNow Button User can use this button to manually execute the script.
Schedule type None No schedule. The report will only be executed when the ExecutedNow command is received.
Iter Count Iteration Count. Should be used for dynamic simulations only. The report will be executed at the specified iteration.
Sim Time Simulation Time. Should be used for dynamic simulations only. The report will be executed at the specified simulation time.
ExecCount Input The user specified iteration count where the report should be executed.
IterCount Input The current iteration count.
ExecTime Input The user specified simulation time where the report should be executed.
SimTime Input The current simulation time.

Schedule Excel Report or Macro

Excel...
On Tick Box Enables or disables the Schedule Block.
Status Feed back The status of the Report block with a brief summary of the file.
Folder Feed back The full path of the Excel Report or Macro.
File Input The file name of the SysCAD Report. Relative File Path can be used. Note: this file must be created first. For file format, please refer to SysCAD User's manual, under SysCAD Reports.
Type Macro Runs a macro in the specified file.
Tag Report Runs a SysCAD Tag Value Report, where information will be extracted from SysCAD and passed onto a predefined MS Excel report
Trend Report Runs a SysCAD Tag Value Report, where historian data will be extracted from SysCAD and passed onto a predefined MS Excel report
Set Tag Runs a SysCAD Import Data Report, where values from a predefined MS Excel report will be sent into SysCAD.
Name Input The report name.
  • If you are specifying a macro, type in the name of the macro, for example: ThisWorkBook.UpdateGraphics
  • If all the reports in the specified file should be used, then this can remain as *
Edit Button Allow the user to edit the file.
Browse Button Use this button to Browse for the file.
ExecuteNow Button User can use this button to manually execute the report / macro.
Schedule type None No schedule. The report will only be executed when the ExecutedNow command is received.
Iter Count Iteration Count. Should be used for dynamic simulations only. The report will be executed at the specified iteration.
Sim Time Simulation Time. Should be used for dynamic simulations only. The report will be executed at the specified simulation time.
ExecCount Input The user specified iteration count where the report should be executed.
IterCount Input The current iteration count.
ExecTime Input The user specified simulation time where the report should be executed.
SimTime Input The current simulation time.

Adding this Model to a Project

Insert into Configuration file

Sort either by DLL or Group.

 

DLL:

Control1.dll

Units/Links

Control 2: Task

or

Group:

General

Units/Links

Control 2: Task

See Project Configuration for more information on adding models to the configuration file.


Insert into Project

 

Insert Unit

Control 2

Task

See Insert Unit for general information on inserting units.