Model 1054-Disposition Model
Disposition Model 1054 Description
Disposition models are used to update the event status of events and are triggered:
-
When the value of a defined historian tag(s) (TriggerTag) changes.
-
When the value of a defined variable(s) (Trigger Var Id) changes.
-
When an event is created or the event status is changed.
The functionality in this model is available only if you have purchased the Production Management Module.
Movement Model 1054 Properties
The following model properties are set up using the Plant Applications Administrator:
Property |
Description |
Maximum Run Time (Seconds) |
optional: Type the number of seconds you want the model to run. The default is 0 (zero), which means the model will not time out. Typically, you will want to limit the run time of the model only if troubleshooting the model (for example, one of the stored procedures is in an infinite loop). |
Model Processing Group |
Used for multithreading. See the Multithreading topic for more information. |
TriggerTag(s) |
The tag or tags used to trigger the model. A value change on any of the defined tags will trigger the model and the stored procedure is called. In the Plant Applications Administrator, a value from this tag is passed into the stored procedure based on the chosen sampling type. |
Trigger Var Id(s) |
The variables or variables used to trigger the model. A value change on any of the defined variables will trigger the model and the stored procedure is called and the variable value is passed into the stored procedure. |
Local SP Name |
Stored procedure called when the model is triggered. |
Model 1054 Stored Procedure Parameters
The following parameters are required at the beginning of the stored procedure that is called by Model 1054. The parameter variables can be named whatever is desired but the order must be maintained.
Variable Name |
Parameter Description |
@ReturnStatus int OUTPUT, |
Flag to indicate Success or Failure (1-Success,0-Failure) |
@ReturnMessage varchar(255) OUTPUT, |
Error Message to Write to Log File |
@EC_ID int, |
Input to the Stored Procedure indicating the EC_Id of the model from the Event_Configuration table. |
@JumpToTime Datetime OUTPUT, |
This is used to allow you to control how far back the EventManager goes in time to look for tag changes after a reload or restart of the Event Manager. By default the Event Manager goes back 3 days and looks for tags changes. In your code you could find the latest event on your unit and set the JumpToTime to be a second after this and then have it start looking from there for new events. |
@ReservedInput1 varchar(30), |
Reserved |
@ReservedInput2 varchar(30), |
Reserved |
@ReservedInput3 varchar(30), |
Reserved |
@ReservedInput4 varchar(30), |
Reserved |
@TriggerTag varchar(10), |
The Alias of the Tag which Triggered the SP |
@TriggerTag_OldValue varchar(25), |
The Previous Value of the Triggering Tag |
@TriggerTag_OldTime Datetime, |
The Previous Time of the Triggering Tag |
@TriggerTag_NewValue varchar(25), |
The New Value of the Triggering Tag |
@TriggerTag_NewTime Datetime, |
The New Time of the Triggering Tag |
@Hist1Alias varchar(30), |
The Alias Letter For Tag or Variable 1 |
@Hist1Value varchar(30), |
The Value For Tag or Variable 1 |
@Hist2Alias varchar(30), |
The Alias Name For Tag or Variable 2 |
@Hist2Value varchar(30) |
The Value For Tag or Variable 2 |
……continued as needed |
|