Supervise: Command line interface

Purpose

You can use a command line interface parameters to generate and print graphs from the Supervise program. This is typically done by using the Job Scheduler program, but can also be done from a command prompt.

Procedure

Click here images\CHICLET.gif to learn how to use the command line interface either with the Job Scheduler program or the Windows command prompt.

Syntax conventions

The following symbols are used:

Symbol

Description

<parameter>

Placeholder for a variable parameter.

[parameter]

Optional parameter.

Syntax

The following parameters and syntax are used:

Def -r -g <graph name> [-ds] [-ts] [-de] [-te] –f <filename>

If you want to print graphs automatically without user intervention, you must enable the option in the dialog box for the particular graph in the Definition

 

Name & function

Parameter

Description

Activate command line interface

Def –r

* Used only when executing in a command prompt.

Activates the Supervise command line interface.

Open graph

-g <graph name>

Opens the specified graph.

Start date

-ds

Specify a date or a date offset. Specify the date as yyyy/mm/dd.

A space must separate the parameter and the date or date offset.
 

Note: You can also use the $ symbol to specify an offset from the current date. For example if you type $-2 the start date is set to two days before the current date.

Start time

-ts

Specify the start time as hh:mm:ss.

A space must separate the parameter and the time.
 

Note: The time is specified in UTC time.

End date

-de

You can specify a date or a date offset. Specify the date as yyyy/mm/dd.

A space must separate the parameter and the date or date offset.
 

Note: You can also use the $ symbol to specify an offset from the current date. For example if you type $-2, the end date is set to two days before the current date.

End time

-te

Specify the time as hh:mm:ss.

A space must separate the parameter and the time.
 

Note: The time is specified in UTC time.

Save graph as picture

-f <filename>

Saves the graph as a jpeg file with the specified filename. The –f <filename> parameter is dependant on the above parameters.

 

Job Scheduler example

This example prints the graph Temperature. The start date is set to 2 days before the current date and the end date is set to 1 day before.

Program path:

[IGSS InstallPath]\gss\Def.exe

Parameters:

-r -g Temperature -ds $(date-2) -ts 12:00:00
-de $(date-1) -te 12:00:00

Working folder:

Not used.

Run Style:

Make sure that Normal is selected here otherwise automatic graph printing will not function.

If you are using Job Scheduler, you may want to use the $(date) parameter to specify a date offset. If Job Scheduler for some reason has postponed say three daily graph printouts, this ensures that you get a graph for each day. Using the simple $ parameter will set the time to now and thus result in three identical graphs. For example, to specify an offset of one day, type $(date-1).

Command prompt examples

In the example below, we want to print the Temperature graph covering the previous day.
The $-1 parameter sets the time to midnight by default.

Def -r -g Temperature -ds $-1 -de $

In the second example, we set the start and end time to precisely 7 a.m.

Def -r -g Temperature -ds $-1 -ts 07:00:00 -de $ -te 07:00:00