TIMER_RUN

Syntax

Example

Description/Remarks

TIMER_RUN timer_number, hour, minute, interval, style, window_state, "session_type", "session_name", "ignore_changes"

See below for examples

Closes the current data entry session and waits for the timer to expire before launching the new data entry session that you specify.  You can allow users to view the timer countdown, pause and resume the timer, cancel or run immediately, and reset the timer.

The timer can be configured for one of two modes:

Timer mode - launches the new data entry session after a specified time interval (e.g., after 4 hours)

Clock mode - launches the new data entry session at the specified time of day (e.g., 08:30) and thereafter at a specified time interval (e.g., every 4 hours) after the new data entry session is launched

The command parameters are as follows:

timer_number: Any number (such as 0) can be specified for this parameter.

hour and minute

  • To configure this command for timer mode, set both parameters to -1.

  • To configure this command for clock mode, set these parameters to the time of day at which the new data entry session will be launched.  Use a 24-hour clock to designate times later than 12:59 P.M. Valid settings for hour are 0 - 23. Valid settings for minute are 0 - 59.

interval

  • In timer mode, this is the number of minutes after which the new data entry session will be launched.

  • In clock mode, after the new data entry session has been launched at the specified time of day, this is the number of minutes after which the new data entry session will be launched again.  If you do not want to continue launching the data entry session, set this parameter to 0.

style:  Determines which buttons are available on the timer window.  Valid options for this parameter include:

  • 2 - In timer mode, remove the Pause button from the timer window

  • 4 - In timer mode, remove the Reset button from the timer window

  • 8 - Remove the Run now button from the timer window

  • 16 - Remove the Cancel button from the timer window

To choose multiple options, add the numbers together.  For example, you could hide all of the buttons by using a style value of 30 (2+ 4+ 8+16).

window_state:  Determines how the timer will be displayed to the end user.  Valid options for this parameter are:

  • 0 - Normal timer window

  • 1 - Minimized timer window image\IMG00002.gif

    The end user can click the button to display the normal timer window.

  • 2 - Program status bar

    No timer buttons are available to the end user.

    Note:
     Attempting to open a new data entry session while the timer is displayed in the status bar could produce unexpected results.  If you need to enter more data while the timer is running, you should launch a new instance of the SPC Data Entry module.

session_type:  Specifies which type of data entry session will be launched.  Valid options for this parameter are:

  • T - Template

  • P - Planned session

  • S - Stored session

Note: When using a template to access external data from the SPC Charts and Reports module, a TIMER_RUN command with a Session type of "S" will be ignored.

session_name:  Specifies the name of the template, planned session or stored session that will be launched.  

If this item does not exist, or if the end user does not have access to this item, then the user will be prompted to select from the list of available items, based on the session_type you have specified.

ignore_changes:  Determines whether the operator will be prompted to save data if not all entered data has yet been saved.  Valid options for this parameter are:

  • Y - the operator will not be prompted to save data.

  • N - the operator will be prompted to save data.

 

This command returns 0.

Role settings are ignored when using this command.

See also: CHAIN_T, CHAIN_P, CHAIN_S

The normal timer window (window state 0)

image\IMG00001.gif

Examples

TIMER_RUN 0, 9, 30, 0, 0, 0, " T", "B. Basic Keybd, 1 Feature", " N"

Opens the template "B. Basic Keybd, 1 Feature" at 9:30 A.M. without prompting you to save changes if another session is open.  The timer will appear as a normal timer window with all the buttons shown.

TIMER_RUN 0, 9, 30, 120, 6, 0, " T", "B. Basic Keybd, 1 Feature", " Y"

Opens the template "B. Basic Keybd, 1 Feature" at 9:30 a.m. and prompts you to save changes if another session is open. The timer will appear as a normal timer window without the Pause and Reset buttons shown and the session will restart after two hours.

TIMER_RUN 0, 13, 45, 0, 0, 2, " T", "B. Basic Keybd, 1 Feature", " Y"

Opens the template "B. Basic Keybd, 1 Feature" at 1:45 p.m. and prompts you to save changes if another session is open. The timer will appear in the status bar.

TIMER_RUN 0, -1, -1, 45, 0, 2, " T", "B. Basic Keybd, 1 Feature", " Y"

Opens the template "B. Basic Keybd, 1 Feature" after 45 minutes elapses and prompts you to save changes if another session is open. The timer will appear in the status bar.