Standards for Command Types

<< Click to Display Table of Contents >>

 

Standards for Command Types

Command types must be registered on Power Configuration's Commands tab. Some examples of Command types are: breaker's position, transformer's tap position, and switching protection's operation mode, among others.

As with the standardization of Statuses or Meanings of Discrete Measurements, each Command type can have one or more Command Actions. Some examples of action requests are Up one tap position, Open switch, and Enable recloser function. Command Types can be configured at run time in the object returned by the CommandTypes property of the Power Configuration object. The next figure shows the tab to configure Command standards.

Tab to configure Command standards

Tab to configure Command standards

The tab to configure Command standards is divided into four distinct areas. The first one, presented on the next figure, is used to create or edit the existent Command types in an application.

Area to configure Command types

Area to configure Command types

This area's toolbar contains the options Add Add, to create a new type of Command (it allows adding Discrete Commands as well as Step Commands), Remove Remove, to exclude a user-defined type of Command, and Sort Sort, which sorts the visualization of the list of types of Commands.

The second area, called Conversions, is where users type the different writing values that each Command Action can have. For example, the command to Open a Breaker may have to write the value "129" (TRIP-Pulse On), if executed via DNP3 protocol, or else write the value "0" (Single Command), if this action is executed via IEC 870-5-104 protocol. The next figure shows the area to create or edit Conversions.

Area to create or edit Command Conversions

Area to create or edit Command Conversions

Actions related to Conversions

Action

Description

New

Adds a new Conversion to the selected type of Command on tab's upper area

Rename

Renames the selected Conversion on the list box. Only user-created Conversions can be renamed

Remove

Removes the selected Conversion on the list box. Only user-created Conversions can be removed

 

The third area, shown on the next figure, allows users to create new Command Actions, which determine features for a Command that are used on Command Units. This area also allows users to change values that can vary according to the selected Conversion.

Area to create or configure Command Actions

Area to create or configure Command Actions

This area's toolbar contains the options Add Add, to create a new Command Action, and Remove Remove, to remove a user-defined Command Action. Both tools are only accessible on user-defined Command types (without the prefix "*" in their names).

The fields available for edition in the third area are presented on the next table.

Fields for editing Command Actions

Field

Description

Automatic Select Before Operate

If True, whenever a Command object receives a call from the Operate method, the first script to execute is the one registered on the OnSelect event, and the second script is the one registered on the OnOperate event. This option corresponds to the AutoSelect property of the Conversion object

Feedback Timeout (ms)

Time, in milliseconds, that a Command's execution check routine waits to determine whether this Command was successful or not. This time must be sized according to the communication link's quality and transport's delay. This value is optional and should only be used if users need to handle Command's execution errors. To check its return value, use the OperateFeedbackTag, CancelFeedbackTag, or SelectFeedbackTag properties configured in the Command object. This option corresponds to the FeedbackTimeout property of the Conversion object

Maximum retries

Indicates the number of Command's retry executions (apart from the first try). A retry occurs while the limit established in this property is not reached and the Command Action was not successfully finished, canceled, or aborted. This option corresponds to the MaxRetries property of the Conversion object

Interval between retries (ms)

Indicates the time, in milliseconds, between Command's retry executions. If this value is equal to 0 (zero), a retry is performed as fast as possible. This option corresponds to the RetryPeriod property of the Conversion object

Name

Command Action's name. This value can only be changed for user-created Actions. This name is used in the Command Unit object to create a link for Command configurations. This option corresponds to the Name property of the Semantic object

Description

Command Action's description. This text can be used on buttons to display the action it performs. For example, "Open", "Close", "Enable", "Disable", etc. This option corresponds to the Caption property of the Semantic object

Operate Value

Value that must be written to Command's OperateWriteTag property when the Operate method is called. This option corresponds to the OperateValue property of the Conversion Values object

Operate Feedback

Value that the OperateFeedbackTag property configured in a Command object must display after executing the Operate method. This value is optional and should only be used if users need to handle execution errors in Commands. This option corresponds to the OperateFeedbackValue property of the Conversion Values object

Select Value

Value that must be written to Command's SelectWriteTag property when the Select method is called. This property should only be configured when a Command is a Select- or Operate-type. This option corresponds to the SelectValue property of the Conversion Values object

Select Feedback

Value that the SelectFeedbackTag property configured in a Command object must display after executing the Operate method. This value is optional and should only be used if users need to handle execution errors in Commands. This option corresponds to the SelectFeedbackValue property of the Conversion Values object

Cancel Value

Value that must be written to Command's CancelWriteTag property when the Cancel method is called. This property should only be configured when a Command is a Select- or Operate-type. This option corresponds to the CancelValue property of the Conversion Values object

Cancel Feedback

Value that the CancelFeedbackTag property configured in a Command object must display after executing the Cancel method. This value is optional and should only be used if users need to handle execution errors in Commands. This option corresponds to the CancelFeedbackValue property of the Conversion Values object

 

The fourth and last area, shown on the next figure, allows users to define scripts performed when the Operate, Select, and Cancel methods are called in Command objects.

Area to define Command scripts

Area to define Command scripts

A description of the tools available in the area to create Command scripts are on the next table.

Toolbar for Command scripts

Command

Description

Add Add

Adds a script to the selected event on the list box

Remove Remove

Removes a script from the selected event on the list box

AppBrowser AppBrowser

Opens AppBrowser

Search Search

Searches for words in a script

Find Previous Find Previous

Finds the previous occurrence of a word

Find Next Find Next

Finds the next occurrence of a word

Replace Replace

Replaces occurrences of a word

Compile Script Compile Script

Verifies scripts of the current event

Compile Conversion Scripts Compile Conversion Scripts

Verifies all scripts of the current Conversion

Compile Command Scripts Compile Command Scripts

Verifies all scripts of the current Command

 

The list box allows users to select an event to edit. The next table contains a description of all events available for edition.

Available events on Commands

Event

Description

OnOperate

Defines what is executed when the Operate method, available on Command's instance, is called. The most basic task performed on this event is writing the value OperateValue (configured on Command Actions area) to the OperateWriteTag property (configured on the Command object)

OnSelect

Defines what is executed when the Select method, available on Command's instance, is called. The most basic task performed on this event is writing the value SelectValue (configured on Command Actions area) to the SelectWriteTag property (configured on the Command object)

OnCancel

Defines what is executed when the Cancel method, available on Command's instance, is called. The most basic task performed on this event is writing the value CancelValue (configured on Command Actions area) to the CancelWriteTag property (configured on the Command object)

OnOperateFinished

Event triggered when the OperateFeedbackTag property (configured on the Command object) contains the same value of the Operate Feedback field (configured on Command Actions area). This event also occurs in the following situations: end of feedback's time-out, request for canceling a Command, or a failure when executing the Operate method. This event can be used to generate logs and messages about operation statuses

OnSelectFinished

Event triggered when the SelectFeedbackTag property (configured on the Command object) contains the same value of the Select Feedback field (configured on Command Actions area). This event also occurs in the following situations: end of feedback's time-out, request for canceling a Command, or a failure when executing the Select method. This event can be used to generate logs and messages about operation statuses

OnCancelFinished

Event triggered when the CancelFeedbackTag property (configured on the Command object) contains the same value of the Cancel Feedback field (configured on Command Actions area). This event also occurs in the following situations: end of feedback's time-out or when a failure is detected when executing the Cancel method. This event can be used to generate logs and messages about operation statuses

 

Every event contains a set of parameters that allows a script to access values configured on the creation or configuration area of Command Actions, as well as values passed by calling methods at run time. These parameters are described on the next table.

Available parameters in scripts of Command's methods and events

Parameter

Description

ActorID

Provides the name of the user requesting the Command to the script. This value must be passed as a parameter when calling Command's Operate, Select, and Cancel methods

WriteValue

This parameter provides the values configured on the edition area of Command Actions to the OnOperate, OnSelect, and OnCancel events:

On the OnOperate event, this parameter contains the value of the Operate Value field

On the OnSelect event, this parameter contains the value of the Select Value field

On the OnCancel event, this parameter contains the value of the Cancel Value field

FeedbackValue

This parameter provides the values configured on the edition area of Command Actions to the OnOperate, OnSelect, and OnCancel events:

On the OnOperate event, this parameter contains the value of the Operate Feedback field

On the OnSelect event, this parameter contains the value of the Select Feedback field

On the OnCancel event, this parameter contains the value of the Cancel Feedback field

Failed

A Boolean used to indicate a failure detection on event scripts. This parameter can be configured on the OnOperate, OnSelect, and OnCancel events, and can be handled on the OnOperateFinished, OnSelectFinished, and OnCancelFinished scripts

Canceled

A Boolean available on the OnOperateFinished and OnSelectFinished events to indicate that the end of a Command was provoked by a call to the Cancel method

FeedbackError

A Boolean available on the OnOperateFinished, OnSelectFinished, and OnCancelFinished events to indicate that the end of a Command was provoked by a time-out (FeedbackError equal to True)

ScriptError

A Boolean available on the OnOperateFinished, OnSelectFinished, and OnCancelFinished events to indicate that a script error occurred

 

To access values from a Command's instance on event scripts, use the expression Application.GetObject, informing which property to access. Example:

Set Tag = Application.GetObject (OperateWriteTag)

Was this page useful?