AgentSkillsCN

mm-apr-twinsafe

在为APR配置TwinSAFE安全系统时,可按以下步骤操作: (1) 安全架构的搭建,包括EL6900/EL1904/EL2904; (2) 为E1驱动器实现STO(安全扭矩关闭)功能; (3) 整合紧急停止与安全光幕; (4) 安全PLC的编程与功能块的运用; (5) 安全响应时间的计算与优化。

SKILL.md
--- frontmatter
name: mm-apr-twinsafe
description: |
  Use when configuring TwinSAFE safety systems for APR:
  (1) Safety architecture with EL6900/EL1904/EL2904,
  (2) STO (Safe Torque Off) implementation for E1 drives,
  (3) E-STOP and safety light curtain integration,
  (4) Safety PLC programming and function blocks,
  (5) Safety response time calculations.

TwinSAFE Safety Configuration Guide

Version: APR-2026.01 | TwinCAT: 3.1 Build 4024.65

Safety architecture for APR dual-axis linear motor system.

Overview

This skill covers the TwinSAFE safety system configuration for the APR system, including safety hardware selection, STO (Safe Torque Off) implementation, and safety PLC programming.

Safety Hardware

TerminalFunctionDescription
EL6900TwinSAFE LogicSafety PLC, executes safety program
EL1904Safety Digital Input4-channel, dual-channel evaluation
EL2904Safety Digital Output4-channel, SIL3/PLe capable

Safety Architecture

code
┌─────────────────────────────────────────────────────────────────┐
│                    TwinSAFE Safety Loop                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  ┌──────────┐     ┌──────────┐     ┌──────────┐     ┌─────────┐ │
│  │ E-STOP   │────►│ EL1904   │────►│ EL6900   │────►│ EL2904  │ │
│  │ (Ch1+Ch2)│────►│ DI 1+2   │     │ Safety   │     │ DO 1-4  │ │
│  └──────────┘     └──────────┘     │ Logic    │     └────┬────┘ │
│                                    │          │          │      │
│  ┌──────────┐     ┌──────────┐     │          │          │      │
│  │ Light    │────►│ EL1904   │────►│          │          ▼      │
│  │ Curtain  │────►│ DI 3+4   │     │          │     ┌─────────┐ │
│  │ (OSSD)   │     └──────────┘     └──────────┘     │ E1 STO  │ │
│  └──────────┘                                       │ STO1/2  │ │
│                                                     └─────────┘ │
└─────────────────────────────────────────────────────────────────┘

EL1904 Input Configuration

Channel Assignment

ChannelSignalTypeDescription
DI 1E-STOP Ch1NC ContactEmergency stop channel 1
DI 2E-STOP Ch2NC ContactEmergency stop channel 2
DI 3Light Curtain OSSD1PNP 24VSafety output 1
DI 4Light Curtain OSSD2PNP 24VSafety output 2

Wiring Requirements

  • Dual-channel wiring for E-STOP (redundancy)
  • Light curtain OSSD: PNP, 24VDC
  • Cable shield grounded at one end
  • Max cable length: 100m

EL2904 Output Configuration

Channel Assignment

ChannelSignalLoadDescription
DO 1STO1 Axis AE1 DriveSafe Torque Off Ch1
DO 2STO2 Axis AE1 DriveSafe Torque Off Ch2
DO 3STO1 Axis BE1 DriveSafe Torque Off Ch1
DO 4STO2 Axis BE1 DriveSafe Torque Off Ch2

Wiring to E1 Drive

code
EL2904 DO1 ────────────► E1 Drive Axis A STO1
EL2904 DO2 ────────────► E1 Drive Axis A STO2

EL2904 DO3 ────────────► E1 Drive Axis B STO1
EL2904 DO4 ────────────► E1 Drive Axis B STO2

EL6900 Safety Program

Function Blocks

FBPurpose
SF_EmergencyStopE-STOP dual-channel evaluation
SF_ESPELight curtain (ESPE) evaluation
SF_SafeStop1SS1: controlled stop then STO
SF_EDMExternal Device Monitoring

Safety Logic Example

iecst
PROGRAM SafetyPLC
VAR
    // Inputs from EL1904
    bEStop_Ch1      : BOOL;
    bEStop_Ch2      : BOOL;
    bLightCurtain1  : BOOL;
    bLightCurtain2  : BOOL;
    bResetButton    : BOOL;

    // Outputs to EL2904
    bSTO1_AxisA     : BOOL;
    bSTO2_AxisA     : BOOL;
    bSTO1_AxisB     : BOOL;
    bSTO2_AxisB     : BOOL;

    // Function Blocks
    fbEStop         : SF_EmergencyStop;
    fbLightCurtain  : SF_ESPE;
END_VAR

// E-STOP evaluation
fbEStop(
    Activate := TRUE,
    S_EStopIn := bEStop_Ch1 AND bEStop_Ch2,
    S_StartReset := bResetButton,
    S_AutoReset := FALSE,
    Reset := bResetButton
);

// Light curtain evaluation
fbLightCurtain(
    Activate := TRUE,
    S_OSSD1 := bLightCurtain1,
    S_OSSD2 := bLightCurtain2,
    S_StartReset := bResetButton,
    Reset := bResetButton
);

// Combined safety output
bSTO1_AxisA := fbEStop.S_EStopOut AND fbLightCurtain.S_ESPE_Out;
bSTO2_AxisA := bSTO1_AxisA;
bSTO1_AxisB := bSTO1_AxisA;
bSTO2_AxisB := bSTO1_AxisA;

Safety Response Times

ComponentResponse Time
EL1904 Input< 4 ms
EL6900 Logic< 6 ms
EL2904 Output< 4 ms
E1 STO Response< 10 ms
Total System< 24 ms

Safety Functions

STO (Safe Torque Off)

  • Removes torque from motor
  • Does NOT control position
  • Used for: E-STOP, light curtain intrusion

SS1 (Safe Stop 1)

  • Controlled deceleration
  • Then activates STO
  • Used for: Graceful safety stop

SBC (Safe Brake Control)

  • Controls mechanical brake
  • Activates after STO
  • Prevents gravity fall (vertical axes)

Safety Solution Architecture (4 Frameworks)

The APR safety system integrates components from multiple frameworks:

Framework Integration

  1. Beckhoff TwinSAFE - Core safety PLC and I/O
  2. HIWIN E1 STO - Drive-integrated safety
  3. Keyence GL-V - Safety light curtain
  4. ISO 13849 / IEC 62443 - Safety standards compliance

Safety Zones

code
┌─────────────────────────────────────────┐
│              Safety Zone A               │
│  ┌─────────────────────────────────┐    │
│  │        Light Curtain Zone       │    │
│  │   (GL-VM72HP, 1440mm height)    │    │
│  └─────────────────────────────────┘    │
│                                          │
│  ┌─────────────────────────────────┐    │
│  │       Motion Hazard Zone        │    │
│  │  (LMSA13L, 4.2m travel, 9.7m/s) │    │
│  └─────────────────────────────────┘    │
└─────────────────────────────────────────┘

Commissioning Checklist

  • Verify EL1904 input wiring (dual-channel)
  • Configure EL6900 safety program
  • Link EL2904 outputs to E1 STO inputs
  • Test E-STOP function (both channels)
  • Test light curtain response
  • Measure actual response time
  • Verify reset button function
  • Document safety validation

Safety Categories

Safety LevelApplication
SIL 2 / PLdStandard machine safety
SIL 3 / PLeHigh-risk applications

TwinSAFE with EL1904/EL6900/EL2904 supports up to SIL 3 / PLe.

Available References

  • references/framework-integration.md - ASCII blueprint integrating 4 safety frameworks
  • references/github-hosting.md - APR_HiwinLMSA_SafetyGate GitHub hosting plan