citect time scheduler help

36
Version 7.10 Time Scheduler Help November 2008

Upload: others

Post on 31-Oct-2021

20 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Citect Time Scheduler Help

Version 7.10

Time Scheduler Help

November 2008

Page 2: Citect Time Scheduler Help

DISCLAIMERCitect Pty. Ltd. makes no representations or warranties with respect to this manual and, to the maximum extent permitted by law, expressly limits itsliability for breach of any warranty that may be implied to the replacement of this manual with another. Further, Citect Pty. L td reserves the right torevise this publication at any time without incurring an obligation to notify any person of the revision.

COPYRIGHT© Copyright 2008 Citect Pty. Ltd. All rights reserved.

TRADEMARKSCitect Pty. Ltd has made every effort to supply trademark information about company names, products and services mentioned in this manual.

Citect, CitectHMI, and CitectSCADA are registered trademarks of Citect Pty. Ltd.

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

MS-DOS, Windows, Windows NT, Microsoft, and Excel are either registered trademarks or trademarks of Microsoft Corporation in the United Statesand/or other countries.

DigiBoard, PC/Xi and Com/Xi are trademarks of Digi International Inc..

Novell, Netware and Netware Lite are are either registered trademarks or trademarks of Novell, Inc. in the United States and other countries..

dBASE is a trademark of dataBased Intelligence, Inc.

All other brands and products referenced in this document are acknowledged to be the trademarks or registered trademarks of their respective holders.

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

November 2008 edition for CitectSCADA Version 7.10

Manual Revision Version 7.10.

Contact Citect today at www.citect.comOCEANIA +61 2 9496 7300, NORTH AMERICA +1770 521 7511, LATIN AMERICA +1770 521 7511, AFRICA +27 11 699 6600,EUROPE +31 71 576 1550, MIDDLE EAST +31 71 576 1550, GREATER CHINA +86 21 6886 3799, NORTH ASIA +65 6866 3712, SOUTH EAST ASIA +65 6866 3712, INDIA +65 6866 3712.

Page 3: Citect Time Scheduler Help

Contents

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

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

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

Setting up a standalone installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Setting up a network-distributed system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Chapter 2 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: Citect Time Scheduler Help

Contentsiv

Page 5: Citect Time Scheduler Help

Chapter I: Citect Time Scheduler

IntroductionThe Citect Time Scheduler is a calendar‐based programming tool that allows you to manipulate tag values within a Citect 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, the 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 Citect runtime, and commands can also be executed manually by an operator. 

See Also “System Architecture”“Installation”“Setting up a standalone installation”“Setting up a network‐distributed system”

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

It can function as a standalone application, or it can be 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 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 CitectSCADA project. 

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

Page 6: Citect Time Scheduler Help

2

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

are stored in the directory: 

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

These are the files that the update utility will adjust whenever a change is made on a client installation. 

See Also “Installation”“Setting up a standalone installation”“Setting up a network‐distributed system”

InstallationThe Time Scheduler can be installed from the CitectSCADA or Citect Facilities Utilities CD. It must be installed on the alarms server, and every computer where you plan to run the Time Scheduler as a client. 

During the installation process, you will have to indicate the directory where you would like Time Scheduler to be installed. The default directory is:

C:\Program Files\Citect\CitectTime Scheduler

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

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.

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 installation”“Setting 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. 

Page 7: Citect Time Scheduler Help

3

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: Citect Time Scheduler Help

4

4 From the Interface tab, select the language you would like used 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: Citect Time Scheduler Help

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 will need to 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.

It is easiest to address this process as three separate steps:

Setting up the primary alarms server

Setting up the standby alarms serer

Setting up clients

Page 10: Citect Time Scheduler Help

6

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. 

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. 

Page 11: Citect Time Scheduler Help

7

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 Citect Example project would be:C:\Program Files\Citect\CitectSCADA\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.

Note: The “TmSched” directory will not exist until you launch the Time Scheduler and select a Citect 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. 

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\CitectSCADA\User

Page 12: Citect Time Scheduler Help

8

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\CitectSCADA\User\Example\TmSched

Note: The “TmSched” directory will not exist until you launch the Time Scheduler and select a Citect 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 two to six 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\CitectSCADA\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\CitectSCADA\User\Example\TmSched

Remember that the “TmSched” directory will not exist until you launch the Time Scheduler and select a Citect 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\CitectSCADA\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 two to six as defined above for the primary alarms server. 

Page 13: Citect Time Scheduler Help

9

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\CitectSCADA\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\CitectSCADA\User\Example\TmSched

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

See Also “Using the Time Scheduler”

Page 14: Citect Time Scheduler Help

10

Page 15: Citect Time Scheduler Help

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.

Page 16: Citect Time Scheduler Help

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.

Note: 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.

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: Citect Time Scheduler Help

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: Citect Time Scheduler Help

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: Citect Time Scheduler Help

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: Citect Time Scheduler Help

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 entirely 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: Citect Time Scheduler Help

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: Citect Time Scheduler Help

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: Citect Time Scheduler Help

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: Citect Time Scheduler Help

20

5 Click OK. You exit the window.

See Also “Creating a Tag/Value Program”“Creating 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 hould 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: Citect Time Scheduler Help

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: Citect Time Scheduler Help

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: Citect Time Scheduler Help

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 reguarly 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.

To disable programs or tags:

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

Page 28: Citect Time Scheduler Help

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: Citect Time Scheduler Help

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”.

Page 30: Citect Time Scheduler Help

26

To view tag statistics using Time Scheduler:

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

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.

Page 31: Citect Time Scheduler Help

27

Program: The program associated with the selected tag.

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

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.

Page 32: Citect Time Scheduler Help

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.

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.

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

Print Prints the report as hard copy.

Icon Command Description

Page 33: Citect Time Scheduler Help

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: Citect Time Scheduler Help

30

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

Page 35: Citect Time Scheduler Help

IndexAassigning

schedules to Time Scheduler programs, 20

Ccalendar, defining, 12color, Time Scheduler calendar, 13configuring

Time Scheduler project, 12custom days in Time Scheduler, 13

DDate/Time window (Tine Scheduler), 24day detail reports, Time Scheduler, 27Daylight Savings (Time Scheduler), 20defining

Time Scheduler calendar, 12Time Scheduler programs, 15

disabling Time Scheduler programs/tags, 23

EEnable/Disable window (Time Scheduler), 23expression‐based Time Scheduler programs, 16, 17

FFilter text box (Time Scheduler), 19filters, in TimeScheduler, 19

Llog files, Time Scheduler, 28

Mmanually executing Time Scheduler programs, 25

Nnormal days, 13

PProgram Configuration window  (Time  Scheduler),15Program Select button (Time Scheduler), 22Program Select window (Time Scheduler), 18, 22Program window (Time Scheduler), 22ProgramList Time Scheduler program, 17ProgramList Time Scheduler program (Time Sched‐uler), 16programs, Time Scheduler, 15

Rreports, Time Scheduler, 27running

Time Scheduler programs manually, 25

Sschedules (Time Scheduler), 20Search Tag window (Time Scheduler), 26selecting tags, 18Selection Tag PLC window, 18special days in Time Scheduler, 13starting Time Scheduler, 11

Ttag statistics, Time Scheduler

Time Schedulertag statistics, 25

tag/value Time Scheduler program, 16tags

selecting in Time Scheduler, 18Time Scheduler

assigning schedules in, 20Calendar window, 14Cicode functions, 29configuring projects in, 12creating programs, 15custom days, 13Date/Time window, 24day detail reports, 27Daylight Savings in, 20defining calendar in, 12Enable/Disable window, 23enabling or disabling programs, 23

Page 36: Citect Time Scheduler Help

32 Index

Filter text box, 19filters, 19log files, viewing, 28normal days, 13Program Configuration window, 15Program Select button, 22Program Select window, 18, 22Program window, 22reports, 27Search Tag window, 26

TmSched_configurator() Cicode function, 11, 29

TmSched_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