Process Discrete 2-, 3-, or 4-State Device (PD4SD)

This information applies to the CompactLogix 5380P and ControlLogix 5580P controllers.
The Process Discrete 2-, 3-, or 4-State Device (PD4SD) instruction controls and monitors feedback from a discrete 2-state, 3-state, or 4-state device in a variety of modes, monitoring for fault conditions. These devices include multiple-speed motors or multiple-position valves.
The PD4SD instruction:
  • Provides configuration for two, three, or four selectable states for the device.
  • Provides Operator, Program, and External commands to select one of the two, three, or four states of the device.
  • Controls four discrete outputs, with configurable states of each output in the various device states. Each output can be set, cleared, or left in last state in a given device state.
  • Monitors four discrete feedback inputs, with configurable states (including
    must be on
    ,
    must be off
    , and
    don't care
    ) for each input in the various device states for monitoring the actual position of the device.
  • Provides configurable text labels for each of the states.
  • When feedback inputs are used, detects failure to reach the target state, after a configurable time, and alarms the failure. Optionally sheds to the default state (state 0) on a feedback failure.
  • Monitors Permissive conditions that allow commanding the device to each state.
  • Monitors Interlock conditions that return the device to its default state (state 0).
  • Provides simulation of a normal working device, while holding the outputs to the real device de-energized, for use in testing or operator training.
  • Monitors I/O communication status, providing an alarm on an I/O fault. Optionally, sheds to the default state on an I/O fault condition.
  • Provides an Available status when in Program command source and operating normally for use by automation logic to determine if the logic can manipulate the device.
  • Operates from Hand, Maintenance, Override, External, Program, and Operator command sources.
Available Languages
Ladder Diagram
PD4SDLadder
Function Block Diagram
PD4SD_FBD
Structured Text
PD4SD(PD4SDTag, BusObj)
Operands
IMPORTANT:
Unexpected operation may occur if:
  • Output tag operands are overwritten.
  • Members of a structure operand are overwritten.
  • Except when specified, structure operands are shared by multiple instructions.
There are data conversion rules for mixing numeric data types within an instruction. See Data conversions.
Configuration Operands
Operand
Type
Format
Description
PlantPAx Control
P_DISCRETE_4STATE
tag
Data structure required for proper operation of instruction.
BusObj
BUS_OBJ
tag
Bus component.
P_DISCRETE_4STATE Structure
Public members are standard, visible tag members that are programmatically accessible. Private, hidden members are used in HMI faceplates and are not programmatically accessible. Private members are listed in separate tables after public members.
Public Input Members
Data Type
FBD Default Visibility
FBD Wiring required
Usage
Description
EnableIn
BOOL
Not Visible
Not Required
Input
Enable Input - System Defined Parameter
Default is true.
Inp_InitializeReq
BOOL
Not Visible
Not Required
Input
1 = Request to initialize the instruction. The instruction is normally initialized in instruction first run. Use this request when reinitialization is needed. The instruction clears this operand automatically.
Default is true.
Inp_OwnerCmd
DINT
Not Visible
Not Required
Input
Owner device command (bitmapped): All bits off = None, .10 = Operator Lock, .11 = Operator Unlock, .12 = Program Lock, .13 = Program Unlock, .14 = Acquire Maintenance, .15 = Release Maintenance, .16 = Acquire External, .17 = Release External, .29 = Echo.
Default is 0.
Inp_AFdbkData
BOOL
Visible
Not Required
Input
Feedback A from device.
Default is false.
Inp_BFdbkData
BOOL
Visible
Not Required
Input
Feedback B from device.
Default is false.
Inp_CFdbkData
BOOL
Visible
Not Required
Input
Feedback C from device.
Default is false.
Inp_DFdbkData
BOOL
Visible
Not Required
Input
Feedback D from device.
Default is false.
Inp_EqpFaultData
BOOL
Visible
Not Required
Input
Equipment fault from device: 1 = Faulted.
Default is false.
Inp_IOFault
BOOL
Visible
Not Required
Input
1 = I/O communication is faulted, 0 = I/O communication is OK.
Default is false.
Inp_St0PermOK
BOOL
Visible
Not Required
Input
1 = Permissives are OK, device can be commanded to State 0.
Default is true.
Inp_St0NBPermOK
BOOL
Visible
Not Required
Input
1 = Non-bypassable permissives are OK, device can be commanded to State 0.
Default is true.
Inp_St1PermOK
BOOL
Visible
Not Required
Input
1 = Permissives are OK, device can be commanded to State 1.
Default is true.
Inp_St1NBPermOK
BOOL
Visible
Not Required
Input
1 = Non-bypassable permissives are OK, device can be commanded to State 1.
Default is true.
Inp_St2PermOK
BOOL
Visible
Not Required
Input
1 = Permissives are OK, device can be commanded to State 2.
Default is true.
Inp_St2NBPermOK
BOOL
Visible
Not Required
Input
1 = Non-bypassable permissives are OK, device can be commanded to State 2.
Default is true.
Inp_St3PermOK
BOOL
Visible
Not Required
Input
1 = Permissives are OK, device can be commanded to State 3.
Default is true.
Inp_St3NBPermOK
BOOL
Visible
Not Required
Input
1 = Non-bypassable permissives are OK, device can be commanded to State 3.
Default is true.
Inp_IntlkOK
BOOL
Visible
Not Required
Input
1 = Interlocks are OK, device can be commanded, 0 = Interlocks are not OK, device is driven to State 0.
Default is true.
Inp_NBIntlkOK
BOOL
Visible
Not Required
Input
1 = Non-bypassable interlocks are OK, device can be commanded, 0 = Interlocks are not OK, device is driven to State 0.
Default is true.
Inp_IntlkAvailable
BOOL
Visible
Not Required
Input
1 = Interlock availability is OK, show Sts_IntlkAvailable if device is ready except for interlocks.
Default is false.
Inp_IntlkTripInh
BOOL
Visible
Not Required
Input
1 = Inhibit reporting of Sts_IntlkTrip and interlock trip alarm.
Default is false.
Inp_RdyReset
BOOL
Not Visible
Not Required
Input
1 = Related object, reset by this object, is ready to be reset.
Default is false.
Inp_Hand
BOOL
Not Visible
Not Required
Input
1 = Acquire Hand command source (typically hardwired local), 0 = Release Hand.
Default is false.
Inp_Ovrd
BOOL
Not Visible
Not Required
Input
1 = Acquire Override command source (higher priority program logic), 0 = Release Override.
Default is false.
Inp_OvrdCmd
SINT
Not Visible
Not Required
Input
Override device command: 0 = No command, 1 = State 0, 2 = State 1, 3 = State 2, 4 = State 3.
Default is 0.
Inp_ExtInh
BOOL
Not Visible
Not Required
Input
1 = Inhibit External command source acquisition, 0 = Allow External acquisition.
Default is false.
Inp_HornInh
BOOL
Not Visible
Not Required
Input
1 = Inhibit audible alert, 0 = Allow audible alert.
Default is false.
Inp_Reset
BOOL
Not Visible
Not Required
Input
1 = Reset shed latches and cleared alarms.
Default is false.
Cfg_AllowDisable
BOOL
Not Visible
Not Required
Input
1 = Allow Maintenance to disable alarms.
Default is true.
Cfg_AllowShelve
BOOL
Not Visible
Not Required
Input
1 = Allow Operator to shelve alarms.
Default is true.
Cfg_NumStates
SINT
Not Visible
Not Required
Input
Number of device states. Valid = 2 to 4.
Default is 2.
Cfg_bSt0OutWrite
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: If bit = 1, overwrite that output in State 0. If bit = 0, do not write that output in State 0.
Default is 2#0000_1111.
Cfg_bSt0OutState
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: When written, if bit = 1, write 1 to that output in State 0. If bit = 0, write 0 to that output in State 0.
Default is 2#0000_0001.
Cfg_bSt1OutWrite
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: If bit = 1, overwrite that output in State 1. If bit = 0, do not write that output in State 1.
Default is 2#0000_1111.
Cfg_bSt1OutState
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: When written, if bit = 1, write 1 to that output in State 1. If bit = 0, write 0 to that output in State 1.
Default is 2#0000_0010.
Cfg_bSt2OutWrite
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: If bit = 1, overwrite that output in State 2. If bit = 0, do not write that output in State 2.
Default is 2#0000_1111.
Cfg_bSt2OutState
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: When written, if bit = 1, write 1 to that output in State 2. If bit = 0, write 0 to that output in State 2.
Default is 2#0000_0100.
Cfg_bSt3OutWrite
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: If bit = 1, overwrite that output in State 3. If bit = 0, do not write that output in State 3.
Default is 2#0000_1111.
Cfg_bSt3OutState
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: When written, if bit = 1, write 1 to that output in State 3. If bit = 0, write 0 to that output in State 3.
Default is 2#0000_1000.
Cfg_bSt0FdbkCheck
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: If bit = 1, check that feedback bit to verify State 0. If bit = 0, don't check that feedback bit (don't care).
Default is 2#0000_0000.
Cfg_bSt0FdbkState
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: If checking, if bit = 1, that feedback input is 1 in State 0. If bit = 0, that feedback input is 0 in State 0.
Default is 2#0000_0001.
Cfg_bSt1FdbkCheck
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: If bit = 1, check that feedback bit to verify State 1. If bit = 0, don't check that feedback bit (don't care).
Default is 2#0000_0000.
Cfg_bSt1FdbkState
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: If checking, if bit = 1, that feedback input is 1 in State 1. If bit = 0, that feedback input is 0 in State 1.
Default is 2#0000_0010.
Cfg_bSt2FdbkCheck
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: If bit = 1, check that feedback bit to verify State 2. If bit = 0, don't check that feedback bit (don't care).
Default is 2#0000_0000.
Cfg_bSt2FdbkState
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: If checking, if bit = 1, that feedback input is 1 in State 2. If bit = 0, that feedback input is 0 in State 2.
Default is 2#0000_0100.
Cfg_bSt3FdbkCheck
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: If bit = 1, check that feedback bit to verify State 3. If bit = 0, don't check that feedback bit (don't care).
Default is 2#0000_0000.
Cfg_bSt3FdbkState
SINT
Not Visible
Not Required
Input
Bitmask, bits .0 - .3: If checking, if bit = 1, that feedback input is 1 in State 3. If bit = 0, that feedback input is 0 in State 3.
Default is 2#0000_1000.
Cfg_ePwrUpState
SINT
Not Visible
Not Required
Input
Powerup state: 0 = De-energized, 1 = Outputs for State 0, 2 = Outputs for State 1, 3 = Outputs for State 2, 4 = Outputs for State 3, 5 = Outputs for feedback state.
Default is 0.
Cfg_St0onShed
BOOL
Not Visible
Not Required
Input
1 = Go to State 0 on interlock or shed, 0 = Hold position on interlock or shed.
Default is false.
Cfg_HasSt0PermObj
BOOL
Not Visible
Not Required
Input
1 = Tells HMI an object is connected to Inp_St0Perm inputs, enable navigation.
Default is false.
Cfg_HasSt1PermObj
BOOL
Not Visible
Not Required
Input
1 = Tells HMI an object is connected to Inp_St1Perm inputs, enable navigation.
Default is false.
Cfg_HasSt2PermObj
BOOL
Not Visible
Not Required
Input
1 = Tells HMI an object is connected to Inp_St2Perm inputs, enable navigation.
Default is false.
Cfg_HasSt3PermObj
BOOL
Not Visible
Not Required
Input
1 = Tells HMI an object is connected to Inp_St3Perm inputs, enable navigation.
Default is false.
Cfg_HasIntlkObj
BOOL
Not Visible
Not Required
Input
1 = Tells HMI an object is connected to Inp_Intlk inputs, enable navigation.
Default is false.
Cfg_HasMoreObj
BOOL
Not Visible
Not Required
Input
1 = Tells HMI an object with more information is available, enable navigation.
Default is false.
Cfg_OperSt0Prio
BOOL
Not Visible
Not Required
Input
1 = OCmd_St0 is accepted any time, 0 = OCmd_St0 is accepted only when Operator command source is selected.
Default is false.
Cfg_ExtSt0Prio
BOOL
Not Visible
Not Required
Input
1 = XCmd_St0 is accepted any time, 0 = XCmd_St0 is accepted only when External command source is selected.
Default is false.
Cfg_OCmdResets
BOOL
Not Visible
Not Required
Input
1 = A new Operator state command resets fault, 0 = A reset command is required to clear fault.
Default is false.
Cfg_XCmdResets
BOOL
Not Visible
Not Required
Input
1 = A new External state command resets fault, 0 = A reset command is required to clear fault.
Default is false.
Cfg_OvrdPermIntlk
BOOL
Not Visible
Not Required
Input
1 = Override ignores bypassable permissives and interlocks, 0 = Override uses all permissives and interlocks.
Default is false.
Cfg_ShedOnFail
BOOL
Not Visible
Not Required
Input
1 = Go to State 0 and alarm on position fail, 0 = Alarm only.
Default is true.
Cfg_ShedOnIOFault
BOOL
Not Visible
Not Required
Input
1 = Go to State 0 and alarm on I/O fault, 0 = Alarm only.
Default is true.
Cfg_ShedOnEqpFault
BOOL
Not Visible
Not Required
Input
1 = Go to State 0 and alarm on equipment fault, 0 = Alarm only.
Default is true.
Cfg_HornOnChange
BOOL
Not Visible
Not Required
Input
1 = Sound horn on any state change, 0 = Sound horn only on leaving State 0.
Default is false.
Cfg_HasOper
BOOL
Not Visible
Not Required
Input
1 = Operator (unlocked) command source exists, can be selected.
Default is true.
Cfg_HasOperLocked
BOOL
Not Visible
Not Required
Input
1 = Operator Locked command source exists, can be selected.
Default is true.
Cfg_HasProg
BOOL
Not Visible
Not Required
Input
1 = Program (unlocked) command source exists, can be selected.
Default is true.
Cfg_HasProgLocked
BOOL
Not Visible
Not Required
Input
1 = Program Locked command source exists, can be selected.
Default is true.
Cfg_HasExt
BOOL
Not Visible
Not Required
Input
1 = External command source exists, can be selected.
Default is false.
Cfg_HasMaint
BOOL
Not Visible
Not Required
Input
1 = Maintenance command source exists, can be selected.
Default is true.
Cfg_HasMaintOoS
BOOL
Not Visible
Not Required
Input
1 = Maintenance Out of Service exists, can be selected.
Default is true.
Cfg_OvrdOverLock
BOOL
Not Visible
Not Required
Input
1 = Override supersedes Program/Operator Locked, 0 = Don't supersede Program/Operator Locked.
Default is true.
Cfg_ExtOverLock
BOOL
Not Visible
Not Required
Input
1 = External supersedes Program/Operator Locked, 0 = Don't supersede Program/Operator Locked.
Default is false.
Cfg_ProgPwrUp
BOOL
Not Visible
Not Required
Input
1 = Power up to Program command source, 0 = Power up to Operator command source.
Default is false.
Cfg_ProgNormal
BOOL
Not Visible
Not Required
Input
Normal command source: 1 = Program, 0 = Operator.
Default is false.
Cfg_PCmdPriority
BOOL
Not Visible
Not Required
Input
Command priority: 1 = Program commands win, 0 = Operator commands win.
Default is false.
Cfg_PCmdProgAsLevel
BOOL
Not Visible
Not Required
Input
1 = Program/Operator selection follows PCmd_Prog as level (1 for Program, 0 for Operator), 0 = PCmd_Prog is used as edge to select Program, PCmd_Oper selects Operator.
Default is false.
Cfg_PCmdLockAsLevel
BOOL
Not Visible
Not Required
Input
1 = Program lock selection follows PCmd_Lock as level (1 for locked, 0 for unlocked), 0 = PCmd_Lock is used as edge to select Program Locked, PCmd_Unlock selects Program (unlocked).
Default is false.
Cfg_ExtAcqAsLevel
BOOL
Not Visible
Not Required
Input
1 = External selection follows XCmd_Acq as level (1 to acquire External, 0 to release External), 0 = XCmd_Acq is used as edge to acquire External, XCmd_Rel is used to release External.
Default is false.
Cfg_OutAPulseTime
REAL
Not Visible
Not Required
Input
Time to pulse Out_AData (seconds). Valid = 0.0 to 2147483.0, 0.0 = Output held continuously.
Default is 0.0.
Cfg_OutBPulseTime
REAL
Not Visible
Not Required
Input
Time to pulse Out_BData (seconds). Valid = 0.0 to 2147483.0, 0.0 = Output held continuously.
Default is 0.0.
Cfg_OutCPulseTime
REAL
Not Visible
Not Required
Input
Time to pulse Out_CData (seconds). Valid = 0.0 to 2147483.0, 0.0 = Output held continuously.
Default is 0.0.
Cfg_OutDPulseTime
REAL
Not Visible
Not Required
Input
Time to pulse Out_DData (seconds). Valid = 0.0 to 2147483.0, 0.0 = Output held continuously.
Default is 0.0.
Cfg_StartHornTime
REAL
Not Visible
Not Required
Input
Time to sound audible on device state change (seconds). Valid = 0.0 to 1000.0, 0.0 = Disabled.
Default is 0.0.
Cfg_VirtualFdbkTime
REAL
Not Visible
Not Required
Input
Time to simulate reaching target state when virtualized (seconds). Valid = 0.0 to 2147483.0.
Default is 2.0.
Cfg_FailTime
REAL
Not Visible
Not Required
Input
Time to receive state feedback before declaring failure (seconds). Valid = 0.0 to 2147483.0.
Default is 10.0.
Cfg_CnfrmReqd
SINT
Not Visible
Not Required
Input
Operator command confirmation or e-signature type required: 0 = None, 1 = Command confirmation required, 2 = Performer e-signature required, 3 = Performer and approver e-signature required.
Default is 0.
PSet_Owner
DINT
Not Visible
Not Required
Input
Program ownership request: Non-zero Owner ID = Acquire, 0 = Release.
Default is 0.
PCmd_Virtual
BOOL
Not Visible
Not Required
Input
Program Command to select Virtual (simulated) device operation. The instruction clears this operand automatically.
Default is false.
PCmd_Physical
BOOL
Not Visible
Not Required
Input
Program Command to select Physical device operation (not simulated). The instruction clears this operand automatically.
Default is false.
PCmd_St0
BOOL
Not Visible
Not Required
Input
Program Command to set device to State 0. The instruction clears this operand automatically.
Default is false.
PCmd_St1
BOOL
Not Visible
Not Required
Input
Program Command to set device to State 1. The instruction clears this operand automatically.
Default is false.
PCmd_St2
BOOL
Not Visible
Not Required
Input
Program Command to set device to State 2. The instruction clears this operand automatically.
Default is false.
PCmd_St3
BOOL
Not Visible
Not Required
Input
Program Command to set device to State 3. The instruction clears this operand automatically.
Default is false.
PCmd_Reset
BOOL
Not Visible
Not Required
Input
Program Command to reset shed latches and returned-to-normal latched alarms. The instruction clears this operand automatically.
Default is false.
PCmd_Prog
BOOL
Not Visible
Not Required
Input
Program Command to select Program command source. The instruction clears this operand automatically if Cfg_PCmdProgAsLevel = 0.
Default is false.
PCmd_Oper
BOOL
Not Visible
Not Required
Input
Program Command to select Operator command source. The instruction clears this operand automatically.
Default is false.
PCmd_Lock
BOOL
Not Visible
Not Required
Input
Program Command to lock Program command source and disallow Operator. The instruction clears this operand automatically if Cfg_PCmdLockAsLevel = 0.
Default is false.
PCmd_Unlock
BOOL
Not Visible
Not Required
Input
Program Command to unlock Program command source and allow Operator to acquire. The instruction clears this operand automatically.
Default is false.
PCmd_Normal
BOOL
Not Visible
Not Required
Input
Program Command to select normal command source (Operator or Program). The instruction clears this operand automatically.
Default is false.
XCmd_St0
BOOL
Not Visible
Not Required
Input
External Command to set device to State 0. The instruction clears this operand automatically.
Default is false.
XCmd_St1
BOOL
Not Visible
Not Required
Input
External Command to set device to State 1. The instruction clears this operand automatically.
Default is false.
XCmd_St2
BOOL
Not Visible
Not Required
Input
External Command to set device to State 2. The instruction clears this operand automatically.
Default is false.
XCmd_St3
BOOL
Not Visible
Not Required
Input
External Command to set device to State 3. The instruction clears this operand automatically.
Default is false.
XCmd_Acq
BOOL
Not Visible
Not Required
Input
External Command to acquire command source. The instruction clears this operand automatically if Cfg_ExtAcqAsLevel = 0.
Default is false.
XCmd_Rel
BOOL
Not Visible
Not Required
Input
External Command to release command source, accepted if Cfg_ExtAcqAsLevel = 0. The instruction clears this operand automatically.
Default is false.
XCmd_Reset
BOOL
Not Visible
Not Required
Input
External Command to reset shed latches and returned-to-normal latched alarms. The instruction clears this operand automatically.
Default is false.
XCmd_ResetAckAll
BOOL
Not Visible
Not Required
Input
External Command to acknowledge all alarms and reset latched alarms and shed conditions. The instruction clears this operand automatically.
Default is false.
Public Output Members
Data Type
FBD Default Visibility
FBD Wiring required
Usage
Description
EnableOut
BOOL
Not Visible
Not Required
Output
Enable Output - System Defined Parameter
Out_AData
BOOL
Visible
Not Required
Output
Output A to device.
Out_BData
BOOL
Visible
Not Required
Output
Output B to device.
Out_CData
BOOL
Visible
Not Required
Output
Output C to device.
Out_DData
BOOL
Visible
Not Required
Output
Output D to device.
Out_HornData
BOOL
Not Visible
Not Required
Output
Output to sound horn prior to commanded state change.
Out_Reset
BOOL
Not Visible
Not Required
Output
1 = Reset command has been received and accepted.
Out_OwnerSts
DINT
Not Visible
Not Required
Output
Status of command source, owner command handshake and ready status (bitmapped): All bits off = None, .10 = Operator Lock, .11 = Operator Unlock, .12 = Program Lock, .13 = Program Unlock, .14 = Acquire Maintenance, .15 = Release Maintenance, .16 = Acquire External, .17 = Release External, .18 = Has Maintenance, .19 = External Override Lock, .20 = Has External, .21 = Has Operator, .22 = Has Operator Locked, .23 = Has Program, .24 = Has Program Locked, .29 = Echo, .30 = Not Ready.
Sts_Initialized
BOOL
Not Visible
Not Required
Output
1 = Instruction is initialized. 0 = Use Inp_InitializeReq to reinitialize.
Sts_St0
BOOL
Visible
Not Required
Output
1 = Device confirmed in State 0.
Sts_St1
BOOL
Visible
Not Required
Output
1 = Device confirmed in State 1.
Sts_St2
BOOL
Visible
Not Required
Output
1 = Device confirmed in State 2.
Sts_St3
BOOL
Visible
Not Required
Output
1 = Device confirmed in State 3.
Sts_Moving
BOOL
Visible
Not Required
Output
1 = Device not yet confirmed in commanded state.
Sts_Horn
BOOL
Not Visible
Not Required
Output
1 = Sounding horn prior to commanded state change.
Sts_Virtual
BOOL
Not Visible
Not Required
Output
1 = The instruction treats device as virtual, acting as if controlling a working device, but the outputs are kept de-energized, 0 = The instruction operates the physical device normally.
SrcQ_IO
SINT
Not Visible
Not Required
Output
Source and quality of primary input or output: 0=Good, live, confirmed good 1=Good, live, assumed good 2=Good, no feedback, assumed good 8=Test, virtualized 9=Test, loopback 10=Test, manually entered 16=Uncertain, live, off-spec 17=Uncertain, substituted at device or bus 18=Uncertain, substituted at instruction 19=Uncertain, using last known good 20=Uncertain, using replacement value 32=Bad, signal failure 33=Bad, channel fault 34=Bad, module or communication fault 35=Bad, invalid configuration
SrcQ
SINT
Not Visible
Not Required
Output
Source and quality of primary value or status: 0=Good, live, confirmed good 1=Good, live, assumed good 2=Good, no feedback, assumed good 8=Test, virtualized 9=Test, loopback 10=Test, manually entered 16=Uncertain, live, off-spec 17=Uncertain, substituted at device or bus 18=Uncertain, substituted at instruction 19=Uncertain, using last known good 20=Uncertain, using replacement value 32=Bad, signal failure 33=Bad, channel fault 34=Bad, module or communication fault 35=Bad, invalid configuration
Sts_eFdbk
SINT
Not Visible
Not Required
Output
Device feedback: 0 = None/Moving/Unknown, 1 = State 0, 2 = State 1, 3 = State 2, 4 = State 3.
Sts_eCmd
SINT
Not Visible
Not Required
Output
Device command: 0 = None, 1 = State 0, 2 = State 1, 3 = State 2, 4 = State 3.
Sts_eSts
SINT
Not Visible
Not Required
Output
Device status: 0 = Powerup/Reset, 1 = State 0, 2 = State 1, 3 = State 2, 4 = State 3, 5 = Moving, 6 = Horn, 7 = Out of service.
Sts_eFault
SINT
Not Visible
Not Required
Output
Device fault status: 0 = None, 16 = Position fail, 17 = Device fault, 32 = I/O fault, 34 = Configuration error.
Sts_eOutState
SINT
Not Visible
Not Required
Output
State of outputs to physical device: 0 = De-energized, 1 = State 0, 2 = State 1, 3 = State 2, 4 = State 3, 5 = Horn.
Sts_eNotify
SINT
Not Visible
Not Required
Output
Summary alarm status: 0 = Not in alarm, acknowledged, 1 = Not in alarm, unacknowledged or reset required, 2 = Low severity alarm, acknowledged, 3 = Low severity alarm, unacknowledged, 4 = Medium severity alarm, acknowledged, 5 = Medium severity alarm, unacknowledged, 6 = High severity alarm, acknowledged, 7 = High severity alarm, unacknowledged, 8 = Urgent severity alarm, acknowledged, 9 = Urgent severity alarm, unacknowledged.
Sts_eNotifyAll
SINT
Not Visible
Not Required
Output
Summary alarm status including related objects: 0 = Not in alarm, acknowledged, 1 = Not in alarm, unacknowledged or reset required, 2 = Low severity alarm, acknowledged, 3 = Low severity alarm, unacknowledged, 4 = Medium severity alarm, acknowledged, 5 = Medium severity alarm, unacknowledged, 6 = High severity alarm, acknowledged, 7 = High severity alarm, unacknowledged, 8 = Urgent severity alarm, acknowledged, 9 = Urgent severity alarm, unacknowledged.
Sts_eNotifyIOFault
SINT
Not Visible
Not Required
Output
I/O fault alarm status: 0 = Not in alarm, acknowledged, 1 = Not in alarm, unacknowledged or reset required, 2 = Low severity alarm, acknowledged, 3 = Low severity alarm, unacknowledged, 4 = Medium severity alarm, acknowledged, 5 = Medium severity alarm, unacknowledged, 6 = High severity alarm, acknowledged, 7 = High severity alarm, unacknowledged, 8 = Urgent severity alarm, acknowledged, 9 = Urgent severity alarm, unacknowledged.
Sts_eNotifyFail
SINT
Not Visible
Not Required
Output
Device fail alarm status: 0 = Not in alarm, acknowledged, 1 = Not in alarm, unacknowledged or reset required, 2 = Low severity alarm, acknowledged, 3 = Low severity alarm, unacknowledged, 4 = Medium severity alarm, acknowledged, 5 = Medium severity alarm, unacknowledged, 6 = High severity alarm, acknowledged, 7 = High severity alarm, unacknowledged, 8 = Urgent severity alarm, acknowledged, 9 = Urgent severity alarm, unacknowledged.
Sts_eNotifyIntlkTrip
SINT
Not Visible
Not Required
Output
Interlock trip alarm status: 0 = Not in alarm, acknowledged, 1 = Not in alarm, unacknowledged or reset required, 2 = Low severity alarm, acknowledged, 3 = Low severity alarm, unacknowledged, 4 = Medium severity alarm, acknowledged, 5 = Medium severity alarm, unacknowledged, 6 = High severity alarm, acknowledged, 7 = High severity alarm, unacknowledged, 8 = Urgent severity alarm, acknowledged, 9 = Urgent severity alarm, unacknowledged.
Sts_eNotifyEqpFault
SINT
Not Visible
Not Required
Output
Device-reported equipment fault alarm status: 0 = Not in alarm, acknowledged, 1 = Not in alarm, unacknowledged or reset required, 2 = Low severity alarm, acknowledged, 3 = Low severity alarm, unacknowledged, 4 = Medium severity alarm, acknowledged, 5 = Medium severity alarm, unacknowledged, 6 = High severity alarm, acknowledged, 7 = High severity alarm, unacknowledged, 8 = Urgent severity alarm, acknowledged, 9 = Urgent severity alarm, unacknowledged.
Sts_UnackAlmCount
DINT
Not Visible
Not Required
Output
Count of unacknowledged alarms.
Sts_eSrc
INT
Not Visible
Not Required
Output
Current command source: 0 = Logic not in use, 4 = Hand, 8 = Maintenance, 16 = Override, 32 = Program, 33 = Program Locked, 34 = Program default (Normal), 64 = Operator, 65 = Operator Locked, 66 = Operator default (Normal), 128 = Maintenance Out of Service, 129 = Programmed Out of Service (EnableIn false), 256 = External.
Sts_bSrc
INT
Not Visible
Not Required
Output
Active command source selections (bitmapped, for HMI): .0 = Hand, .1 = Programmed Out of Service (EnableIn false), .2= Maintenance Out of Service, .3 = Maintenance, .4 = Override, .5 = External, .6 = Program Locked, .7 = Program (unlocked), .8 = Operator Locked, .9 = Operator (unlocked).
Sts_Available
BOOL
Not Visible
Not Required
Output
1 = Device has been acquired by Program and is ready and available for control.
Sts_IntlkAvailable
BOOL
Not Visible
Not Required
Output
1 = Device can be acquired by Program and is available for control when interlocks are OK.
Sts_Bypass
BOOL
Not Visible
Not Required
Output
1 = Bypassable interlocks and permissives are bypassed.
Sts_BypActive
BOOL
Visible
Not Required
Output
1 = Interlock/permissive bypassing is active (bypassed by command or in Maintenance command source).
Sts_MaintByp
BOOL
Not Visible
Not Required
Output
1 = Device has a maintenance bypass function active.
Sts_NotRdy
BOOL
Visible
Not Required
Output
1 = Device not ready, see Sts_NrdyXxx detail bits for reason.
Sts_NrdyCfgErr
BOOL
Not Visible
Not Required
Output
1 = Device not ready, configuration error.
Sts_NrdyEqpFault
BOOL
Not Visible
Not Required
Output
1 = Device not ready, device-reported equipment fault, shed requires reset.
Sts_NrdyFail
BOOL
Not Visible
Not Required
Output
1 = Device not ready, device failure, shed requires reset.
Sts_NrdyIntlk
BOOL
Not Visible
Not Required
Output
1 = Device not ready, interlock not OK.
Sts_NrdyIOFault
BOOL
Not Visible
Not Required
Output
1 = Device not ready, I/O fault, shed requires reset.
Sts_NrdyOoS
BOOL
Not Visible
Not Required
Output
1 = Device not ready, device is Out of Service.
Sts_NrdyPerm
BOOL
Not Visible
Not Required
Output
1 = Device not ready, permissives not OK, device is not allowed to change state. 0 = Device ready or partially ready, some permissives may be not OK, device can be commanded to at least one other state.
Sts_NrdyPrioSt0
BOOL
Not Visible
Not Required
Output
1 = Device not ready, Operator or External issued priority State 0 Command, shed requires reset.
Sts_Err
BOOL
Not Visible
Not Required
Output
1 = Error in configuration, see Sts_ErrXxx detail bits for reason.
Sts_ErrAlm
BOOL
Not Visible
Not Required
Output
1 = Error in configuration, Logix tag-based alarm settings invalid.
Sts_ErrOutAPulseTime
BOOL
Not Visible
Not Required
Output
1 = Error in configuration, Cfg_OutAPulseTime invalid. Valid = 0.0 to 2147483.0, 0.0 = Output held continuously.
Sts_ErrOutBPulseTime
BOOL
Not Visible
Not Required
Output
1 = Error in configuration, Cfg_OutBPulseTime invalid. Valid = 0.0 to 2147483.0, 0.0 = Output held continuously.
Sts_ErrOutCPulseTime
BOOL
Not Visible
Not Required
Output
1 = Error in configuration, Cfg_OutCPulseTime invalid. Valid = 0.0 to 2147483.0, 0.0 = Output held continuously.
Sts_ErrOutDPulseTime
BOOL
Not Visible
Not Required
Output
1 = Error in configuration, Cfg_OutDPulseTime invalid. Valid = 0.0 to 2147483.0, 0.0 = Output held continuously.
Sts_ErrVirtualFdbkTime
BOOL
Not Visible
Not Required
Output
1 = Error in configuration, Cfg_VirtualFdbkTime invalid. Valid = 0.0 to 2147483.0.
Sts_ErrFailTime
BOOL
Not Visible
Not Required
Output
1 = Error in configuration, Cfg_FailTime invalid. Valid = 0.0 to 2147483.0.
Sts_Hand
BOOL
Visible
Not Required
Output
1 = Hand command source is selected.
Sts_OoS
BOOL
Visible
Not Required
Output
1 = Out of Service command source is selected.
Sts_Maint
BOOL
Visible
Not Required
Output
1 = Maintenance command source is selected.
Sts_Ovrd
BOOL
Visible
Not Required
Output
1 = Override command source is selected.
Sts_Ext
BOOL
Visible
Not Required
Output
1 = External command source is selected.
Sts_Prog
BOOL
Visible
Not Required
Output
1 = Program (unlocked) command source is selected.
Sts_ProgLocked
BOOL
Not Visible
Not Required
Output
1 = Program Locked command source is selected.
Sts_Oper
BOOL
Visible
Not Required
Output
1 = Operator (unlocked) command source is selected.
Sts_OperLocked
BOOL
Not Visible
Not Required
Output
1 = Operator Locked command source is selected.
Sts_ProgOperSel
BOOL
Not Visible
Not Required
Output
Program/Operator selection (latch) state: 1 = Program, 0 = Operator.
Sts_ProgOperLock
BOOL
Visible
Not Required
Output
Program/Operator lock (latch) state: 1 = Locked, 0 = Unlocked.
Sts_Normal
BOOL
Not Visible
Not Required
Output
1 = Selected command source is the normal source (Program or Operator).
Sts_ExtReqInh
BOOL
Not Visible
Not Required
Output
1 = External command source selection is inhibited, External is not available in current state.
Sts_ProgReqInh
BOOL
Not Visible
Not Required
Output
1 = Program command source selection is inhibited, Program is not available in current state.
Sts_MAcqRcvd
BOOL
Not Visible
Not Required
Output
1 = Command to acquire Maintenance command source was received this scan.
Sts_CmdConflict
BOOL
Not Visible
Not Required
Output
1 = Conflicting commands received this scan.
Sts_Alm
BOOL
Not Visible
Not Required
Output
1 = An alarm is active.
Sts_AlmInh
BOOL
Not Visible
Not Required
Output
1 = An alarm is shelved or disabled.
Sts_IOFault
BOOL
Not Visible
Not Required
Output
1 = I/O communication fault. There is a predefined default discrete Logix tag-based alarm for the status. Set standard configuration members of the discrete Logix tag-based alarm. Alarm elements can be accessed as follows: PD4SD_tag.@Alarms.Alm_IOFault.AlarmElement.
Sts_Fail
BOOL
Visible
Not Required
Output
1 = Device position failure. There is a predefined default discrete Logix tag-based alarm for the status. Set standard configuration members of the discrete Logix tag-based alarm. Alarm elements can be accessed as follows: PD4SD_Tag.@Alarms.Alm_Fail.AlarmElement.
Sts_IntlkTrip
BOOL
Not Visible
Not Required
Output
1 = Interlock trip, device was set to State 0 by an interlock not OK. There is a predefined default discrete Logix tag-based alarm for the status. Set standard configuration members of the discrete Logix tag-based alarm. Alarm elements can be accessed as follows: PD4SD_Tag.@Alarms.Alm_IntlkTrip.AlarmElement.
Sts_EqpFault
BOOL
Not Visible
Not Required
Output
1 = Device-reported equipment fault. There is a predefined default discrete Logix tag-based alarm for the status. Set standard configuration members of the discrete Logix tag-based alarm. Alarm elements can be accessed as follows: PD4SD_Tag.@Alarms.Alm_EqpFault.AlarmElement.
Sts_RdyAck
BOOL
Not Visible
Not Required
Output
1 = An alarm is ready to be acknowledged.
Sts_RdyReset
BOOL
Visible
Not Required
Output
1 = A latched alarm or shed condition is ready to be reset.
XRdy_Acq
BOOL
Not Visible
Not Required
Output
1 = Ready for XCmd_Acq, enable button.
XRdy_Rel
BOOL
Not Visible
Not Required
Output
1 = Ready for XCmd_Rel, enable button.
XRdy_St0
BOOL
Not Visible
Not Required
Output
1 = Ready for XCmd_St0, enable button.
XRdy_St1
BOOL
Not Visible
Not Required
Output
1 = Ready for XCmd_St1, enable button.
XRdy_St2
BOOL
Not Visible
Not Required
Output
1 = Ready for XCmd_St2, enable button.
XRdy_St3
BOOL
Not Visible
Not Required
Output
1 = Ready for XCmd_St3, enable button.
XRdy_Reset
BOOL
Not Visible
Not Required
Output
1 = Ready for XCmd_Reset, enable button.
XRdy_ResetAckAll
BOOL
Not Visible
Not Required
Output
1 = Ready for XCmd_ResetAckAll, enable button.
Val_Owner
DINT
Not Visible
Not Required
Output
Current object Owner ID, 0 = not owned.
Private Input Members
Data Type
Description
CmdSrc
P_COMMAND_SOURCE
Command source selection.
MCmd_Acq
BOOL
Maintenance Command to acquire Maintenance command source. The instruction clears this operand automatically.
Default is false.
MCmd_Bypass
BOOL
Maintenance Command to bypass all bypassable interlocks and permissives. The instruction clears this operand automatically.
Default is false.
MCmd_Check
BOOL
Maintenance Command to remove bypass and check all interlocks and permissives. The instruction clears this operand automatically.
Default is false.
MCmd_IS
BOOL
Maintenance Command to select In Service. The instruction clears this operand automatically.
Default is false.
MCmd_OoS
BOOL
Maintenance Command to select Out of Service. The instruction clears this operand automatically.
Default is false.
MCmd_Physical
BOOL
Maintenance Command to select Physical device operation. The instruction clears this operand automatically.
Default is false.
MCmd_Rel
BOOL
Maintenance Command to release Maintenance command source. The instruction clears this operand automatically.
Default is false.
MCmd_Virtual
BOOL
Maintenance Command to select Virtual device operation. The instruction clears this operand automatically.
Default is false.
OCmd_Lock
BOOL
Operator Command to select Operator Locked command source and disallow Program. The instruction clears this operand automatically.
Default is false.
OCmd_Normal
BOOL
Operator Command to select configured normal command source (Operator or Program). The instruction clears this operand automatically.
Default is false.
OCmd_Oper
BOOL
Operator Command to select Operator (unlocked) command source. The instruction clears this operand automatically.
Default is false.
OCmd_Prog
BOOL
Operator Command to select Program (unlocked) command source. The instruction clears this operand automatically.
Default is false.
OCmd_Reset
BOOL
Operator Command to reset shed latches and returned-to-normal latched alarms. The instruction clears this operand automatically.
Default is false.
OCmd_ResetAckAll
BOOL
Operator Command to acknowledge all alarms and reset latched alarms and shed conditions. The instruction clears this operand automatically.
Default is false.
OCmd_St0
BOOL
Operator Command to set device to State 0. The instruction clears this operand automatically.
Default is false.
OCmd_St1
BOOL
Operator Command to set device to State 1. The instruction clears this operand automatically.
Default is false.
OCmd_St2
BOOL
Operator Command to set device to State 2. The instruction clears this operand automatically.
Default is false.
OCmd_St3
BOOL
Operator Command to set device to State 3. The instruction clears this operand automatically.
Default is false.
OCmd_Unlock
BOOL
Operator Command to unlock Operator command source and allow Program to acquire. The instruction clears this operand automatically.
Default is false.
Private Output Members
Data Type
Description
HMI_BusObjIndex
DINT
This object's index in the bus array, for use by HMI display.
HMI_eCmdState
SINT
Device target state: 0 = None, 1 = State 0, 2 = State 1, 3 = State 2, 4 = State 3.
HMI_St0PermOK
BOOL
1 = Permissives are OK to go to State 0.
HMI_St1PermOK
BOOL
1 = Permissives are OK to go to State 1.
HMI_St2PermOK
BOOL
1 = Permissives are OK to go to State 2.
HMI_St3PermOK
BOOL
1 = Permissives are OK to go to State 3.
MRdy_Acq
BOOL
1 = Ready for MCmd_Acq, enable HMI button.
MRdy_Bypass
BOOL
1 = Ready for MCmd_Bypass, enable HMI button.
MRdy_Check
BOOL
1 = Ready for MCmd_Check, enable HMI button.
MRdy_IS
BOOL
1 = Ready for MCmd_IS, enable HMI button.
MRdy_OoS
BOOL
1 = Ready for MCmd_OoS, enable HMI button.
MRdy_Physical
BOOL
1 = Ready for MCmd_Physical, enable HMI button.
MRdy_Rel
BOOL
1 = Ready for MCmd_Rel, enable HMI button.
MRdy_Virtual
BOOL
1 = Ready for MCmd_Virtual, enable HMI button.
ORdy_Lock
BOOL
1 = Ready for OCmd_Lock, enable HMI button.
ORdy_Normal
BOOL
1 = Ready for OCmd_Normal, enable HMI button.
ORdy_Oper
BOOL
1 = Ready for OCmd_Oper, enable HMI button.
ORdy_Prog
BOOL
1 = Ready for OCmd_Prog, enable HMI button.
ORdy_Reset
BOOL
1 = Ready for OCmd_Reset, enable HMI button.
ORdy_ResetAckAll
BOOL
1 = Ready for OCmd_ResetAckAll, enable HMI button.
ORdy_St0
BOOL
1 = Ready for OCmd_St0, enable HMI button.
ORdy_St1
BOOL
1 = Ready for OCmd_St1, enable HMI button.
ORdy_St2
BOOL
1 = Ready for OCmd_St2, enable HMI button.
ORdy_St3
BOOL
1 = Ready for OCmd_St3, enable HMI button.
ORdy_Unlock
BOOL
1 = Ready for OCmd_Unlock, enable HMI button.
Public InOut Members
Data Type
FBD Default Visibility
FBD Wiring required
Usage
Description
BusObj
BUS_OBJ
Visible
Required
InOut
Bus component.
BUS_OBJ Structure
The BUS_OBJ structure links the device to other devices and instructions in a complex control strategy, typically into a hierarchy. A Bus Object rolls up status and alarm information from lower level devices to higher level control and fans out commands from higher level control to lower level devices, and items link to the bus by referencing a single member of the BUS_OBJ array associated with the bus.
This parameter links the instruction to an external tag that contains necessary data for the instruction to operate. The external tag must be of the data type shown, or may be NULL. If NULL, the Bus functions of this instruction are not available.
Members
Data Type
Description
Inp_Cmd
DINT
Input to assert commands
Out_Cmd
DINT
Resultant commands
Inp_CmdLLH
DINT
Input for level normally high commands
Out_CmdLLH
DINT
Resultant line level high commands
Inp_Sts
DINT
Input to assert status
Out_Sts
DINT
Resultant status
Inp_CmdAck
DINT
Input to assert a command acknowledgement
Out_CmdAck
DINT
Resultant command acknowledgements
Inp_SeverityMax
DINT
Input: maximum alarm severity
Out_SeverityMax
DINT
Resultant of maximum alarm severity
Cfg_CmdMask
DINT
Propagation mask for commands
Cfg_CmdLLHMask
DINT
Propagation mask for line level high commands
Cfg_StsMask
DINT
Propagation mask for status
Ref_Index
DINT
Bus array index
Alarms
Discrete
Logix5000
tag-based alarms are defined for these members:
Member
Alarm Name
Description
Sts_IntlkTrip
Alm_IntlkTrip
Device held or set to State 0 by an interlock Not OK.
Sts_IOFault
Alm_IOFault
I/O fault.
Sts_Fail
Alm_Fail
Device failure.
Sts_EqpFault
Alm_EqpFault
Device equipment failure.
Mark the alarm as used or unused and set standard configuration members of the discrete Logix tag-based alarm. Use this format to access alarm elements:
Tag.@Alarms.AlarmName.AlarmElement
The PD4SD instruction uses these alarms:
  • Raises the Interlock Trip alarm when an interlock not-OK condition occurs and the device is not in state 0. The device can be configured to be commanded to state 0 when an interlock trip occurs. If interlocks are not bypassed, a bypassable interlock or a non-bypassable interlock not-OK condition initiates an interlock trip. If interlocks are bypassed, only a non-bypassable interlock not-OK condition initiates an interlock trip.
  • Raises the I/O Fault alarm when the Inp_IOFault input is true. This input is usually used to indicate to the instruction that a communication failure has occurred for its I/O. If the I/O Fault is configured as a shed fault, the device transitions to the state 0 and remains there until the fault clears and the device is reset.
  • Raises the Equipment Fault alarm when the Inp_EqpFault input is true. If the Equipment Fault is configured as a shed fault, the device transitions to the state 0 and remains there until the fault clears and the device is reset.
  • Raises the Fail alarm when the device is commanded to a state, but the device feedback does not confirm that the device is in that state within the configured failure time. If the Failure is configured as a shed fault, the device transitions to the state 0 and remains there until the fault clears and the device is reset.
Program, Operator, and External commands reset latched alarms, and reset and acknowledge all alarms of the instruction (Alarm Set) at the same time. This diagram shows how the commands interact with the PD4SD instruction.
pd4sd_FeedbackAlarmConditions1
Operation
This diagram illustrates functionality of the PD4SD instruction:
pd4sd_operation_v35
This diagram shows logic of permissives associated with commands of the PD4SD instruction:
pd4sd_permissives_v35
Operator command request confirmation
The PD4SD instruction enables these operator commands and settings:
  • OCmd_St0
  • OCmd_St1
  • OCmd_St2
  • OCmd_St3
Enforced security might require the request to be confirmed or canceled before the selected command executes or setting is accepted. The instruction checks the security rules inspecting Cfg_CnfrmReqd. If Cfg_CnfrmReqd = 0, no confirmation is required and the request executes immediately. If Cfg_CnfrmReqd = 1, the instruction waits for operator confirmation or cancelation of the command. If Cfg_CnfrmReqd = 2 or 3, eSignature is needed before command confirmation is enabled.
Virtualization
Use virtualization for instruction testing and operator training. Command virtual operation using program command PCmd_Virtual or maintenance command MCmd_Virtual. After finishing virtual operation, use program command PCmd_Physical or maintenance command MCmd_Physical to return to normal physical device operation.
When Virtualization is active, the device outputs of the PD4SD instruction hold at 0, virtual feedback of a working device is provided, and I/O faults are ignored. Setting of Cfg_VirtualFdbkTime operand delays the echo of the feedback status of the device. Manipulate the instruction to operate as if a working device is present.
Initialization
The instruction is normally initialized in the instruction first run. Request re-initialization by setting Inp_InitializeReq = 1. For proper initialization, when adding the instruction while performing an online edit of the code, make sure that Inp_InitializeReq = 1, the default value.
Configuration of Strings for HMI
Configure strings for HMI faceplates, used in
FactoryTalk View
, and for the
Studio 5000 Logix Designer
configuration dialog box. The strings are set to extended properties of tag items.
  • Description
  • Label for graphic symbol
  • Display Library for HMI Faceplate call-up
  • Instruction name
  • Area name
  • URL link
  • Navigation to an object with more information
  • Command Labels for States 0 through 3
  • Target State Labels for States 0 through 3
  • Name of Interlock Trip Alarm
  • Name of I/O Fault Alarm
  • Name of Position Fail Alarm
  • Name of Lock Fail Alarm
Command Source
The instruction uses these command sources. The command sources are prioritized in order from highest to lowest in this table.
Command Source
Description
Hand
Hardwired logic or other logic outside the instruction controls the device. The instruction tracks the state of the device for bumpless transfer back to one of the other command sources.
This is the highest priority command source.
Out-of-Service
The instruction is disabled. Device commands and settings from any source are not accepted.
Maintenance
Maintenance controls the device and supersedes Operator, Program, External and Override control. Operator commands and settings from the HMI are accepted.
Override
Priority logic controls the device and supersedes Operator, Program and External control. Override Input (Inp_Ovrd) is accepted.
External
External logic (for example, field pilot control or upstream SCADA) controls the device. External commands (XCmd_) are accepted.
Program locked
Program logic controls the device. Program commands (PCmd_) are accepted. Operator cannot take control from the Program. Override cannot take control from theProgram unless Cfg_OvrdOverLock = 1.
Program
Program logic controls the device. Program commands (PCmd_) are accepted.
Operator locked
The Operator controls the device. Operator commands (OCmd_) from the HMI are accepted. Program cannot take control from Operator. Override cannot take control from Operator unless Cfg_OvrdOverLock = 1.
Operator
The Operator controls the device. Operator commands (OCmd_) from the HMI are accepted. This is the lowest priority command source.
The instruction enables or disables these operations:
  • Maintenance Out-of-Service exists
  • Maintenance exists
  • External exists
  • Program (unlocked) exists
  • Program locked exists
  • Operator (unlocked) exists
  • Operator locked exists
  • PCmd_Lock used as a Level (1 = Lock, 0 = Unlock)
The instruction checks for invalid configurations of control and forces the nearest valid configuration.
The core control model arbitrates the source of the commands and parameters that the receiving function accepts. The core control model determines if the source is:
  • A programmatic entity which resides entirely within the processing environment, or
  • An external interface entity which issues commands and parameters external and asynchronously to the processing environment.
Locking a control source prevents the other control source from acquiring privilege.
Core Command Source Model
The core control model consists of these control sources:
  • Oper
  • OperLocked
  • Prog
  • ProgLocked
The control model defaults to this configuration. Other control sources may be present in the model but act as overriding control sources, acting independent of the base Operator/Program state machine.
Enable control sources as Configuration
The user can enable and disable individual control sources. The default configuration uses the entire base model; upon power-up of the processing environment the control source will be the designated default. Some combinations of enabled control sources are disallowed as they are either unnecessary or could create unintended changes.
Prog Power Up
Configuration allows the user to specify whether Operator or Program is the power-up default.
Prog Priority
Configuration allows the user to specify whether Operator or Program commands take priority when simultaneously asserted.
Automatic reset of commands
All commands are treated as one-shot-latched. Commands are automatically cleared when the instruction executes and processes them.
Change Destination States
Under certain configurations the destination command source for some commands may change. This is in keeping with the intent of the command. For example, if the Program state is disabled, the destination of the OCmd_Prog command becomes the Program Locked state instead of the Program state. This maintains the intent of the OCmd_Prog command: the operator entity wishes to place the function in control of the program. If the command was eliminated there would be no way to accomplish this. This is only done in configurations where it would cause no conflict or race condition, but serves to preserve as much user functionality as is practical.
Higher Priority Command Sources
These Higher priority command sources operate independently within the model:
  • External
  • Override
  • Maintenance
  • Out-of-Service
  • In-Service
  • Hand
Monitor the PD4SD Instruction
Use the operator faceplate from the PlantPAx library of Process objects for monitoring.
Affects Math Status Flags
No.
Major/Minor Faults
None specific to this instruction. See Index through arrays in the Logix 5000 General Instructions manual for array-indexing faults.
Execution
Ladder Diagram
Condition/State
Action Taken
Prescan
Any commands received before first scan are discarded. The device is de-energized.
Instruction first run
Any commands received before first scan are discarded. The device is treated as if it were returning from Hand mode: the instruction state is set based on the position feedback received from the device. If the device does not have position feedback or the position feedback is invalid, the device is set to the ‘unknown/powerup’ state.
Rung-condition-in is false
Handled the same as if the device is taken Out of Service by command. The device outputs are de-energized, and the device Command Source is shown as Program Out of Service on the HMI. All alarms are cleared. The rung-condition-out continues as false.
Rung-condition-in is true
Set rung-condition-out to rung-condition-in.
The instruction executes.
Postscan
Rung-condition-out is cleared to false.
Function Block Diagram
Condition/State
Action Taken
Prescan
Any commands received before first scan are discarded. The device is de-energized.
Instruction first run
Any commands received before first scan are discarded. The device is treated as if it were returning from Hand mode: the instruction state is set based on the position feedback received from the device. If the device does not have position feedback or the position feedback is invalid, the device is set to the ‘unknown/powerup’ state.
Instruction first scan
See instruction first run in the function block diagram table.
EnableIn is false
Handled the same as if the device is taken Out of Service by command. The device outputs are de-energized, and the device Command Source is shown as Program Out of Service on the HMI. All alarms are cleared. EnableOut is set to false.
EnableIn is true
EnableOut is set to true.
The instruction executes.
Postscan
EnableIn and EnableOut bits are cleared to false.
Structured Text
In Structured Text, EnableIn is always true during normal scan. Therefore, if the instruction is in the control path activated by the logic, it will execute.
Condition/State
Action Taken
Prescan
See Prescan in the Function Block Diagram table.
Instruction first run
See Instruction first run in the Function Block Diagram table.
EnableIn is true
See EnableIn is true in the Function Block Diagram table.
Postscan
See Postscan in the Function Block Diagram table.
Examples
In the following example, the PD4SD instruction controls a cooling fan that has three fixed speeds (low, medium, high) and an off state. The cooling fan is considered a four-state device. In this example, three digital outputs are used to set the speed setting (when all three are off, the fan is commanded off) and three digital inputs provide feedback on the actual fan state (when all three are off, the fan is off).
In this example, the four cooling fan states are configured as shown in these tables. (In this example, Output A is set so it can be used for display purposes even though Output A is not used by the cooling fan device.)
State 0 (Off):
Output
Feedback
Write
Value
Required
State
Yes
1
No
Yes
0
Yes
0
Yes
0
Yes
0
Yes
0
Yes
0
State 1 (Low):
Output
Feedback
Write
Value
Required
State
A
Yes
0
No
B
Yes
1
Yes
1
C
Yes
0
Yes
0
D
Yes
0
Yes
0
State 2 (Medium):
Output
Feedback
Write
Value
Required
State
A
Yes
0
No
B
Yes
0
Yes
0
C
Yes
1
Yes
1
D
Yes
0
Yes
0
State 3 (High):
Output
Feedback
Write
Value
Required
State
A
Yes
0
No
B
Yes
0
Yes
0
C
Yes
0
Yes
0
D
Yes
1
Yes
1
Ladder diagram
pd4sd_ladderexample_a_v35
pd4sd_ladderexample_b_v35
Function Block Diagram
pd4sd_fbdexample_v35
Structured text
D4SD100.Inp_BFdbkData:=D4SD100_LowFdbk
D4SD100.Inp_CFdbkData:=D4SD100_MedFdbk
D4SD100.Inp_DFdbkData:=D4SD100_HighFdbk
PD4SD(D4SD100, 0);
D4SD100_LowRunCoil:=D4SD100.Out_BData;
D4SD100_MedRunCoil:=D4SD100.Out_CData;
D4SD100_HighRunCoil:=D4SD100.Out_DData;
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.