Scheduled Task

From SysCAD Documentation
(Redirected from SchedTask)
Jump to navigation Jump to search

Navigation: Models ➔ Control 2 Models ➔ Task


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 (Long/Short) Input / Calc Description/Calculated Variables / Options
Tag Display This name tag may be modified with the change tag option.
Condition Display OK if no errors/warnings, otherwise lists errors/warnings.
ConditionCount Display The current number of errors/warnings. If condition is OK, returns 0.
GeneralDescription / GenDesc Display This is an automatically generated description for the unit. If the user has entered text in the 'EqpDesc' field on the Info tab (see below), this will be displayed here.
If this field is blank, then SysCAD will display the UnitType or SubClass.

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 Visible with Schedule type = Iter Count. The user specified iteration count where the report should be executed.
IterCount Input Visible with Schedule type = Iter Count. The current iteration count.
ExecTime Input Visible with Schedule type = Sim Time. The user specified simulation time where the report should be executed.
SimTime Input Visible with Schedule type = Sim Time. 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 Visible with Schedule type = Iter Count. The user specified iteration count where the report should be executed.
IterCount Input Visible with Schedule type = Iter Count. The current iteration count.
ExecTime Input Visible with Schedule type = Sim Time. The user specified simulation time where the report should be executed.
SimTime Input Visible with Schedule type = Sim Time. The current simulation time.

Adding this Model to a Project

Add to 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 Model Selection for more information on adding models to the configuration file.


Insert into Project Flowsheet

  Insert Unit Control 2 Task

See Insert Unit for general information on inserting units.

Example Project