Module algorithm types > State-driven algorithms

Algorithm parameters

State-driven modules contain the following module-level parameters.

A_ABT_ON_NEW_CMD — determines how the module responds to a change in A_COMMAND while executing the previous value of A_COMMAND. If TRUE then the module immediately aborts the current command and begins the new one. The default value is FALSE which means that the algorithm finishes the current command before executing the new one.

A_CMD_CHANGED Indicates a different A_COMMAND has been issued or that A_RESTART has been set before the current A_COMMAND completed.

A_COMMAND — used to select which state should run. This is a named set parameter type. It accepts command names as defined in the named associated with the state-driven module.

A_CUR_SEQ_NO Shows the sequence number that is currently being executed. The value of this parameter is -1 when no sequence is being executed.

A_ERROR — indicates errors related to the active state. This parameter is set to True if an ERROR or RERROR occurs in the underlying SFC, or if the state timed out. (that is, A_MAX_TIME_EXPD has been set).

A_MAX_TIME_EXPD — indicates that the maximum amount of time that the active state should take to complete has been exceeded . This is based on the CFM_MAX_TIME parameter described below. If this condition occurs, the A_STATE is set to Idle and A_ERROR is set to TRUE.

A_MIN_TIME_EXPD — indicates that the minimum amount of time that the active state should take to complete has been reached. This is based on the CFM_MIN_TIME parameter described below.

A_PV — indicates the current PV of the module. A value other than Undefined (or whatever the 255 word is in the named set) indicates that the state was achieved without error. (A_ERROR=False)

A_RESTART — If set TRUE aborts the command which is currently executing and reruns the command from the start.

A_RESTART_SEQ — If set TRUE then redrives the outputs defined for the current sequence.

A_STATE — indicates the runtime status of the algorithm. The states are derived from the $phase_state named set (for example: Idle, Running, and so on.).

A_TARGET — an internal parameter that indicates the value of the currently executing state (a copy of A_COMMAND)

A_TIME — indicates the amount of time in seconds that a particular state has been running active.

The following table shows the progression of the algorithm parameter values at various points of state operation.

Algorithm parameter

Initial state

State change started

State changing

State change complete

State change complete with errors

State disabled

State change timed out

A_ABT_ON_NEW_CMD

<configured>

<user_value>

<user_value>

<user_value>

<user_value>

<user_value>

<user_value>

A_CMD_CHANGED

False

False

See Note 1

<unchanged>

<unchanged>

<unchanged>

<unchanged>

A_COMMAND

255

State Name

State Name

255

255

255

255

A_CUR_SEQ_NO

-1

0

<0..n>

<n>

<0..n>

-1

<0..n>

A_ERROR

False

False

False

False

True

False

True

A_MAX_TIME_EXPD

False

False

False

False

False

False

True

A_MIN_TIME_EXPD

False

False

False/True

True

False/True

False

True

A_PV

255

255

255

State Name

255

Last State Name

255

A_RESTART

False

False

<user_value>

<user_value>

<user_value>

<user_value>

<user_value>

A_RESTART_SEQ

False

False

<user_value>/False

False/<user_value>

<user_value>

<user_value>

<user_value>

A_STATE

Idle

Running

Running

Complete

Idle

Idle

Idle

A_TARGET

255

State Name

State Name

State Name

State Name

State Name

State Name

A_TIME

0

0

<time>

<complete_time>

<error_time>

0

<timeout_time>

Note 1: Set to True if A_COMMAND is changed or A_RESTART is set.

Note these additional state changes: