I/O Blocks > Discrete Output (DO) function block

Discrete Output function block execution

The Discrete Output function block determines its setpoint, sets the output, and, optionally, checks a feedback signal from the hardware to confirm the physical output operation.

Setting the output

The block first must determine its setpoint. Normally, the block is used in Cas mode and the cascade input value (CAS_IN_D) becomes the setpoint (SP_D). In Automatic (Auto) or Manual (Man) mode, the block disconnects CAS_IN_D and allows a manual entry to change the value of SP_D.

Note

CAS_IN_D should always be a discrete value with status. When CAS_IN_D is an analog value, block behavior is unpredictable.

You can select setpoint tracking by configuring the SP_PV Track in Man I/O option (IO_OPTS).

SP-PV track in man

This option is enabled (True) as a default. SP_D becomes a copy of PV_D when the block's target mode is Man. A manually entered SP_D value is overwritten on the block's next execution cycle. This can prevent a state change when transitioning from Man to Auto mode. You can disable this option in Man or OOS mode only.

You can select setpoint inversion by configuring the Invert I/O option:
  • Invert

When this option is enabled (True), OUT_D becomes an inverted copy of SP_D. When this option is not enabled (False), OUT_D is a straight copy of SP_D.

When you configure the Discrete Output function block, you select the I/O channel associated with a discrete output by configuring the Device Signal Tag (DST) of the IO_OUT parameter. You select the Device Tag and the parameter the DO block accesses on that channel.

If you select Discrete Output Channel for the channel type, the only selectable channel parameter is:
  • OUT_D — The current discrete value with status driven to the card.

If you select Momentary Output Channel for the channel type, the only selectable channel parameter is:
  • OUT_D — Writing a True (1) value to this parameter causes the channel to output a pulse of a fixed duration. You configure the pulse duration during I/O configuration.

You configure a failure action and value for the output during I/O configuration.

Simulation

When SIMULATE_D is not enabled, and the mode is not Out of Service (OOS), the value of OUT_D is sent to the hardware. When SIMULATE_D is enabled, the status of OUT_D is forced to Good regardless of the condition of the hardware.

Getting feedback from the hardware

You can configure the IO_READBACK parameter to determine the pair of field wires that are used for confirming the hardware output of this block. To select the DST, you enter the Device Tag of the desired discrete input, or you can browse for it among all of the available Device Tags. There is only one possible parameter of the Device Tag that can be used (FIELD_VAL_D), so it is entered automatically.

When IO_READBACK is not configured, a copy of OUT_D is used in its place (with a delay of one execution time). This signal goes through the SIMULATE_D switch to become READBACK_D. You can enter a value and status for READBACK_D in SIMULATE_D when it is enabled. The readback value is processed through the Invert I/O option to become PV_D, which normally matches SP_D in Auto or Cas mode.

Usually, BKCAL_OUT_D has the value of SP_D and the status of the hardware. When SIMULATE_D is enabled, the status is forced to Good: Cascade. You can configure the Use PV for BKCAL_OUT I/O option:
  • Use PV for BKCAL_OUT

Note

You can set I/O options in Manual or Out of Service mode only.

Block errors

The following conditions are reported in the BLOCK_ERR parameter:
  • Simulate active — SIMULATE_D is enabled; therefore, PV_D is not real.

  • Input failure/process variable has Bad status — The source of the block's process variable is bad. For the DO block, this might indicate a hardware failure, a non-existent Device Signal Tag (DST), or a Bad status on the SIMULATE_D parameter.

  • Output failure — The output hardware or the DST is bad.

  • Readback failed — The hardware or DST providing readback is bad.

  • Out of Service — The block is not being processed.