time scheduler help - citect · pdf filetime scheduler help citect pty. limited ... getting...

36
Time Scheduler Help Citect Pty. Limited 3 Fitzsimons Lane PO Box 174 Pymble NSW 2073 Australia Telephone: 61 2 9496 7300 Fax: 61 2 9496 7399

Upload: lyduong

Post on 06-Feb-2018

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Time Scheduler Help

Citect Pty. Limited

3 Fitzsimons LanePO Box 174

Pymble NSW 2073Australia

Telephone: 61 2 9496 7300Fax: 61 2 9496 7399

Page 2: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

DISCLAIMERCitect Corporation makes no representations or warranties with respect to this manual and, to the maximum extent permitted by law, expressly limitsits liability for breach of any warranty that may be implied to the replacement of this manual with another. Further, Citect Corporation reserves the rightto revise this publication at any time without incurring an obligation to notify any person of the revision.

COPYRIGHT© Copyright 2005 Citect Corporation. All rights reserved.

TRADEMARKSCitect Pty. Limited has made every effort to supply trademark information about company names, products and services mentioned in this manual.Trademarks shown below were derived from various sources.

Citect, CitectHMI, and CitectSCADA are registered trademarks of Citect Corporation.

IBM, IBM PC and IBM PC AT are registered trademarks of International Business Machines Corporation.

MS-DOS, Windows, Windows 95, Windows NT, Windows 98, Windows 2000, Windows for Workgroups, LAN Manager, Microsoft Windows XP, Exceland MSMAIL are trademarks of Microsoft Corporation.

DigiBoard, PC/Xi and Com/Xi are trademarks of DigiBoard.

Novell, Netware and Netware Lite are registered trademarks of Novell Inc.

dBASE is a trademark of Borland Inc.

GENERAL NOTICESome product names used in this manual are used for identification purposes only and may be trademarks of their respective companies.

September 2004 edition for CitectSCADA Version 6.0

Manual Revision Version 6.0.

Printed in Australia.

Page 3: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Contents

Citect Time SchedulerIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Configuration files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2What’s installed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Setting up a standalone installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Setting up a network-distributed system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Running Time Scheduler on an Internet Display Client. . . . . . . . . . . . . . . . . . 9

Chapter 1 Using the Time SchedulerGetting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Starting the Time Scheduler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Closing the Time Scheduler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Opening and Closing Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Configuring a Time Scheduler Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Defining a Calendar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Using the Shortcut menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Defining Programs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Creating a Tag/Value Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Creating an Expression-based Program . . . . . . . . . . . . . . . . . . . . . 17Assigning Programs to Another Program . . . . . . . . . . . . . . . . . . . . . 17

Selecting Tags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Assigning a Schedule to a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Scheduling Programs and Daylight Savings . . . . . . . . . . . . . . . . . . 20Enabling/Disabling Programs or Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Running Programs Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Viewing Tag Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Creating and Printing Day Detail Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Viewing Daily Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Time Scheduler Cicode Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Page 4: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Contentsiv

Page 5: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Citect Time Scheduler

IntroductionCitectFacilities Time Scheduler is a calendar‐based programming tool that allows you to manipulate tag values within a CitectFacilities project. It can be used to create a sequence of automatically‐executed commands, delivering a valuable scheduling tool for applications such as building automation. 

For example, Time Scheduler can be used to manage the lighting and heating in a building, providing benefits such as automated services and minimized peak energy costs. As well as simple on/off commands, multi‐state and multiple tag variations can be configured.

Sequences can be configured in chronological patterns, such as a regular weekly or daily schedules, with special conditions such public holidays easily accommodated. 

Schedules can also be modified online during CitectFacilities runtime, and commands can also be executed manually by an operator. 

See Also System ArchitectureInstallationSetting up a standalone installationSetting up a network‐distributed system

System Architecture The Time Scheduler manipulates a CitectFacilities project from the alarms server. 

CitectFacilities can function as a standalone application, or incorporated across a redundant network configuration with multiple clients. Redundancy requires the existence of a standby alarm server. 

In a network‐distributed scenario, the primary and standby alarms servers are defined in the [TMSCEDULE] section of the Citect.ini file located in the Windows directory of each client machine. 

Any configuration changes made to a schedule using a client installation can then be automatically updated on both the primary and standby alarm server by using an update utility (Netupdte.exe). 

Configuration filesOnce you have configured a project schedule, the data generated is stored as a set of files on the primary alarms server in a “TmSched” subdirectory for each CitectFacilities project. 

Page 6: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Citect Time Scheduler2

For example, the configuration files for the Example project located at:

C:\Program Files\Citect\CitectFacilities\User\Example

are stored in the directory: 

C:\Program Files\Citect\CitectFacilities\User\Example\TmSched

The update utility modifies these files when a change is made on a client installation. If you are running a network‐distributed system, these files will need to be writable from a remote machine. Youʹll need to ensure the host folder is shared with appropriate permissions set. 

Note: When backing up a CitectFacilities project, you must select the Save subdirectories check box to save your configuration settings in the .ctz file. If this check box is not selected, you will lose your configuration settings when you back up your project.

See Also InstallationSetting up a standalone installationSetting up a network‐distributed system

InstallationTime Scheduler is installed from the CitectFacilities CD. It must be installed on the alarms server and every computer where you plan to run the Time Scheduler as a client. 

During installation, you must indicate the directory where you want to install Time Scheduler. The default directory is:

C:\Program Files\Citect\CitectFacilities\TimeScheduler

RequirementsThe only requirement for installation is that the host PC must have a current installation of CitectFacilities Version 6.xx or later. 

Note: To run the Time Scheduler on a Citect Internet Display Client, you must follow a special setup procedure. 

What’s installed?The following files are copied to the install directory:

ctTime Scheduler.exe ‐ the configuration module for the Time Scheduler.

ctTime SchedulerSetup.exe ‐ a setup utility that is used to adjust the required parameters in the local Citect.ini file.

Netupdte.exe ‐ an automatic update utility for network configurations.

CitectKey.dll and ctkc.dll ‐ Citect library dlls.

Page 7: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Citect Time Scheduler 3

Installation also adds ctTime Scheduler.ini to the Windows directory (e.g., C:\WinNT). This is the configuration file that defines the language used for the interface.

A launch icon is also added to the Windows Start menu.

See Also Setting up a standalone installationSetting up a network‐distributed system

Setting up a standalone installation

You can run the Time Scheduler as a standalone application on the alarms server. This will mean configuration of the schedule must take place on the alarms server computer. 

To set up a standalone installation:

1 Install the Time Scheduler on the alarms server for the project you would like to manipulate.

2 Launch the ctTime Scheduler Setup application from the Windows Start menu. The Time Scheduler Configuration tool will launch. 

3 From the Main tab, select Standalone Computer as the Scheduler’s role. 

Page 8: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Citect Time Scheduler4

4 From the Interface tab, select the language to use for the configuration interface. 

5 You then need to indicate where the Time Scheduler is installed. 

Go to the Time Scheduler tab and type in the path to the appropriate directory, or use the browse button to the right to locate it. This will set the [TMSCHED]Path parameter in the Citect.ini file located in the Windows directory. 

Page 9: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Citect Time Scheduler 5

The Start button allows you to launch the Time Scheduler from the directory indicated. You can use this button to confirm that you have used the correct location.

Note: If you use an alternative Citect.ini file, you will have to launch the Time Scheduler Configuration tool from the Run command prompt to call the correct file. For example:

Open: ctTime SchedulerSetup.exe citectxxx.ini

See Also Setting up a network‐distributed system

Setting up a network-distributed system

You must install the Time Scheduler on the primary and standby alarms servers, and every computer you plan to use as a client. 

You also need to indicate the location of the associated configuration files so they can be updated whenever a client is used to modify a program. This means identifying the primary and standby alarm servers within the Citect.ini file on every machine where the Time Scheduler is installed.

Note: If you want to run the Time Scheduler on a Citect Internet Display Client, you must follow a special setup procedure. If you want to run the Time Scheduler on a CitectSCADA Web Client, you need to ensure that the user profile you log in with has appropriate network access to the configuration tool, and the location of the configuration files. The user must be able to execute the configuration tool, and write to the configuration files. 

Page 10: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Citect Time Scheduler6

To set up a network distributed system

It is easiest to consider the network setup process as three separate steps:

Setting up the primary alarms server

Setting up the standby alarms serer

Setting up clients

To set up the Time Scheduler on the primary alarms server:

1 Run the Time Scheduler installation on the primary alarms server for the project you would like to manipulate.

2 Launch the ctTime Scheduler Setup application from the Windows Start menu. The Time Scheduler Configuration tool will launch. 

3 From the Main tab, select Network Computer as the Scheduler’s role. 

4 From the Interface tab, select the language you would like used for the configuration interface. 

5 On the Time Scheduler tab, indicate the directory where the Time Scheduler is installed. You can use the browse button to locate it. This will set the [TMSCHED]Path parameter in the Citect.ini file. 

The Start button will allow you to launch the Time Scheduler and confirm the setting you have used. 

Page 11: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Citect Time Scheduler 7

6 Go to the Network Configuration tab. This tab is used to identify the location of the schedule configuration files on the primary and standby server. 

7 In the Primary Server Path field, key in the location of the Time Scheduler configuration files for the project you want to manipulate. This is the “TmSched” subdirectory within the Citect\user\<project> folder. 

For example, the configuration files for the CitectFacilities Example project would be:

C:\Program Files\Citect\CitectFacilities\User\Example\TmSched

As you are currently setting up the primary alarms server, these files will be located locally. A path using the appropriate mapped drive is sufficient.

Make sure you share this folder for each project, so that client machines have write access. You should check the share permissions for the folder to confirm this. This is particularly relevant if you are using Windows XP, as the default permissions set for a shared folder is read only. This must be changed to Full Control. 

Note: The “TmSched” directory will not exist until you launch the Time Scheduler and select a CitectFacilities project to work with. If this has not happened, you will not be able to browse to this directory and will have to manually type its name. 

This field sets the [TMSched]Pri parameter in the Citect.ini file. 

Page 12: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Citect Time Scheduler8

8 In the Standby Server Path field, key in the location of the Time Scheduler configuration files on the standby alarms server. 

Note: If you do not have a standby alarms server, leave this field blank.

The directory location should be the same as the primary server, except you need to identify the standby alarm server computer. You can do this using a mapped drive or a standard UNC address. 

For example, if you mapped drive H to:

\\AlarmServer_standby\Program Files\Citect\CitectFacilities\User

You would enter in the following in the Standby Server Path field:

H:\Example\TmSched

If you were to use a UNC address, it would be:

\\AlarmServer_standby\Program Files\Citect\CitectFacilities\User\Example\TmSched

Note: The “TmSched” directory will not exist until you launch the Time Scheduler and select a CitectFacilities project to work with. If this has not happened, you will not be able to browse to this directory and will have to manually type its name. 

This field sets the [TMSched]Stby parameter in the Citect.ini file.

9 Click OK to implement the Time Scheduler configuration. 

To setup the Time Scheduler on the standby alarms server:

1 Run the Time Scheduler installation on the standby alarms server for the project you would like to manipulate.

2 Repeat steps 2 to 6 as defined above for the primary alarms server. 

3 When you get to the Network Configuration tab, you’ll need to define the Primary and Standby Server Path. As the configuration files on the primary alarms server are located remotely, you will have to use a mapped drive or a standard UNC address. 

For example, if you mapped drive H to:

\\AlarmServer_primary\Program Files\Citect\CitectFacilities\User

You would enter in the Primary Server Path field:

H:\Example\TmSched

If you were to use a UNC address, it would be:

\\AlarmServer_primary\Program Files\Citect\CitectFacilities\User\Example\TmSched

Page 13: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Citect Time Scheduler 9

Remember that the “TmSched” directory will not exist until you launch the Time Scheduler and select a CitectFacilities project to work with. 

The Standby Server Path will point to the configuration files located locally, so a path using the appropriate mapped drive is sufficient:C:\Program Files\Citect\CitectFacilities\User\Example\TmSched

4 Click OK to implement the Time Scheduler configuration. 

To setup the Time Scheduler on a client computer:

1 Run the Time Scheduler installer on the client computer. 

2 Repeat steps 2 to 6 as defined above for the primary alarms server. 

3 When you get to the Network Configuration tab, you’ll have to define the Primary and Standby Server Path. In both cases, the configuration files you are identifying will be located remotely on the primary and standby alarms servers. You will have to use a mapped drive or a standard UNC address. 

For example, if you mapped drive H to:

\\AlarmServer_primary\Program Files\Citect\CitectFacilities\User

You would enter in the Primary Server Path field:

H:\Example\TmSched

If you were to use a UNC address, it would be:

\\AlarmServer_primary\Program Files\Citect\CitectFacilities\User\Example\TmSched

Remember that the “TmSched” directory will not exist until you launch the Time Scheduler and select a CitectFacilities project to work with. 

See Also Running Time Scheduler on an Internet Display ClientUsing the Time Scheduler

Running Time Scheduler on an Internet Display Client

A special setup procedure is required if you plan to run a project that incorporates the Time Scheduler on a Citect Internet Display Client (IDC). This procedure ensures the Time Scheduler and its required support files can be located by the IDC at runtime.

To prepare the Time Scheduler for deployment on an IDC:

1 Make sure the alarms server is set up as an Internet Server. To do this, run the Computer Setup Wizard.

2 Check that the configuration files folder for the project is shared with appropriate write permissions. 

3 Run the required project on the alarms server.

4 Go to the computer where you would like to run the IDC.

Page 14: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Citect Time Scheduler10

5 Install Citect IDC Version 6 on this PC to the default location. Note, there is no need to install Time Scheduler on this computer. 

6 Copy the file ctTimeScheduler.ini from the alarms server’s C:\Windows directory, and paste it into the C:\Windows directory of the IDC machine. Copying this file ensures that the language displayed by the Time Scheduler will be the same on the IDC and alarms server. 

7 Open the IDC Citect.ini file in a simple text editor. This file can be found at:C:\Program Files\Citect\IDC\Bin

8 Add the following entry:[CTEDIT]

USER=\\<AlarmServerComputerName>\User

[TMSCHED]

Path=\\<AlarmServerComputerName>\CitectTimeScheduler\

FilterMask=0

FilterIODevice=

ReadOnly=0

Pri=\\<AlarmServerComputerName>\User\ProjectName\TmSched\

Stby=

Project=<ProjectName>

9 Save the changes to the IDC Citect.ini file. 

When you launch the IDC, it will now be able to display the Time Scheduler on the appropriate project pages.

Note: If you plan to deploy TimeScheduler on the Web Client, you must ensure that you copy the ctTimeScheduler.ini file to the Windows directory of the client computer, otherwise the language displayed on the client may differ from that used in the project.

See Also Using the Time Scheduler

Page 15: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

Chapter II: Using the Time Scheduler

Getting StartedThis section describes basic operations of using the Time Scheduler, such as the following:

Starting the Time Scheduler

Closing the Time Scheduler

Opening and Closing Projects

Starting the Time Scheduler

You can start the Citect Time Scheduler in two ways:

Choose Start | All Programs | Citect | ctTimeScheduler. This runs the Time Scheduler as a standalone application.

From within the Citect Facilities runtime environment.

To do this, add a button to the graphics page from which you want to start the Time Scheduler and attach the TmSched_configurator() Cicode function. Recompile and then run the project. Click the button to start the Time Scheduler.

Note: If the machine you’re running the Time Scheduler on does not have a dongle, an alert appears to the effect that you can only create five programs, since Time Scheduler is running in demo‐only mode. Once a dongle is attached, this restriction is removed.

Closing the Time Scheduler

You can close the Citect Time Scheduler in two ways:

Choose Project | Quit.

Click the Close button of the Time Scheduler window.

Opening and Closing Projects

When you start the Time Scheduler, the Select Project window appears showing the Citect Facilities projects currently defined.

Note: If you open the Time Scheduler from your runtime environment, you don’t have the option to choose a different project.

Page 16: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

12

Select a project and click OK. The Time Scheduler window for the selected project appears.

When the Time Scheduler is open, you can switch to a different project by choosing Project | Open Project. You can have only one project open at a time. Close a project by choosing Project | Close Project.

Configuring a Time Scheduler ProjectConfiguring a Time Scheduler project involves the following steps:

1 Defining a Calendar. Assign your defined days to your calendar.

2 Defining Programs. Define the program type and configure the program.

3 Selecting Tags. Select the tags to include in the program.

4 Assigning a Schedule to a Program. Specify when the program(s) should run and associate them with a defined day.

You don’t have to perform the steps in this sequence; for example, if you want you can first define your programs and assign a schedule to them before defining your calendar.

Note: When backing up your project, you must select the Save subdirectories check box to save your configuration settings in the .ctz file. If this check box is not selected, you will lose your configuration settings when you back up your project.

Defining a Calendar Defining a calendar entails creating special days and then assigning them to the calendar. You can also change an existing calendar to modify your planned monthly schedule. The calendar applies only to the current project.

You use the Calendar window to define your calendar. By default, the calendar shows the current month. 

To open the Calendar:

Choose Configuration | Calendar.

Page 17: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

13

An undefined calendar looks like this:

(a) normal day (b) special day (c) Month menu (d) Year menu (e) Day list boxThe white boxes on the calendar represent normal days. A blank, undefined calendar consists entirely of normal days (Monday to Friday, Saturday, and Sunday) because, by default, every day on the calendar is defined as a normal day. These are days on which the same program or sequence of programs will run.

To start with, you might assign a schedule of programs to your normal days to define a schedule of programs that should run regularly. This might account for most of the scheduled activity that you want to occur in your facility—lights and air‐conditioning coming on at the same time every day, for example. But what about exceptions for public holidays when your facility is closed or has a different operating schedule? In this case, you’d create special (or custom) days, as shown here:

Colored days represent exceptions to regularly scheduled events. The color of a special day corresponds to that day in the Day listbox. In this example December 

a

b

c

d e

Page 18: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

14

27 and 28 are defined as Vacation Day since all employees in this facility will be on vacation during this time, and the lights and air‐conditioning will have a different schedule for a cost‐saving measure.

The Calendar window has the following controls.

To define a calendar:

1 In the Day list box, type a name for a special day on one of the empty rows. You can define up to 20 special day types. You can also type over an existing entry if you want to change the name of an existing special day.

Note: Remember that by default, the Normal Day is assigned to all days on the calendar.

2 In the calendar, double‐click the day to which you want to assign the special day. The day menu appears.

3 Choose the name of the special day from the menu. The day assumes the color of the special day you selected, showing it has been assigned. You can assign a special day to as many days as you like.

4 Repeat steps 1–3 for all the days you want to define on your calendar.

5 Click Save to save the calendar.

6 Click Close to close the calendar.

Notes

Changing the name of an existing special day does not affect the programs assigned to that special day before it was changed.

If you delete a special day that is assigned to a day, that day reverts to a normal (default) day.

You cannot change the colors preassigned to the special days in the Day list box.

Name DescriptionMonth menu Select a month or use the Up or Down arrows to increment or decrement the month.Year menu Type in a year, or click the Up or Down arrow to increment or decrement the year.Day list box Shows the Normal Day and special days defined for the current project. You can create a

special day by highlighting existing text in one of the listbox cells and typing a new name.Day shortcut menu

Right-click the Day list box to display the shortcut menu with the following commands:Undo - Undoes the last actionCut - Cuts the selected itemCopy - Copies the selected itemPaste - Pastes the item in the ClipboardDelete - Deletes the selected itemSelect All - Highlights all text of the selected item

Page 19: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

15

Using the Shortcut menuYou can use the shortcut menu to perform often‐used commands more quickly when working with the Day listbox. For example, you can right‐click an existing day type and paste it into a new row; doing so copies the selected day to a new row with all scheduled programs associated with that day. Then type in a new name for day. You can also use the shortcut menu to undo a previous action, delete a day, and cut and paste a day.

See Also Defining Programs

Defining Programs Defining a program consists of assigning a tag (or tags) to a named program. You can configure up to 200 programs, and each program can be configured to have a maximum of 120 tags. You use the Program Configuration window to configure programs.

To create a new program:

1 Choose Configuration | Programs. The Program Configuration window appears.

Note: If you’re working with an existing program, you’ll also see a table to the right of the Program List box.

2 Click New. The New Program window appears.

Page 20: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

16

3 In the Name Program text box type the name of the program you want to create and click OK. The name of the new program appears in the Program List box.

If you type the name of an existing program, the new program is assigned a version number in the format (~version).

Note: If you are running the Citect Time Scheduler in demo‐mode, you can only create five programs. You must attach a dongle to the machine running Citect Facilities to remove this restriction.

4 Select the new program in the Program List box.

5 From the menu choose a type for the program:

Tag/Value: Assigns a value directly to the tag. For details, see Creating a Tag/Value Program.

Expression: Creates an expression‐based program. The product of the expression is the value assigned to the tag. For details, see Creating an Expression‐based Program.

ProgramList: Specifies another program or programs to execute when the calling program is executed. For details, see Assigning Programs to Another Program.

Note: You cannot mix different program types within the same program. For example, each program must consist solely of tag/value types, expression‐based programs, or programlist types.

6 Click Save, or Save As to save the program to another name.

To delete a program:

Select the program in the Program List box you want to delete and click Delete. A confirmation box appears. Click OK.

Creating a Tag/Value ProgramA tag/value program assigns a specified value to the associated tag when the program executes.

To create a tag/value program:

1 Double‐click the first empty row in the Tag PLC column. The Selection Tag PLC window appears.

Page 21: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

17

2 Select the tag you want to use in the program, type a value into the Value text box, and then click OK. For more information about selecting tags, see Selecting Tags.

Note: You can also type a value into the Value row.

3 Repeat steps 1–2 for each tag in the program.

4 Click Save to save the program, or Save As to save the program to a different name.

Creating an Expression-based ProgramExpression‐based programs can include expressions such as the following:

Tag = Value + Value: The value resulting from the addition of two values is assigned to the tag.

Tag = Tag1 + Tag2: The value resulting from the addition of the values currently stored by Tag1 and Tag2 is assigned to the tag.

Tag = Tag + Value: The value resulting from the addition of the value currently stored in the tag plus a value is assigned to the tag.

Although the above examples only use addition, you can also use the other standard mathematical operators: subtraction (‐), multiplication (*), and division (/).

To create an expression‐based program:

1 Double‐click the first empty row in the Tag column. The Selection Tag PLC window appears.

2 Select the tag you want to use in the program, and then click OK. For more information about selecting tags, see Selecting Tags. This is the tag that will be assigned the value resulting from the evaluation of the expression.

3 In the Type column, click the row to display the Type menu, and choose a type for the tag selected in the previous step.

4 In the Tag or Value column enter the tag or value to use in the expression.

5 Click the row in the Operator column and select a mathematical operator (+, ‐, *, /).

6 In the second Tag or Value column enter the tag or value to use in the expression.

7 Click Save to save the program, or Save As to save the program to a different name.

Assigning Programs to Another ProgramUsing the ProgramList type, you can include other programs you’ve defined within a Time Scheduler program. In this way you can “daisy chain” programs to execute one after another in quick succession. Because the Time Scheduler has 

Page 22: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

18

a resolution of one minute, you can use the ProgramList type to simulate events that should be simultaneous, such as turning on lights and air‐conditioning, for example.

To create a ProgramList‐type program:

1 Double‐click the first empty row in the Program list box. The Program Select window appears.

2 Select the program to include, and select OK. The selected program appears on the first row in the Program list box.

3 Repeat steps 1–2 for each program you want to include in the program.

4 Click Save to save the program, or Save As to save the program to a different name.

Selecting Tags You use the Selection Tag PLC window to select tags when assigning them to programs. You can also use this window to assign values to a selected tag.

Page 23: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

19

The Tag list box allows you to view and select any of the tags included in your first‐level included project. The window contains the features described in the table below.

To search and select a tag:

1 If necessary, select a different project from the Include Projects menu.

2 If necessary, use the filter to narrow the focus of your search. You can enter a search string in the Filter text box, and/or select one or more of the Digital, Analog, and String check boxes to reduce the number of search results displayed in the Tag list box. For more information, see the table above.

3 Click the tag in the Tag list box. 

4 If necessary, assign a value to the tag by typing a value in the Value text box.

Name DescriptionTag Displays all the tags currently included in your first-level project.Value Type in a value to assign to the selected tag.Filter Allows you to filter the tags displayed in the Tag list box to narrow the focus of your search.

Selecting the Digital, Analog, and String check boxes controls whether tags of this type appear in the Tag listbox: clear the checkbox to remove tags of that type from the list box. Type a value in the Filter text box to constrain your search to tags containing that string (or portion). For example, typing “_LEV” in the Filter text box only displays tags that contain that string or portion of that string. The filter is not case-sensitive.

Include projects Select the project containing the tags you want to search for.

Page 24: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

20

5 Click OK. You exit the window.

See Also Creating a Tag/Value ProgramCreating an Expression‐based Program

Assigning a Schedule to a Program

Assigning a schedule to a program defines when a program should start on a selected day. If you have already assigned days to your calendar, after completing this step your programs will run on the day and time specified.

Note: If this is the first time you’re using the Time Scheduler, you’ll probably first want to assign programs to your normal days to define the schedule of programs that should occur regularly. Then define schedules for programs that will be assigned to special days on your calendar, since these will be the exceptions to your regularly scheduled programs.

You use the Time Scheduler window to assign a schedule to a program.

See Also Defining a Calendar

Scheduling Programs and Daylight SavingsBecause the Citect Time Scheduler doesn’t recognize Daylights Savings, you might encounter unexpected results if you try to schedule programs during transitions into and out of Daylight Savings. For example in New South Wales in 2005:

Daylight Savings ends on March 27 at 3am. If you schedule a program to run at this time, it will execute twice, since at 3:00am clocks are turned backward one hour , like this: 1:00am... 2:00am... 3:00am... 3:00am and so on. Consequently you should be aware that any programs scheduled between 3:00am to 3:59am on this day will execute twice.

Daylight Savings begins on October 30 at 2am. If you schedule a program to run at this time, it will not execute as clocks are turned forward one hour, like this: 12:00am... 1:00am... 3:00am... 4:00am and so on. Consequently you should not schedule a program for the hour beginning 2:00am and ending 2:59 on that day.

To assign a schedule to a program:

1 Display the Time Scheduler window. This window is always displayed when the Time Scheduler is running.

Page 25: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

21

Your defined days appear in the Day list box (the normal days appear already defined for you). The status line at the bottom of the dialog displays the system time and date, the current project, and project path name.

2 In the Day list box, select the day you want to schedule programs for, and then click the Time column. The Program window appears for the selected day.

Page 26: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

22

The Program window allows you to select a time to start a program. The time scale runs from 00:00 (midnight) to 23:59 in one‐minute increments. You can only schedule programs for one‐minute intervals (that is, you cannot schedule a program to run at a half‐minute interval such as 23:59:30).

3 Using the scroll box on the right of the window, scroll to the time you want to run the program at and click the row. You can also click the scroll arrows at the top and bottom of the scroll bar.

4 Click the Program Select button. The Program Select window appears with a time control showing the time selected.

Page 27: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

23

5 Select a program from the list box. If necessary, use the time control to specify a different time for the program, or just click OK to have the program execute at the time you selected previously.

Note: Use the time control by clicking the arrows to increment or decrement the hour and minute value as appropriate. The leftmost arrows control the hour component, the rightmost arrows the minute component.

6 Click Save to save the program, or Save As to save the program to a different name.

7 If you want, click Print to view a report of the program schedule for the selected day. For details, see Creating and Printing Day Detail Reports.

8 Click Close to exit the window.

Enabling/Disabling Programs or TagsThe Time Scheduler allows you to disable or enable your defined programs or tags to give you greater control over them.

For example, suppose you have a program called “Lights_On” that consists of three tags, Light1, Light2, and Light3, which control lights within three areas of your facility. The program Lights_On is regularly scheduled to execute at 5:00am, but it is decided that for one day only, the lights in the area governed by the tag Light3 should be left off until 6:00am. Instead of having to create a new program to account for this, instead you can disable the Light3 tag until 6:00am, when it will be triggered and the lights turned on.

In another example, suppose you have disabled a program (or tag) until 12:00pm. At this time the program becomes enabled; if you have scheduled this program to execute at 12:00pm, it will be executed.

To disable programs or tags:

1 Choose Configuration | Disable/Enable. The Enable/Disable window appears showing any currently disabled tags.

Page 28: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

24

2 Click either the Tag or Program tab, depending on which element you want to disable:

To disable a tag, double‐click the Tag column, and then select a tag using the Selection Tag PLC window. For details about selecting tags, see Selecting Tags.

To disable a program, double‐click the Program column, and then select a program using the Program Select window.

3 Double‐click the End Date column. The Date/Time window appears.

4 Click a day on the calendar.

5 Select a time using the time display at the top of the Date/Time window. Click the hour or minute component, and then use the Up and Down arrows on the right‐hand side to alter the value as required.

6 Click OK to exit the Date/Time window. The End Date and End Time columns show the date and time you selected.

Page 29: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

25

To enable programs or tags:

1 Choose Configuration | Disable/Enable. The Enable/Disable window appears.

2 Click the Program or Tag tab. The list of the disabled programs or tags appears with the day and time they were scheduled to be disabled.

3 Select the program or tag you want to enable and click Enable. The entry for that item disappears showing it is now enabled.

Running Programs ManuallyAs well as scheduling programs to run at a defined time, you can run programs on an ad hoc basis when required by calling the TmSched_SELECT_PRG_LIST() Cicode function using a button inserted on a graphics page.

To run Time Scheduler programs manually:

1 Insert a button on the graphics page from which you want to be able to exe‐cute programs manually.

2 Double‐click the button to display the Button Properties window.

3 On the General: Appearance page, enter identifying text for the button.

4 On the Input: Touch page enter TmSched_SELECT_PRG_LIST() in the Up Command text box.

5 Save and recompile your project.

During runtime, click the button on your graphics page, select the program you want to run manually from the Program Select window, and then click OK.

For details on Time Scheduler Cicode functions, see Time Scheduler Cicode Functions.

Viewing Tag StatisticsYou can view statistics for a programmed tag within your current project. Viewing tag statistics can help you determine if the tags in the programs you’ve defined are being activated appropriately.

You can view statistics in two ways:

By selecting the tag in the Time Scheduler (see below).

By using the Cicode function TmSched_search_tag(String stag, int readonly). For details about using Time Scheduler Cicode functions, see Time Scheduler Cicode Functions.

To view tag statistics using Time Scheduler:

1 Choose Statistics | Search Tag. The Selection Tag PLC window appears.

Page 30: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

26

2 From the Tag list box, select the tag you want to view statistics for. You can view statistics for only one tag at a time. If necessary, use a filter to narrow the focus of your search. For details on selecting tags, see Selecting Tags.

3 Click OK. The Search Tag window appears displaying statistics for the selected tag.

Tabs for the defined days appear at the top of the graphical display window listed left to right. Clicking a day tab displays the associated (numeric) statistics for the tag on that day. Use the Backwards and Forwards buttons on the upper right of the window to scroll backwards or forwards through the day tabs. 

The graphical display window displays the statistics for the selected tag on the selected day. The tag value scale, on the left‐hand side of the graphical display window, displays the value for the graphical results; this scale recalibrates dynamically to show appropriate values for the tag when a different day is clicked. The scale at the bottom of the display window represents the hours of the day (0 to 24).

If the tag is not found for the selected day, the message Tagname: Tag not found! appears above the display window.

The grid under the display window shows the following information:

Time: The time at which the tag is assigned the value for the program on that row.

Program: The program associated with the selected tag.

Value: The value of the tag in the selected program at the time for that row.

Page 31: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

27

Creating and Printing Day Detail ReportsYou can view a report that shows the programs assigned to a day, and then print the report if you need it as hard copy for your own reference or for management. A report displays details for only one day.

To create and print a day detail report:

1 In the Time Scheduler window select the day you want to print a report for, and then double‐click the Time or Program column header. The Program window appears.

2 Click the Printer button at the bottom of the Program window. The report for that day appears on screen showing the currently assigned programs. You can resize the report window as you like.

3 To print the report to hard copy, click the Print button (see below).

Day reports show the day for which the report was produced, assigned program(s), and execution time.

The report window toolbar contains the following commands:

Icon Command DescriptionExit Exits the report window.

Zoom Out Zooms out of the report to reveal more of the report.

Zoom In Zooms in on the report to reveal more detail.

Page Width Enlarges the report to full screen width.

Back/Forward Moves one page backwards/forwards for multipage reports.

Page 32: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

28

Viewing Daily Log FilesThe Citect Time Scheduler creates a daily log file that records all actions (manual or scheduled) performed in the Time Scheduler, creating an audit trail. For example, the log file records the day and time of the following:

Program execution (that is, when a value is assigned to a tag and the tag name).

Creation, modification, or deletion of special days or programs, including program resets.

Time Scheduler Cicode operations.

The log file is called <date>_TmSchedLog.txt (where <date> represents the day on which the log file was created). The log file is located in the\Program Files\Citect\CitectSCADA\Data folder.

To view a Citect Time Scheduler log file:

Using Windows Explorer navigate to the Data folder and double‐click the <date>_TmSchedLog.txt log file you want to view. The log file opens showing that day’s log of the changes made within the Citect Time Scheduler.

Print Options Displays the Windows Print dialog box for selecting print options.

Print Prints the report as hard copy.

Icon Command Description

Page 33: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

29

A typical log file might look like this:

Time Scheduler Cicode FunctionsThe Time Scheduler has several Cicode functions that allow you to control the Time Scheduler programmatically during runtime. These functions are described in the table below.

Function DescriptionTmSched_configurator(int readonly) Displays a window containing the Time Scheduler window.TmSched_search_tag(String stag, int readonly)

Displays statistical data about the programmed tag.

TmSched_Start_update() Starts the Time Scheduler and polls the scheduled events.TmSched_GetStatus() Determines whether the Time Scheduler is running on this machine

and returns a 1 if so; otherwise returns 0.TmSched_SELECT_PRG_LIST Displays a list of the defined programs to allow a program to be

selected and run manually.

Page 34: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

30

For details about attaching Cicode functions to a button on a graphics page, see Running Programs Manually.

Page 35: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

IndexAassigning

schedules to Time Scheduler programs, 20

CCalendar window, 14calendar, defining, 12Citect Time Scheduler, 1

configuration files, 1installation, 2introduction, 1running on IDC, 9system architecture, 1

Citect Time Scheduler setupInternet Display Client, 9network distributed system, 5standalone system, 3

Citect TimeSchedulerintroduction, 1

color, Time Scheduler calendar, 13configuring

Time Scheduler project, 12custom days, 13

DDate/Time window, 24day detail reports, Time Scheduler, 27Daylight Savings (Time Scheduler), 20defining calendar, 12defining Time Scheduler programs, 15disabling Time Scheduler programs/tags, 23

EEnable/Disable window, 23enabling Time Scheduler programs/tags, 23expression‐based Time Scheduler program, 16, 17

FFilter text box, 19filters, using in TimeScheduler, 19

Iinstallation

Time Scheduler, 2

Mmanually executing Time Scheduler programs, 25

Nnormal days, 13

PProgram Configuration window, 15Program Select button, 22Program Select window, 18, 22Program window, 22ProgramList Time Scheduler program, 16, 17programs, Time Scheduler, 15

Rreports, Time Scheduler, 27running Time Scheduler programs manually, 25

Sschedules (Time Scheduler), 20Search Tag window, 26selecting

tags, 18Selection Tag PLC window, 18special days, 13starting Time Scheduler, 11

Ttag statistics, viewing in Time Scheduler, 25tag/value Time Scheduler program, 16tags

selecting in Time Scheduler, 18Time Scheduler, 1

configuration files, 1installation, 2introduction, 1running on IDC, 9system architecture, 1

Time Scheduler Cicode functions, 29

Page 36: Time Scheduler Help - Citect · PDF fileTime Scheduler Help Citect Pty. Limited ... Getting Started ... Path parameter in the Citect.ini file. The Start button will allow

32 Index

Time Scheduler log files, viewing, 28Time Scheduler setup

Internet Display Client, 9network distributed system, 5standalone system, 3

TmSched_configurator() Cicode function, 11, 29TmSched_GetStatus() Cicode function, 29TmSched_search_tag Cicode function, 25, 29TmSched_SELECT_PRG_LIST() Cicode function, 25,

29TmSched_Start_update() Cicode function, 29

Vviewing

tag statistics in Time Scheduler, 25Time Scheduler log files, 28