Time Tables

Overview and Key Concepts

Time Tables are used to schedule down-time, such as state changes, for specific objects in the model. Each Time Table may control many objects, and each object may be controlled by many Time Tables. A model may contain any number of Time Tables.

Time Tables are accessed from the Toolbox.

Down Periods

The main purpose of the Time Table object is to define scheduled periods of down-time for objects in the model. These down periods are defined by two numbers: a down time and a duration. The down period begins at the specified down time and will last for the specified duration in model time units. The functions on the Functions tab give you control over what happens to the objects listed in the Members tab at the beginning and end of each down period.

For convenience in working with down periods that wrap around the end of a day or week the Time Table will combine touching down periods that either set the same state and state profile or use the same down behavior. For example, in a weekly schedule, a down period that goes from Monday 10 PM to 12 AM will combine with a down period that goes from Tuesday 12 AM to 2 AM if the state / down behavior is the same.

Functions

When the Time Table hits a down time, two sets of functions are called. First, the Down Function is fired. This happens once for each member of the Time Table. This allows you to stop the associated object, send a TaskExecuter to some specified location, etc. After all of the Down Functions have fired, the On Down function will fire once. The On Down function passes in the list of members and the table row associated with the down time.

At the end of the down period's duration the set of resume functions are called. First, the Resume Function is fired. This happens once for each member of the Time Table. This allows you to resume the associated object, resume input on the object, etc. After all of the Resume Functions have fired, the On Resume function will fire once. The On Resume function passes in the list of members and the table row associated with the down time.

Down State and State Profiles

For each down time you can specify the state and state profile that the members will go to during that down period. These values are designed to be used with the stopobject() and resumeobject() commands found by default in the Down and Resume Functions. An object can be tied to multiple Time Tables and be stopped multiple times. Each object stores it's set of states each time it is stopped so the object can then be resumed and move back through the subsequent set of states.

State Profiles

When sending objects to a down state using state profiles, all members of the Time Table should have the associated state profile.

Down Behaviors

Down periods can also optionally be associated with a down behavior. If a down behavior is specified, the down and resume functions will be called on the down behavior instead of on the time table itself. This allows you to define different kinds of down events that can be shared between different time tables and also allows down periods within the same time table to behave differently from each other. See Down Behaviors for more information.

Modes

The Time Table can be set up in different modes allowing for non-repeating/repeating schedules or schedules based upon date and time. The Daily Repeat, Weekly Repeat, and Date Based modes all utilize the Model Start Time and Date as defined in Run Time Tools.

Graphical Time Tables

Not all modes can utilize the Graphical Time Table. If you want to use the Graphical Time Table to build your Time Table, but you don't want to tie into the Model Start Time, you can set the Time Table's repeat time to Daily or Weekly, make your necessary changes, hit Apply, then set the Mode to Custom Repeat. This will auto fill the table with the correct values associated with the Daily or Weekly table.

General Settings

The following general settings are available:

Name

The name of the Time Table. The combobox has a list of all Time Tables in the model, allowing you to quickly jump to different Time Tables.

Enabled

Specifies whether the Time Table should execute it's down times for all of the members of the Time Table. The Experimenter allows you to enable and disable Time Tables for different scenarios.

Icon Description
Adds the Time Table to a User Library as either a Draggable Icon or an Auto-Install Component.

The Members Tab

The Members tab has the following properties:

Icon Description
This will open an object selection GUI where you can select multiple objects in the model.
Click to sample any object in the model to add it as a member.
Removes the selected member(s) from the list.
Reorders members Up or Down in the list.
Centers the 3D view on the selected member from the list.
Selects (puts a red box around) the selected member(s) from the list.

Member Order

The order members are listed in can affect the model's behavior. For example, an operator is working at a processor. Both are members of the Time Table and go down together. If the processor is listed first, it goes to the "down" state. Then when the operator goes down, it tells the processor to go to the "waiting for operator" state, so the processor spends the down time not in its "down" state, but in the "waiting for operator" state. Reverse the order of the operator and processor and both objects spend the down time in the "down" state.

The Functions Tab

The Functions tab has the following properties:

Down Function

This picklist is executed when the objects in the member list go down. It is executed once for each object in the member list. This is where you specify what to do to stop the object.

Resume Function

This picklist is executed when the objects in the member list resume their operation. It is executed once for each object in the member list. This is where you specify what to do to resume the object.

On Down

This picklist is fired immediately after the Down Function has been fired for all objects, but it is only executed once, instead of once for each object in the member list.

On Resume

This picklist is fired immediately after the Resume Function has been fired for all objects, but it is only executed once, instead of once for each object in the member list.

The Table Tab

The Table Tab has the following properties:

General Controls

Table Editor

The Table Editor has the following properties:

Graphical Table

The Graphical Table has the following properties:

Using the Graphical Table:

Events

Down Function

This event is fired once for each member when the table hits a down time.

It has the following parameters:

Event Parameter Type Explanation
Down Object Object The object going down
State int The state the object will go into
Table Row int The row corresponding to this down time in the table
Duration double The duration of the down time
State Profile int The state profile on the object that will be updated

Resume Function

This event is fired once for each member when the table ends a down time.

It has the following parameters:

Event Parameter Type Explanation
Down Object Object The object that was down and is now resuming
State int The state the object was in
Table Row int The row corresponding to this down time in the table
State Profile int The state profile on the object that will be updated

On Down

This event is fired once after the Down Function has fired for all members.

It has the following parameters:

Event Parameter Type Explanation
Table Row int The row corresponding to this down time in the table

On Resume

This event is fired once after the Resume Function has fired for all members.

It has the following parameters:

Event Parameter Type Explanation
Table Row int The row corresponding to this down time in the table