Enhanced Device Control (EDC) function block

Enhanced Device Control function block execution

The block supports up to six states that serve as the block setpoints. The block's setpoint requests the device being controlled to go to one of the supported states: State 0, State 1, State 2, State 3, State 4 and State 5. States 2 to 5 are optional and can be enabled with the State Mask dialog. Configure the number of states the controlled device requires.

Determining the cascade setpoint

The block uses the cascade setpoint (CAS_IN_D) to calculate its setpoint SP_D when the mode is Cascade. The cascade setpoint is typically coming from another block or from another module, but it can also be forced by the block itself depending on the device options selected. The options are evaluated in the following order:
  1. CAS SP Track

    If the CAS SP Track device option is selected, the actual mode is Auto or Local Override, and CAS_IN_D is different than SP_D, then CAS_IN_D copies the value of SP_D.

    Note

    Selecting the CAS SP Track device option allows a bumpless setpoint transfer when switching from AUTO to CAS.

  2. Force Setpoint in CAS
    If:
    • the Force Setpoint in CAS device option is selected, and
    • the actual mode is Cascade, and
    • FORCE_SP_D transitions from False to True, and
    • there is no shutdown or interlock active, and
    • the permissive conditions are satisfied (SHUTDOWN_D is False, INTERLOCK _D is True, and PERMISSIVE_D is True),

    then CAS_IN_D is a copy of FORCE_SP_VAL, even if CAS_IN_D is wired externally (CAS_IN_D behaves like SP_D when SP_D is wired externally).

    When the value of FORCE_SP_VAL is 255, the state number corresponding to the PASSIVE_STATE is used by the EDC block.

  3. SP Track on Trip

    When the SP Track on Trip device option is selected and the block has tripped, the cascade setpoint CAS_IN_D is set to the Passive state (SP_D is also set to the Passive state).

  4. SP Track to Passive on Active Confirm Timeout

    If the SP Track to Passive on Active Confirm Timeout device option is selected, and the Passive on Active Timeout device option is True, and the block has failed (confirm state doesn't come on time), then the cascade setpoint CAS_IN_D is set to the Passive state (SP_D is also set to the Passive state).

Note

The options CAS SP Track, Force Setpoint in CAS, and SP Track on Trip can change the value of CAS_IN_D. It is recommended to not wire CAS_IN_D when one or more of these options is selected, but to write to CAS_IN_D with pulse logic.

Determining the command setpoint (requested state)

The block calculates its setpoint (SP_D) based on the following conditions evaluated by the block in the following order:
  1. When the mode is Cascade (CAS), the setpoint is copied from CAS_IN_D.
  2. Force Setpoint in Auto
    If:
    • the actual mode is Automatic (Auto), and
    • the Force Setpoint in Auto conditions are satisfied (the device option Force Setpoint in Auto is True, FORCE_SP_D transitions from False to True, there is no shutdown or interlock active, and the permissive conditions are satisfied),

    then setpoint SP_D copies the value of FORCE_SP_VAL.

    When the value of FORCE_SP_VAL is 255, the state number corresponding to the PASSIVE_STATE is used by the EDC block.

  3. SP Track on Trip

    If the SP Track on Trip device option is True and the block has tripped, the setpoint SP_D is set to the Passive state (CAS_IN_D is also set to the Passive state).

  4. SP Track to Passive on Active Confirm Timeout

    This device option works with the Passive on Active Timeout device option.

    If
    • the SP Track to Passive on Active Confirm Timeout device option is True,

    • and the Passive on Active Timeout device option is True,

    • and the block has failed (confirm state doesn't come on time),

    then the setpoint SP_D is set to the Passive state (CAS_IN_D is also set to the Passive state).

  5. SP Track on Shutdown/Interlock

    EDC block SP Track on Shutdown/Interlock device option works in the same way as DC block SP Track for use with shutdown and interlock. When the SP Track on Shutdown/Interlock device option is True and the actual mode is LO due to an interlock or shutdown condition, the setpoint is copied from the output (OUT_D).

  6. TRK_IN_D and SP Track on Tracking

    If the tracking parameter (TRK_IN_D) is True, the actual mode changes to Local Override (LO) and the output (OUT_D) is copied from the field confirm value (FV_D) when it is in a valid state (not Undefined). If the SP Track on Tracking device option is True in this case, the setpoint is copied from the output (OUT_D).

Determining if a transition is required

The setpoint is used next by the logic that determines the Enhanced Device Controller PV state (PV_STATE) to see if a transition to another state is required. Unlike the DC block, a state setpoint (Passive or Active) does not necessarily cause the output to go to the desired state.

  • Permissive

    Select the Permissive device option to require a permissive before the state changes to an active state. When the Permissive device option is True, the PERMISSIVE_D input must be True for an Active state setpoint to change the PV_STATE to that Active state. PERMISSIVE_D does not have to be True before SP_D can be changed to an Active state.

    However, when there is an interlock to an active state active , the output is changed according to the interlock, even if PERMISSIVE_D is False.

  • Permissive to Any State

    Select the Permissive to Any State device option to require a permissive before the state changes to any other state.

    When the Permissive to Any State device option is True, the PERMISSIVE_D input must be True for any state setpoint to change the PV_STATE to that state. When the block is in an active state, even a setpoint to a passive state does not change the PV_STATE if PERMISSIVE_D is False, unless there is a shutdown, a trip, or an interlock condition to the passive state active.

Note

If the device options Permissive and Permissive to Any State are both selected, the permissive logic works according to the device option Permissive to Any State.

Note

Shutdown and Trip and Interlock have priority over Permissive and Permissive to Any State when the output requested by the shutdown or trip or interlock logic is not permitted.

Note

Writes of SP_D to Passive are rejected when there is no permit if the device option SP Track on Shutdown/Interlock is selected.

CAUTION!

When using the Permissive to Any State option, the permissive must be satisfied to allow a change of SP_D to the passive state to drive OUT_D to the passive state. Although shutdown and interlock conditions have priority over permissive conditions, the operator cannot change the device to the passive state unless the permissive is satisfied.

Determining the physical device state (feedback state)

The state of the physical device must be reported back to the Enhanced Device Control block so that it can be compared to the setpoint. This feedback state is reported in the FV_D parameter. The use of binary discrete inputs to determine FV_D is described in the Assigning I/O section.

The FV_D and PV_D parameters can be one of the seven following states.

Table: FV_D and PV_D states
Value State

255

Undefined

0

State 0

1

State 1

2

State 2

3

State 3

4

State 4

5

State 5

The state can be Undefined when the device is moving between steady states. Specify the maximum amount of time that the state can be Undefined before declaring the move a failure by configuring the following parameters:
  • CFM_STATE0_TIME is the maximum time allowed to transition to the State 0.
  • CFM_STATE1_TIME is the maximum time allowed to transition to the State 1.
  • CFM_STATE2_TIME is the maximum time allowed to transition to the State 2.
  • CFM_STATE3_TIME is the maximum time allowed to transition to the State 3.
  • CFM_STATE4_TIME is the maximum time allowed to transition to the State 4.
  • CFM_STATE5_TIME is the maximum time allowed to transition to the State 5.

Timing takes place in the TRAVEL_TIMER as in the DC block.

Additionally, the block has several ways of handling the loss of a confirmed feedback:

  • Configuring trip time when the Trip option is NOT selected

    It is sometimes acceptable for the device to lose a confirm feedback for a short period of time without generating a failure. This can happen for vibrating devices. Specify the maximum amount of time for the confirm state to be lost before declaring the loss of feedback signal a failure by configuring the TRIP_TIME parameter.

    When the Trip device option is not selected, if the confirm signal is lost for longer than TRIP_TIME (whether active or passive), the device fails (FAILURE_STATE = State n confirm lost ) and OUT_D does not change.

  • Enabling trip time for Passive state when the Trip option is selected

    When the Trip device option is selected, if an active confirm signal is lost for more than TRIP_TIME, the device trips (OPERATION_STATE = Tripped, FAILURE_STATE = State n confirm lost, and OUT_D is set to the Passive State.

    In a confirmed passive state, a loss of confirmation longer than TRIP_TIME results in FAILURE_STATE = State n confirm lost and OUT_D does not change (same as if the Trip option was not selected).

    Note

    This is different than the Device Control block as TRIP_TIME doesn't function while in Passive state.

    Note

    If the Trip option has been selected the block drives the outputs (to passive) following a loss of active confirmation. But whether or not the Trip option is selected, there is no driving of outputs following a loss of passive confirmation, just a failure.

  • Ignore PV

    The block determines PV_STATE from the PV_D value. PV_D is normally a copy of FV_D. However, sometimes the hardware that confirms the device state fails. In this case, the operator can confirm the state of the field device visually. When the field device is in the correct state, the operator can turn on the ignore PV switch (IGNORE_PV = True).

    The ignore PV switch is generally used when the hardware fails and the value of FV_D is not relevant until the device is repaired.

    When IGNORE_PV is True, the value of process variable (PV_D) is forced to accept the requested output state (OUT_D) as confirmed without using (ignoring) an actual feedback as soon as PV_D is different than OUT_D, independently of SP_D. Select IGNORE_PV in the Block Alarms dialog (right click on block and select Assign Alarms) to generate an alarm and event in the log.

    Note

    IGNORE_PV is a latched signal.

Determining the Enhanced Device Control block states

This applies to PV_STATE, OPERATION_STATE, and FAILURE_STATE.

A device takes a finite amount of time to transition to a newly commanded state. The Enhanced Device Control function block supports and tracks these transitions with the PV_STATE, OPERATION_STATE, and FAILURE_STATE parameters.

PV_STATE represents the current state of the device, which includes:
  • Six steady states
  • Six transient states corresponding to the transitions between steady states
Table: Enhanced Device Control Function Block PV_STATE parameter values ($edc_pv_states)
Type of State PV_STATE Index Meaning

Steady States

0

Confirmed State 0

1

Confirmed State 1

2

Confirmed State 2

3

Confirmed State 3

4

Confirmed State 4

5

Confirmed State 5

Transient States

6

Going to State 0

7

Expecting State 1

8

Expecting State 2

9

Expecting State 3

10

Expecting State 4

11

Expecting State 5

Note

You can create your own named set if you desire.

Only those named sets that match the criteria for use as a setpoint or process variable of a DC block are listed and can be selected. The criteria that must be met by a named set in order for it to appear in the DC block configuration dialog for SP_D and PV_D are
  • Named set values 0, 1, 2, and 255 must be defined.

  • No other values can be defined.

Table: Enhanced Device Control Function Block OPERATION_STATE parameter values ($edc_operation_states)
OPERATION _STATE Index Meaning

0

Normal

1

Interlocked

2

Tripped

3

Shutdown

4

Locked

5

Tracking

Note

The operational states priority from high to low is: Tracking, Shutdown, Interlocked, Tripped, Locked, and Normal.

FAILURE_STATE includes Clear and the failure states corresponding to loss of confirm for a steady state or to failure to complete a transition to that state within the time allowed.

Table: Enhanced Device Control Function Block FAILURE_STATE parameter values $edc_failure_states)
FAILURE_STATE Index Meaning Cause

0

Clear

1

State 0 crack time exceeded

Set when OUT_D is set to State 0 and PV_D does not change state before CRACK_TIMER times out.

2

State 1 crack time exceeded

Set when OUT_D is set to State 1 and PV_D does not change state before CRACK_TIMER times out.

3

State 2 crack time exceeded

Set when OUT_D is set to State 2 and PV_D does not change state before CRACK_TIMER times out.

4

State 3 crack time exceeded

Set when OUT_D is set to State 3 and PV_D does not change state before CRACK_TIMER times out.

5

State 4 crack time exceeded

Set when OUT_D is set to State 4 and PV_D does not change state before CRACK_TIMER times out.

6

State 5 crack time exceeded

Set when OUT_D is set to State 5 and PV_D does not change state before CRACK_TIMER times out.

7

State 0 travel time exceeded

Set when OUT_D is set to State 0 and PV_D does not change to State 0 before Travel Timer times out.

8

State 1 travel time exceeded

Set when OUT_D is set to State 1 and PV_D does not change to State 1 before Travel Timer times out.

9

State 2 travel time exceeded

Set when OUT_D is set to State 2 and PV_D does not change to State 2 before Travel Timer times out.

10

State 3 travel time exceeded

Set when OUT_D is set to State 3 and PV_D does not change to State 3 before Travel Timer times out.

11

State 4 travel time exceeded

Set when OUT_D is set to State 4 and PV_D does not change to State 4 before Travel Timer times out.

12

State 5 travel time exceeded

Set when OUT_D is set to State 5 and PV_D does not change to State 5 before Travel Timer times out.

13

State 0 confirm lost

Set when OUT_D and PV_D are in State 0 and PV_D changes to another state for duration longer than TRIP_TIME.

14

State 1 confirm lost

Set when OUT_D and PV_D are in State 1 and PV_D changes to another state for duration longer than TRIP _TIME.

15

State 2confirm lost

Set when OUT_D and PV_D are in State 2 and PV_D changes to another state for duration longer than TRIP _TIME.

16

State 3 confirm lost

Set when OUT_D and PV_D are in State 3 and PV_D changes to another state for duration longer than TRIP _TIME.

17

State 4confirm lost

Set when OUT_D and PV_D are in State 4 and PV_D changes to another state for duration longer than TRIP _TIME.

18

State 5 confirm lost

Set when OUT_D and PV_D are in State 5 and PV_D changes to another state for duration longer than TRIP _TIME.

Note

You can create your own named set if you desire.

Tip

This is different than the Device Control block as Tripped and Shutdown/Interlock are operational states in the EDC block, not failure states.

Additionally, the EDC block can be interlocked to states other than passive and has features for operation and failure states:
  • INTERLOCK_STATE

    INTERLOCK_STATE is a Named Set where the Named States correspond to the six states of the EDC block.

    Table: Interlock states ($interlock_states)
    Value State

    255

    Passive State

    0

    State 0

    1

    State 1

    2

    State 2

    3

    State 3

    4

    State 4

    5

    State 5

    The default value of INTERLOCK_STATE is 255 (Named State = Passive State). When INTERLOCK_STATE is at default, the block uses the state number defined by the PASSIVE_STATE parameter as the state to interlock the block.

  • Interlock
    When SHUTDOWN_D is False and the Interlock device option is True, the INTERLOCK_D input must be True for OPERATION_STATE to remain in the Normal OPERATION_STATE. When INTERLOCK_D transitions to False:
    • The actual mode changes to LO, and
    • OPERATION_STATE changes to Interlocked, and
    • OUT_D is set to the state defined by INTERLOCK_STATE.
    Note

    When INTERLOCK_D is False and SHUTDOWN_D is False, OUT_D is continuously set to the state defined by INTERLOCK_STATE.

    When INTERLOCK_D becomes True again (and when there is no shutdown), and device option Reset Required is False, the OPERATION_STATE becomes Normal, PV_STATE might return to its former state if the SP Track on Shutdown/Interlock device option is False. There is no delay on the return.

    When SHUTDOWN_D becomes True or a trip occurs (Trip device option is selected, and FAILURE_STATE = State n confirm lost, where n is the active state), the same thing happens as described above for loss of the interlock input (INTERLOCK_D transitions to False), except that OPERATION_STATE is changed to Shutdown or Tripped and OUT_D is set to the Passive State and not to the state defined by INTERLOCK_STATE.

    The OPERATION_STATE Shutdown always has priority over Interlocked and Trip. Interlocked has higher priority than Trip.

  • SP Track to Passive on Active Confirm Timeout

    The block SP Track to Passive on Active Confirm Timeout device option works with the Passive on Active Timeout device option as described in the previous sections.

  • Lock Recovery
    The block clears the Locked operation state and goes to Passive state when RESET_D is True. In addition the block has the Lock Recovery device option and associated logic that can clear the Locked state under the following conditions:
    • Lock Recovery device option is True, and
    • Permissive conditions allow the new setpoint, and
    • The target mode is CAS and there is a new write to CAS_IN_D.
    Note

    When the Reset Required device option is selected, the operator must be able to access RESET_D (from a display, for example) to leave the Locked operation state when the block target mode is Auto (whatever the value of SP_D).

    Now, when:
    • the target mode is CAS, and
    • the device option Reset Required is selected, and
    • the OPERATION_STATE is Locked,

    when other logic is sending a new cascade setpoint to the block or the Force Setpoint in CAS logic is sending a new cascade setpoint to this EDC block such that it must leave the Locked state. If the Lock Recover device option is selected the new cascade setpoint is accepted and the operation state changes from Locked to Normal if the permissive conditions are allow it, otherwise, the operation state does not change.

Determining the Sentinel Flag

The SENTINEL parameter, when True, indicates that the block failed or that the block cannot respond to what was asked. This parameter can be monitored by batch/equipment module to detect when the module cannot respond.

The SENTINEL parameter is set True when at least one of these conditions is True:
  • The FAIL_ACTIVE parameter is set True when the value of FAILURE_STATE is not Clear. This indicates to the operator that there is a device failure due to input signal confirmation or that a state transition failure has occurred.
  • The ILK_SHUTD_ACTIVE parameter is set True when the value of OPERATION_STATE is Shutdown or Interlocked and OUT_D changes from the previous scan. This indicates to the operator that there is an interlock or shutdown condition that changes the command OUT_D.
  • WRITE_ERR_ACTIVE parameter is set True when Write Alarm is present.

Configure an off-delay timer to delay the transition from True to False by specifying the time period (S_TIME_DURATION). During this time period, S_ELAPSED_TIMER tracks the time elapsed from when the conditions above all become False until the time specified by S_TIME_DURATION expires.

The Sentinel parameter on the EDC block is set True momentarily if either ILK_SHUTD_ACTIVE or WRITE_ERR_ACTIVE becomes True, and then goes False after the S_TIME_DURATION duration is met (even if the ILK_SHUTD_ACTIVE is still active). Sentinel stays True if FAIL_ACTIVE stays True.

The Write Alarm is True when the function block cannot respond to a new setpoint (CAS_IN_D or SP_D):
  • CAS_IN_D is wired externally and there is a force setpoint in cascade active while the mode is CAS and the forced value is different from CAS_IN_D.
  • CAS_IN_D is wired externally and there is an SP tracking active (CAS SP Track, SP Track on Trip, SP Track to Passive on Active Confirm Timeout) that is trying to change CAS_IN_D.
  • CAS_IN_D is wired externally and its value is different from SP_D while the mode is AUTO.
  • SP_D is wired externally and there is a force setpoint in auto active while the mode is AUTO and the forced value is different from SP_D.
  • SP_D is wired externally and there is an SP tracking active (SP Track on Trip, SP Track to Passive on Active Confirm Timeout) that wants to change SP_D.
  • Mode is Local Override and a new setpoint (CAS_IN_D or SP_D) is entered or the force setpoint logic attempts to drive the block to a state incompatible with its current state. When there is a new setpoint that is different than the current setpoint which cannot change the OUT_D output, WRITE_ERR_ACTIVE is set.

Determining the output state

The state number in OUT_D is the same as that of PV_STATE for the steady and transient states. For example, when the setpoint causes PV_STATE to change to State 1, PV_STATE becomes Expecting State 1, and OUT_D becomes State 1. When PV_STATE changes to Confirmed State 1, OUT_D stays at State 1.

When:
  • SHUTDOWN_D is False, and
  • the Interlock device option is not set or
  • INTERLOCK_D is True, and
  • the Trip device option is selected and
  • the active confirm signal is lost for more than TRIP_TIME,

the block OPERATION_STATE goes to the Tripped state (and FAILURE_STATE = State n confirm lost, where n is the active state), and OUT_D is set to passive.

When SHUTDOWN_D is True, the operation state Shutdown sets OUT_D to Passive. When INTERLOCK_D is False and the Interlock device option is selected, and there is no Shutdown, the operation state Interlocked set OUT_D to the state defined by INTERLOCK_STATE.

Assigning I/O

Note

An italic n (n) following a parameter name indicates there are multiple instances of the parameter. For example IO_IN_n represents IO_IN_1, IO_IN_2, and so on. The number of parameters available is stated in the parameter table for the block.

The Enhanced Device Control function block allows as many as four feedback signals and four output signals associated with the discrete field device. The EDC block works in the same way as DC block for assigning I/O, with enhanced and additional new features:
  • STATE_MASKS

    The STATE_MASKS parameter defines the output and input combinations of IO_OUT_n and IO_IN_n for each of the six different states that can be contained in the parameters SP_D, OUT_D, FV_D and PV_D.

    If all STATE_MASKS Inputs of the SP_D or OUT_D from Shutdown/Interlock/Trip are marked as not used (a grayed out check box) while other states have inputs that are used, the state is confirmed and the inputs determine the PV_D from the other state patterns does not cause the EDC block to fail because the PV_D does not match the SP_D. For example, a Motorized Operated Valve where STOP, OPEN and CLOSE are the setpoints but in STOP, the Inputs are not used for that state (when SP_D is STOP, PV_STATE is set to Confirmed STOP) but if the inputs match OPEN, the PV_D is set to OPEN and no failure is generated.

    Note

    EDC block STATE_MASKS work differently than DC block STATE_MASKS for a state with all its inputs marked not used. If the operator attempts to STOP a motor-operated valve, PV_D is evaluated based on the input mask defined for other states. (In the same situation a DC block goes to STOP and the operator does not know if the valve is OPEN, CLOSED, or undefined.)

    Note

    When the number of states is decreased while the block is online and one of the parameters FV_D, INTERLOCK_STATE, PASSIVE_STATE, PV_D, or SP_D has a state value greater than the new lower number of states value, the write of the number of states is rejected until you change those parameter values below the new number of states.

  • Sustained or Pulsed IO_OUT_n

    The requested state (stored in OUT_D) is decoded to the individual IO_OUT_n channel outputs according to the corresponding output state mask. The outputs IO_OUT_n can be either sustained or pulsed, depending on the associated value of IO_OUT_DURATIONn.

    When IO_OUT_DURATIONn is non zero, the associated IO_OUT_n is pulsed and the duration of the pulse is defined by this parameter. Otherwise, IO_OUT_n is sustained.

    For example IO_OUT_DURATION1 = 10,
    • When IO_OUT_1 goes from 0 to 1, there is one and only one pulse generated for a duration of 10 sec as per your example. After the 10 sec, IO_OUT_1 remains 0 until the next change. If the output goes back to 0 before the 10 sec, IO_OUT_1 goes back to 0 immediately.
    • When IO_OUT_1 is 0, there is no pulse, the output remains 0.

    When IO_OUT_DURATION1 = 0, there is no pulse at all, the IO_OUT_1 is the output.

  • DISABLE_IO_OUT

    When DISABLE_IO_OUT is False, the EDC block works in the same way as DC block: the IO_OUT_n discrete output channel values are determined from the output mask that corresponds to the current state stored in OUT_D.

    When DISABLE_IO_OUT is True, IO_OUT_n are forced to zero, independently of OUT_D.

    Note

    For a device with a local/remote switch, set DISABLE_IO_OUT to True and TRK_IN_D to True when the device is operated locally. The EDC block tracks the signals from the field, but does not energize the outputs.

Counting the number of active states

When COUNT_NOF_AS is set to True, the block calculates the number of times OUT_D has transitioned from the Passive state to an active state since the active states counter was last reset and stores the value in parameter ACT_STATE_COUNT.

When COUNT_NOF_AS parameter is set to False, the number of active states calculation stops and holds the current value.

The reset active counter parameter RESET_ACT_SP is a one-shot that resets the active states counter to zero and clears itself once the active states counter reset has completed.

Calculating active time and current active time

When COUNT_AS_TIMER is set to True and PV_D is in an active state, the block calculates active time and provides the current active time CUR_ACT_TIME and total active time ACT_TIME.

CUR_ACT_TIME indicates the time in seconds that this block has been in an Active state since the last transition of PV_D from the Passive state to an active state or from the last reset, whichever occurred last. ACT_TIME indicates the time in seconds that this block has been in an Active state since the timer was last reset. Set RESET_ACT_TIME to True to reset CUR_ACT_TIME and ACT_TIME. On every transition from the Passive to an Active state, CUR_ACT_TIME is reset to zero.

When COUNT_AS_TIMER is set to False or PV_D is not active, active time calculation stops and holds the value of CUR_ACT_TIME and ACT_TIME.

Calculating commanded output state

CMD_D is a copy of OUT_D when OUT_D is not in the passive state and is equal to OUT_D + 10 when OUT_D is in the passive state.

If the EDC block CMD_D is connected to the DCC block CMD_IN_D parameter, the DCC block detects when there is an interlock becoming active that drives the EDC block to a different state.