Safe Direction (SDI)

This instruction only applies to the
Compact GuardLogix
5380 and
GuardLogix
5580 controllers.
The Safe Direction (SDI) instruction monitors position of a motor or axis to detect movement of more than a defined amount in the unintended direction.
Available Languages
Ladder Diagram
SDI_LD_avail lang
Function Block
This instruction is not available in function block.
Structured Text
This instruction is not available in structured text.
Safe Direction Application
Safe Direction is used with a CIP safety drive that supplies position of a motor or axis and a Safe Feedback Interface (SFX) instruction to scale the feedback. During operation, the SDI instruction signals when the motor moves in the unintended direction more than a specified limit. The output is used to initiate an application specific action such as SS1, SS2 or STO.
Operands
IMPORTANT:
Unexpected operation may occur if:
  • Output tag operands are overwritten.
  • Members of a structure operand are overwritten.
  • Structure operands are shared by multiple instructions.
WARNING:
The SDI Safety Control structure contains internal state information. If any of the configuration operands are changed while in run mode, accept the pending edits and cycle the controller mode from Program to Run for the changes to take effect.
The following table provides the operands used for configuring the instruction.
Operand
Data Type
Format
Description
Safety Control
SAFE_DIRECTION
tag
Data structure required for proper operation of instruction.
Restart Type
list item
This input selects the Restart Type for the instruction.
MANUAL (0)
A 0 to 1 transition of the Reset input is required after Request has been removed to enable the instruction to operate.
AUTOMATIC (1)
The instruction will reset when the Request has been removed and no fault is present [FP] = OFF (0). Once reset, the instruction will be able to operate.
safety advisory
ATTENTION:
Only use Automatic Restart in applications where it is determined that no unsafe conditions occur from its use.
Cold Start Type
list item
This input selects the behavior when applying controller power or a controller mode change to Run.
MANUAL (0)
A 0 to 1 transition of the Reset input is required with the Request removed to enable the instruction to operate.
AUTOMATIC (1)
The instruction resets when the Request has been removed.
The following table explains the instruction inputs.
Operand
Data Type
Format
Description
Position
Window
REAL
immediate
tag
This operand sets the amount of incremental movement allowed in the unintended direction before faulting.
Range: Any REAL value greater than zero.
Feedback SFX
SAFETY_FEEDBACK_INTERFACE
tag
This operand provides position data. Assign this operand to the SFX Safety Control tag that is used by this SDI instruction. The following members of the SFX Safety Control tag are used:
FeedbackSFX.FeedbackPosition
Units: Feedback Counts
FeedbackSFX.PositionScalingOut
Units: Feedback Counts / Position Unit
Positive Request
BOOL
tag
This operand enables the SDI function to begin checking for unintended positive motion.
ON(1): Begins positive motion checking.
OFF(0): Allows function reset according to Restart Type
Negative
Request
BOOL
tag
This operand enables the SDI function to begin checking for unintended negative motion.
ON(1): Begins negative motion checking.
OFF(0): Allows function reset according to Restart Type
Reset
1
BOOL
tag
This operand resets the SDI function. An OFF(0) to ON(1) transition resets the SDI function and Fault Present [FP] provided the Request is OFF(0) and any fault condition has been removed. The Reset Required [RR] output indicates when a reset is required to reset the function.
1
ISO 13849-1 stipulates instruction reset function must occur on falling edge signals. To comply with ISO 13849-1 requirements, add the logic immediately before this instruction. Rename the Reset Signal tag in this example to the reset signal tag name. Then use the OSF instruction Output Bit tag as the instruction’s reset source.
RSL5K_MMVC Reset-Signal Example_v31
This table explains instruction outputs. The outputs are external tags (safety output modules) or internal tags used in other logic routines.
Operand
Data Type
Description
Output 1 [O1]
BOOL
ON(1): Indicates the instruction is executing and the function is not faulted.
OFF(0): Any of the conditions below:
  • The rung in condition is no longer true
  • An instruction fault has occurred
Reset Required [RR]
BOOL
ON(1): Indicates that an Reset is required to restart the instruction and or to clear faults. See Reset Input for Reset sequence.
OFF(0): Normal operation under Automatic Restart operation.
Fault Present [FP]
BOOL
ON(1): A fault is present in the instruction.
OFF(0): The instruction is operating normally.
Diagnostic Code
SINT
This output indicates the diagnostic status of the instruction. See Diagnostic Codes and Corrective Actions for specific codes and actions.
Fault Type
SINT
This output indicates the type of fault that occurred. See the Fault Codes and Corrective Actions section for specific codes and actions.
This table explains instruction outputs that are written to the user-specified tag.
Operand
Data Type
Format
Description
SDI Active
BOOL
tag
The SDI instruction writes the SDI Active status to this tag.
OFF(0): SDI not active
ON(1): SDI active
Tip:
Assign the SDI Active operand to the SDI Active member of the safety output tag structure corresponding to the motion safety instance of the drive module. The corresponding Axis Safety Status updates automatically in the drive axis tag structure to enable coordination of the motion task with the safety task.
SDI Limit
BOOL
tag
The SDI instruction writes the SDI Limit status to this tag
OFF(0): Axis movement is in the safe direction.
ON(1): Axis movement in the unintended direction occurred.
Tip:
Assign the SDI Limit operand to the SDI Limit member of the safety output tag structure corresponding to the motion safety instance of the drive module. The corresponding Axis Safety Status updates automatically in the drive axis tag structure to enable coordination of the motion task with the safety task.
SDI Fault
BOOL
tag
The SDI instruction writes the SDI Fault status to this tag
OFF(0): Not faulted
ON(1): Faulted
SDI Fault is set ON (1) for the following fault types and corresponding conditions:
  • Configuration Fault
An instruction input operand value is out of range.
  • SFX Instruction Not Ready Fault
The feedback used for monitoring is not valid or the SFX instruction is not running when SDI is requested.
Tip:
Assign the SDI fault operand to the SDI Fault member of the safety output tag structure corresponding to the motion safety instance of the drive module. The corresponding Axis Safety Faults tag updates automatically in the drive axis tag structure to enable coordination of the motion task with the safety task.
IMPORTANT:
Do not write to any instruction output tag under any circumstances.
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Index Through Arrays for array-indexing faults.
Execution
Condition/State
Action Taken
Prescan
The .01, .FP, .RR, .SDIActive, .SDILimit, and .SDIFault outputs are cleared to OFF(0).
The Diagnostic Code output is set to 0.
The Fault Type output is set to 1
Rung-condition-in is false
The .O1, .SDIActive, and .SDILimit are cleared to OFF(0).
If an instruction fault is present when rung went false the fault condition will be maintained and Diagnostic Code displayed.
Rung-condition-in is true
The instruction executes.
Postscan
N/A
Operation
Normal Operation
The SDI function begins if it has been previously reset and the Positive Request input or the Negative Request Input is asserted ON(1). At this point the current position is captured. If there is movement in the unintended direction beyond the position window limit relative to the current position, then the corresponding Limit output is set. If there is movement in the allowed direction that is greater than the captured position then the captured position is updated according to the extent of movement in the allowed direction. Once a limit output is set it remains set until the SDI function is reset.
All position values used in the SDI instruction are in Position Units A position unit is user defined according to the particular application and is configured in the SFX instruction.
Pass-Through Tags
A Safe Motion Monitoring Drive has one or more motion axes that are controlled by a motion task. The Safe Motion Monitoring Drive also has one or more motion safety instances that support safety functions used in a safety task of a safety controller. Some of the tags associated with a drives motion safety instance are pass-through tags. The following table shows the pass-through tags and the corresponding axis tags for the SDI function:
SDI Instruction Output
Pass-Through Tags for Motion Safety Instance
Safe Motion Monitoring Drive Action
Axis Tag
SDI Active
module
1
:SO.SDIActive[instance
2
]
updates tag
axis
3
.SDIActiveStatus
SDI Limit
module
1
:SO.SDILimit[instance
2
]
updates tag
axis
3
.SDILimitStatus
SDI Fault
module
1
:SO.SDIFault[instance
2
]
updates tag
axis
3
.SDIFault
1
module is the name for the drive module in Logix Designer I/O Configuration tree
2
instance is 1 or 2 for dual axis drives otherwise null
3
axis is the axis name in the Logix Designer Motion Group and is associated with module
When assigning the SDI Active, SDI Limit and SDI Fault instruction outputs to the motion safety instance pass-through tags, the corresponding Axis Safety Status and Axis Safety Faults tags automatically update in the motion controller. The motion control task of motion controller reads the Axis Safety Status and the Axis Safety Faults tags to coordinate operation between the safety task and motion task. The following is a typical sequence of events:
  1. The safety application receives an input to prevent axis movement in the negative travel direction.
  2. The safety application sets Negative Request input ON(1) to request the SDI function.
  3. SDI instruction sets the SDI Active output and writes the module:SO.SDIActive[instance] tag of the motion safety instance in the drive.
  4. The motion safety instance in the drive updates the Axis Safety Status tag read in the motion controller.
  5. The motion application continues operating the axis with movement in the positive travel direction only.
Normal Operation, Automatic Restart
The following diagram shows normal operation with Automatic Restart. Once Negative Request is asserted ON(1) the SDI function operates. If the incremental position moves in the negative direction a distance greater than the Position Window then the SDI Limit is set. Once the SDI limit is set the function must be reset by removing the Negative Request OFF(0).
SDI Normal Operation Automatic Restart
Normal Operation, Manual Restart
When manual restart is configured, the SDI function must be reset before subsequent operation. The Reset Required output indicates that the Reset input must make an OFF(0) to ON(1) transition to reset the instruction after the Request input is removed OFF(0). The following diagram shows normal operation with manual restart.
SDI Nomral Operation Manual Restart
Fault Codes and Corrective Actions
Fault Code
Description
Corrective Action
1
No Fault
None
2
Invalid Configuration Fault
  • Check the input values and correct inconsistencies or illegal values. Check the diagnostic code for more information
  • Reset the fault.
101
Position Window Calculation Overflow Fault. The Position Scaling from the Feedback SFX tag multiplied by the Position Window exceeds (2^31 – 1)
  • Ensure that the SFX instruction that supplies inputs to this SDI instruction has correct values.
  • Use a smaller Position Window value.
102
SFX Instruction Not Ready Fault
Ensure that the SFX instruction that supplies inputs to this SDI instruction is executing and not faulted before requesting SDI.
Diagnostic Codes and Corrective Actions
Diagnostic Code
Description
Corrective Action
0
No diagnostic information
None
10
Rung went false while the SDI function was executing.
Make sure this instruction is enabled.
15
Both the Negative Request input and Positive Request input were in the ON(1) state in the same scan.
Only checking for movement in either positive or negative direction is allowed at the same time.
20
Position Window value not valid.
Position window must be a positive value
21
Limit exceeded in the positive direction
  • Ensure movement is only in the negative direction
  • Decrease the position window
22
Limit exceeded in the negative direction.
  • Ensure movement is only in the positive direction
  • Increase the position window
Example
SDI_example
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.