This sections provides a guide to configure the PLC for the AIP application.
For more information, please also review the corresponding folder in the AIP MS Teams Team: IRAS Students/General/01-IRAS_Wiki/2-Projects/2.1-Automated_Item_Picking/20_Beckhoff_PLC/
Especially, pay attention to the official manufacturer descriptions stored in IRAS Students/General/01-IRAS_Wiki/2-Projects/2.1-Automated_Item_Picking/20_Beckhoff_PLC/Manufacturer documentation
-
Load the necessary device description files of the used components per manufacturer
Note: Please pay attention to use the correct file storage location enabling the TwinCAT Shell to read them in correctly
C:\TwinCAT\3.1\Config\Io\EtherCATThe interface to the KUKA KR10 KR C4 robot requires the EL6695-1001
File: KUKA_EL6695sec.xml -
Establish network connection from your PC to the PLC
-
Connect your pc with a LAN cable directly to the PLC
-
Search for the hidden TwinCAT XAE symbol within your tab bar
-
Right click the TwinCAT XAE symbol
-
Click "Router/Routes editieren"
-
Broadcast Search for your PLC
-
Choose the PLC by selecting it
-
Add Route to the PLC
-
For the current valid IP address can be found in the specific markdown file of this repository. It shall be:
IP: 10.181.116.66 Username: Administrator Password: 1
-
-
-
Start the PLC in configuration mode
-
Option 1: Use the existing project
- Download the running AIP TwinCAT application project from the folder in the AIP MS Teams Team
- Make your desired adjustments to your local copy of the standard AIP TwinCAT Application project
Note: The following steps are only necessary if no project exists yet or if you want to make changes.
-
Option 2: Create new project package
-
Create new TwinCAT project package ("TwinCAT Project")
-
Load the IOs by using the integrate scan function
-
Verify that the automatic scan has detected all physical available IOsw
- Status "OP" is necessary
-
Check the input/output signals currently present
- Select terminal, select module, select corresponding channel
- Necessary tab: Online
-
-
Create a new safety project
Note: This section is only related to the yellow PLC safety terminals. It has to be connected at least one safety terminal.
-
Create new safety project part
-
Create TwinSafeGroup
- Parameterisation of the individual modules
-
Import the necessary alias devices from the current IO configuration
-
FSOE address must match the one of the KUKA control (default: 8504)
-
Check the process images
-
Choose the device
-
Tab: Safety Parameters
-
e.g. EL1904:
- Using the Sick LiDAR Scanner MicroScan3 Core I/O with OSSD requires the following setting for channel 3 + 4:
-
The similiar must be done for the KUKA robot part. (see given TwinCAT project)
-
-
Check the target system
-
Create a SafeEstop building block by drag and drop from the toolbox
-
Name the explicit inputs and outputs with your variable name
-
Map the variables to the corresponding channels of the modules or further variables used
-
Input side:
- NotHalt CHA to EL1901 Channel 1 - NotHalt CHB to EL1901 Channel 2 - Sick_LIDAR_CHA to EL1901 Channel 3 - Sick_LIDAR_CHB to EL1901 Channel 4Note: It requires a logical connection of the safety stops as channel A and B need to react at the same time when the button is pressed. Even if one component is damaged, the safety is not allowed to be endangered. Consequently the control must trigger an error if a signal is not detected directly (low demand system).
-
Output side:
EStopOut = NotHalt_OK = SafetyRoboterNote: To communicate with the KUKA KR10 robot, the process image must from Beckhoff PLC and KUKA KR C4 control must match. If you want to e.g. set status lamps, it is necessary to report to a variable im regular PLC part.
-
-
Set the input of the regular PLC part.
-
Set the outputs to the PLC
-
Insert a function block "safeDecouple" from the toolbox and configure it to have the E-Stop of the SmartPad available in the "normal" PLC. For this create an alias device and map it with the function block.
-
-
Load the configuration on the physical safety modules
-
Save the complete project
-
- Parameterisation of the individual modules
-
-
Create new standard PLC project
Note: It is a separated project which is able to receive inputs from the safety part
-
Use a right click on the "PLC" / "SPS" icon and select "Add new item"
-
Create programmble object units (POUs)
-
PRG_Safety
-
Read Inputs-/ Ouputs of the safety PLC
Note: Outputs of Safety PLC are inputs of the standard PLC.
FBError AT%I*: BOOL; COMError AT%I*: BOOL; NotHalt_OK AT%I*: BOOL;
-
-
How to enable the acknowledgment via the external control panel?
-
Create a variable for the acknowledgement of the function group error "GrpErrAck" as output to the safety PLC
-
Create a variable for the restart after the start up "RestartNH" as output to the safety PLC
-
Create the variable "TasterReset" as input on the standard PLC and link it with the hardware module
-
Create logical link in the executable programm code
GrpErrAck := TasterReset; RestartNH := TasterReset;
-
-
Set status lamp for operating status display
// Reset FBs GrpErrAck := TasterReset; RestartNH := TasterReset; // Lamp GREEN IF NotHalt_OK = TRUE THEN LampeNotHalt_OK := NotHalt_OK; LampeNotHalt_NOK:= FALSE; LampeNotHalt_ACK := FALSE; TasterResetLampe := FALSE; Luefter_ON := TRUE; // Lamp YELLOW ELSIF InputNotHaltCHA AND InputNotHaltCHB AND InputLidarCHA AND InputLidarCHB AND NotHalt_SmartPad = TRUE THEN LampeNotHalt_ACK := TRUE; TasterResetLampe := TRUE; LampeNotHalt_NOK:= FALSE; LampeNotHalt_OK := FALSE; Luefter_ON := TRUE; // Lamp RED ELSIF NotHalt_OK = FALSE THEN LampeNotHalt_NOK:= NOT NotHalt_OK; LampeNotHalt_OK := FALSE; LampeNotHalt_ACK := FALSE; TasterResetLampe := FALSE; Luefter_ON := FALSE; END_IF
-
Use the input from the safety PLC signal for "NotHalt_OK" as output from the function module
-
Create project map to instanciate the variables
-
Use the tab: "Erstellen" // "Create" => "Projektmappe erstellen" // "Create project map"
-
Set the output to the lamps
-
Review the defined variables name in the upper section of the PRG_Safety POU
LampeNotHalt_OK AT%Q* : BOOL; // Green lamp LampeNotHalt_ACK AT%Q* : BOOL; // Orange lamp LampeNotHalt_NOK AT%Q* : BOOL; // Red lamp
-
Connect them to the physical hardware in the IO topology (e.g. "LampeNotHalt_OK")
- Create logical link in the executable programme code
LampeNotHalt_OK := NotHalt_OK; (see screenshot above) -
-
Connect the PLC variables with the physical inputs / outputs
-
Take the correct channels of the terminals from the valid circuit diagram
-
Search for the correct input/ output terminals in the IO structure
-
Inputs: e.g. InputNotHaltCHA
-
Besides the other input signals from the safety related components, the signal from channel A of the safety stop ("NotHalt") will queried in a if condition to set the status lamps.
-
To generate a hardware feedback, the PLC variable has to be mapped to the corresponding output.
- In this case, the InputNotHaltCHA has to be mapped to terminal EL1904 InputChannel1
- Search for the corresponding terminal and channel in the IO topology
-
-
Outputs: e.g. TasterResetLamp
- The blue lamp shall light up if it is necessary to acknowledge after a safety stop was triggered. It is necessary to provide active human feedback so that the application can resume operation.
-
-
-
Adjust the process image of the KUKA KR C4 module in the IO structure
-
Select the box of the KR C4 in the tab "Slots"
-
Module 2 (Safety Data (8 Byte)); TxPDO - FSOE (Inputs) and RxPDO - FSOE must match the process image to the Beckhoff PLC
- Verify the process image with the alias device one in the safety PLC
- Select the inputs / outputs of the module EL6900
-
-
Transfer configuration to the PLC
- By pressing "Konfiguration aktivieren" // "Activate configuration" on the top left corner of the TwinCAT UI
- Note: To load the configuration, please verify that your PLC is in configuration mode.
- Remote access to the device manager can be enabled by using the CERHOST programm.
- It is located in the following folder of the AIP MS Teams Team
- For trouble shooting if license error occurs, see Troubleshooting
- Monitor the online status of the PLC module
- Select the TwinSafeGroup
- Click "TwinSAFE/Online Daten anzeigen"
- Restart from the PLC
- Select SPS
- Click "POU/PRG_Safety/Einloggen" (via the green symbol)
- Set the values for the variables as prepared value
- Transfer the prepared values via write







