diff --git a/solution/_Config/IO/PNOZ (EtherCAT).xti b/solution/_Config/IO/PNOZ (EtherCAT).xti
new file mode 100644
index 0000000..956100a
--- /dev/null
+++ b/solution/_Config/IO/PNOZ (EtherCAT).xti
@@ -0,0 +1,576 @@
+
+
+
+ 424de6000000000000007600000028000000100000000e00000001000400000000007000000000000000000000001000000000000000000000001198cb0097a199001c6574005ea5be00596374001487b2005fc9ed0037635f008bd7ed00ffffff0009433f009ebbc0007283830022b4eb003f4d4a00a8ff8aac338338caa8558aa60000004aa82d8aa1116611eaa8ff8aa611e1117aa8ff8aa74777779aa82d8aa77777479aa8c28aa47774579aa8bb8aa44444279aa8bb8aa4dddd2c9aa8bb8aa444442c9aafbb8aa41eeeee7aafbb8aa13eeeee7aaf00faa1111111eaad88daa13333334a
+
+
+ __FILENAME__
+
+
+ Local Area Connection 2 (TwinCAT-Intel PCI Ethernet
+ \DEVICE\{225F8895-47D0-450D-B6DF-ACF28535D923}
+ 000105248854
+
+
+
+ Image
+
+
+ Box (PNOZ m ES EtherCAT)
+ 1000
+
+ 001cc000260001000100000032000001c000001c26010000
+ 001ec000220001000200000032000001c000001e22010000
+ 001113006400010003000000010080001300001164010000
+ 001320002000010004000000000000012000001320010000
+ 0000000000000000001100020100000001000000000000000000000000000000
+ 0000000000000000001300010100000002000000000000000000000000000000
+ 00000000000000000d0800010100000003000000000000000000000000000000
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+ USINT
+
+
+
+
+
+
+
diff --git a/solution/_Config/PLC/tc_project_app.xti b/solution/_Config/PLC/tc_project_app.xti
index 5ee5506..8a9f3fb 100644
--- a/solution/_Config/PLC/tc_project_app.xti
+++ b/solution/_Config/PLC/tc_project_app.xti
@@ -1,7 +1,744 @@
+
+
+ ST_MCCStatusIn
+ IPC, will not change from cabinet to cabinet]]>
+ 16
+
+ bHeartbeat
+ BIT
+
+ 1
+ 0
+
+
+ bEStopOK
+ BIT
+
+ 1
+ 1
+
+
+ bRemote
+ BIT
+
+ 1
+ 2
+
+
+ bFault
+ BIT
+
+ 1
+ 3
+
+
+ bReserved4
+ BIT
+ 1
+ 4
+
+
+ bReserved5
+ BIT
+ 1
+ 5
+
+
+ bReserved6
+ BIT
+ 1
+ 6
+
+
+ bReserved7
+ BIT
+ 1
+ 7
+
+
+ bReserved8
+ BIT
+ 1
+ 8
+
+
+ bReserved9
+ BIT
+ 1
+ 9
+
+
+ bReserved10
+ BIT
+ 1
+ 10
+
+
+ bReserved11
+ BIT
+ 1
+ 11
+
+
+ bReserved12
+ BIT
+ 1
+ 12
+
+
+ bReserved13
+ BIT
+ 1
+ 13
+
+
+ bReserved14
+ BIT
+ 1
+ 14
+
+
+ bReserved15
+ BIT
+ 1
+ 15
+
+
+
+ ST_MCC_CustomStatusIn
+ 16
+
+ bEStopExperimentOK
+ BIT
+
+ 1
+ 0
+
+
+ bEStopOpticsOK
+ BIT
+
+ 1
+ 1
+
+
+ bEStopExternalOK
+ BIT
+
+ 1
+ 2
+
+
+ bReserved19
+ BIT
+ 1
+ 3
+
+
+ bFocusDoorClosed
+ BIT
+ 1
+ 4
+
+
+ bOptCaveInRemote
+ BIT
+
+ 1
+ 5
+
+
+ bFocusChangerPos
+ BIT
+
+ 1
+ 6
+
+
+ bFocusChangerNeg
+ BIT
+
+ 1
+ 7
+
+
+ bChangerStandstill
+ BIT
+ 1
+ 8
+
+
+ bReserved25
+ BIT
+ 1
+ 9
+
+
+ bReserved26
+ BIT
+ 1
+ 10
+
+
+ bReserved27
+ BIT
+ 1
+ 11
+
+
+ bReserved28
+ BIT
+ 1
+ 12
+
+
+ bReserved29
+ BIT
+ 1
+ 13
+
+
+ bReserved30
+ BIT
+ 1
+ 14
+
+
+ bReserved31
+ BIT
+ 1
+ 15
+
+
+
+ ST_SafetyFunctionIn
+ 8
+
+ bEnabled
+ BIT
+ 1
+ 0
+
+
+ bReady
+ BIT
+
+ 1
+ 1
+
+
+ bFault
+ BIT
+
+ 1
+ 2
+
+
+ bStart
+ BIT
+
+ 1
+ 3
+
+
+
+ ST_LEDState
+
+ 8
+
+ bLED_OFAULT
+ BIT
+
+ 1
+ 0
+
+
+ bLED_IFAULT
+ BIT
+
+ 1
+ 1
+
+
+ bLED_FAULT
+ BIT
+
+ 1
+ 2
+
+
+ bLED_DIAG
+ BIT
+
+ 1
+ 3
+
+
+ bLED_RUN
+ BIT
+
+ 1
+ 4
+
+
+ bReserved6
+ BIT
+
+ 1
+ 5
+
+
+ bReserved7
+ BIT
+
+ 1
+ 6
+
+
+ bReserved8
+ BIT
+
+ 1
+ 7
+
+
+
+ ST_PNOZEtherCATIn
+ PLC EtherCAT input data copied from the raw %I* process image.]]>
+ 104
+
+ stMCCStatusIn
+ ST_MCCStatusIn
+
+ 16
+ 0
+
+
+ stMCC_CustomStatusIn
+ ST_MCC_CustomStatusIn
+
+ 16
+ 16
+
+
+ astSafetyFunctionIn
+ ST_SafetyFunctionIn
+
+ 1
+ 8
+
+
+ 64
+ 32
+
+
+ stLEDState
+ ST_LEDState
+
+ 8
+ 96
+
+
+
+ ST_TechnosoftMotionError
+ 16
+
+ bEtherCATCommunicationError
+ BIT
+
+ 1
+ 0
+
+
+ bShortCircuit
+ BIT
+
+ 1
+ 1
+
+
+ bInvalidSetupData
+ BIT
+
+ 1
+ 2
+
+
+ bControlError
+ BIT
+
+ 1
+ 3
+
+
+ bCommunicationError
+ BIT
+
+ 1
+ 4
+
+
+ bFeedbackError
+ BIT
+
+ 1
+ 5
+
+
+ bPositiveLimitSwitchActive
+ BIT
+
+ 1
+ 6
+
+
+ bNegativeLimitSwitchActive
+ BIT
+
+ 1
+ 7
+
+
+ bOverCurrent
+ BIT
+
+ 1
+ 8
+
+
+ bI2TProtection
+ BIT
+
+ 1
+ 9
+
+
+ bMotorOverTemperature
+ BIT
+
+ 1
+ 10
+
+
+ bDriveOverTemperature
+ BIT
+
+ 1
+ 11
+
+
+ bOverVoltage
+ BIT
+
+ 1
+ 12
+
+
+ bUnderVoltage
+ BIT
+
+ 1
+ 13
+
+
+ bCommandError
+ BIT
+
+ 1
+ 14
+
+
+ bSTOActive
+ BIT
+
+ 1
+ 15
+
+
+
+ ARRAY [1..0] OF ST_TechnosoftMotionError
+
+ 0
+ ST_TechnosoftMotionError
+
+ 1
+ 0
+
+
+
+ ST_MCCStatusOut
+ PNOZ, will not change from cabinet to cabinet]]>
+ 16
+
+ bHeartbeat
+ BIT
+
+ 1
+ 0
+
+
+ bReserved1
+ BIT
+ 1
+ 1
+
+
+ bReserved2
+ BIT
+ 1
+ 2
+
+
+ bErrAck
+ BIT
+
+ 1
+ 3
+
+
+ bReserved4
+ BIT
+ 1
+ 4
+
+
+ bReserved5
+ BIT
+ 1
+ 5
+
+
+ bSTOFbk
+ BIT
+ 1
+ 6
+
+
+ bSTO_OK
+ BIT
+ 1
+ 7
+
+
+ bReserved8
+ BIT
+ 1
+ 8
+
+
+ bReserved9
+ BIT
+ 1
+ 9
+
+
+ bReserved10
+ BIT
+ 1
+ 10
+
+
+ bReserved11
+ BIT
+ 1
+ 11
+
+
+ bReserved12
+ BIT
+ 1
+ 12
+
+
+ bReserved13
+ BIT
+ 1
+ 13
+
+
+ bReserved14
+ BIT
+ 1
+ 14
+
+
+ bReserved15
+ BIT
+ 1
+ 15
+
+
+
+ ST_MCC_CustomStatusOut
+ PNOZ, can be customized depending on cabinet]]>
+ 16
+
+ bReserved16
+ BIT
+
+ 1
+ 0
+
+
+ bReserved17
+ BIT
+ 1
+ 1
+
+
+ bReserved18
+ BIT
+ 1
+ 2
+
+
+ bReserved19
+ BIT
+ 1
+ 3
+
+
+ bFocusDoorLocked
+ BIT
+ 1
+ 4
+
+
+ bReserved21
+ BIT
+ 1
+ 5
+
+
+ bChangerMovingPos
+ BIT
+
+ 1
+ 6
+
+
+ bChangerMovingNeg
+ BIT
+
+ 1
+ 7
+
+
+ bReserved24
+ BIT
+ 1
+ 8
+
+
+ bReserved25
+ BIT
+ 1
+ 9
+
+
+ bReserved26
+ BIT
+ 1
+ 10
+
+
+ bReserved27
+ BIT
+ 1
+ 11
+
+
+ bReserved28
+ BIT
+ 1
+ 12
+
+
+ bReserved29
+ BIT
+ 1
+ 13
+
+
+ bReserved30
+ BIT
+ 1
+ 14
+
+
+ bReserved31
+ BIT
+ 1
+ 15
+
+
+
+ ST_SafetyFunctionOut
+ 8
+
+ bDiagOk
+ BIT
+
+ 1
+ 0
+
+
+ bOutput
+ BIT
+
+ 1
+ 1
+
+
+ bRequest
+ BIT
+ 1
+ 2
+
+
+ bDummy
+ BIT
+
+ 1
+ 3
+
+
+
+ ST_PNOZEtherCATOut
+ PNOZ EtherCAT output data mapped to the raw %Q* process image.]]>
+ 96
+
+ stMCCStatusOut
+ ST_MCCStatusOut
+
+ 16
+ 0
+
+
+ stMCC_CustomStatusOut
+ ST_MCC_CustomStatusOut
+
+ 16
+ 16
+
+
+ aSafetyFunctionOut
+ ST_SafetyFunctionOut
+
+ 1
+ 8
+
+
+ 64
+ 32
+
+
+
-
+
tc_project_app Instance
{08500001-0000-0000-F000-000000000064}
@@ -16,6 +753,20 @@
BOOL
+
+ Motion_Safety.fbMotionSafety.stPNOZEtherCATIn
+
+ ST_PNOZEtherCATIn
+
+
+ Motion_Safety.fbMotionSafety.bWcState
+ BOOL
+
+
+ Motion_Safety.fbMotionSafety.astTechnosoftMotionError
+
+ ARRAY [1..0] OF ST_TechnosoftMotionError
+
GVL.nAirPressureSensorGroup1
@@ -45,6 +796,25 @@
BOOL
+
+ Motion_Safety.fbMotionSafety.stPNOZEtherCATOut
+
+ ST_PNOZEtherCATOut
+
+
+ Motion_Safety.fbMotionSafety.bSafetyAcknowledgeLED
+ BOOL
+
+
+ GVL_Safety.bOpticalCaveLED
+
+ BOOL
+
+
+ GVL_Safety.bExperimentCaveLED
+
+ BOOL
+
diff --git a/solution/tc_project_app/DUTs/E_SafetyFunctions.TcDUT b/solution/tc_project_app/DUTs/E_SafetyFunctions.TcDUT
new file mode 100644
index 0000000..71193eb
--- /dev/null
+++ b/solution/tc_project_app/DUTs/E_SafetyFunctions.TcDUT
@@ -0,0 +1,27 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/solution/tc_project_app/DUTs/ST_MCC_CustomStatusIn.TcDUT b/solution/tc_project_app/DUTs/ST_MCC_CustomStatusIn.TcDUT
new file mode 100644
index 0000000..73ea759
--- /dev/null
+++ b/solution/tc_project_app/DUTs/ST_MCC_CustomStatusIn.TcDUT
@@ -0,0 +1,28 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/solution/tc_project_app/DUTs/ST_MCC_CustomStatusOut.TcDUT b/solution/tc_project_app/DUTs/ST_MCC_CustomStatusOut.TcDUT
new file mode 100644
index 0000000..1d0aef9
--- /dev/null
+++ b/solution/tc_project_app/DUTs/ST_MCC_CustomStatusOut.TcDUT
@@ -0,0 +1,29 @@
+
+
+
+ PNOZ, can be customized depending on cabinet
+TYPE ST_MCC_CustomStatusOut :
+STRUCT
+ //Note: This is just an example, move status bits into tc_mca_std_lib make it a UDINT.
+ //Map the bits in specific application code.
+ bReserved16: BIT;
+ bReserved17: BIT;
+ bReserved18: BIT;
+ bReserved19: BIT;
+ bFocusDoorLocked: BIT;
+ bReserved21: BIT;
+ bChangerMovingPos: BIT; //Set if moving in a positive direction
+ bChangerMovingNeg: BIT; //Set if moving in a negative direction
+ bReserved24: BIT;
+ bReserved25: BIT;
+ bReserved26: BIT;
+ bReserved27: BIT;
+ bReserved28: BIT;
+ bReserved29: BIT;
+ bReserved30: BIT;
+ bReserved31: BIT;
+END_STRUCT
+END_TYPE
+]]>
+
+
\ No newline at end of file
diff --git a/solution/tc_project_app/GVLs/GVL_APP.TcGVL b/solution/tc_project_app/GVLs/GVL_APP.TcGVL
index 1c9a49e..174370e 100644
--- a/solution/tc_project_app/GVLs/GVL_APP.TcGVL
+++ b/solution/tc_project_app/GVLs/GVL_APP.TcGVL
@@ -17,6 +17,9 @@ VAR_GLOBAL CONSTANT
fHIGH_LIMIT_AIR_PRESSURE1: REAL := 6; //User defined value in bar for high limit air pressure value for pneumatic axes group 1
fLOW_LIMIT_AIR_PRESSURE2: REAL := 1; //User defined value in bar for low limit air pressure value for pneumatic axes group 2
fHIGH_LIMIT_AIR_PRESSURE2: REAL := 6; //User defined value in bar for high limit air pressure value for pneumatic axes group 2
+
+ nNUM_OF_SAFETY_FUNCTIONS: UINT := 8; //Virtual Output/Input bytes 04..15, each containing 8 bits
+ nNUM_OF_TECHNOSOFT: UINT := 0; //Number of Technosoft axises
END_VAR
]]>
diff --git a/solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Monitoring.TcPOU b/solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Monitoring.TcPOU
index 1af68a5..fe9df9d 100644
--- a/solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Monitoring.TcPOU
+++ b/solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Monitoring.TcPOU
@@ -8,15 +8,16 @@ END_VAR
]]>
,
- aErrorMsg=> ,
- nEcMasterFramesLost=> ,
- nCPULoad=> ,
- fCycleExecTime_ms=> ,
- nAlarmGrpBitNumber=> );
-*)
+//fbCabinetMonitoring(
+// nEcMasterNetId := '10.102.116.36.3.1', //AMS NetId of Device (EtherCAT) from I/Os,
+// iSafetyProvider := Motion_Safety.fbMotionSafety,
+// aErrorID => ,
+// aErrorMsg => ,
+// nEcMasterFramesLost => ,
+// nCPULoad => ,
+// fCycleExecTime_ms => ,
+// nAlarmGrpBitNumber =>
+//);
]]>
diff --git a/solution/tc_project_app/POUs/Application_Specific/Applications/Motion_Safety.TcPOU b/solution/tc_project_app/POUs/Application_Specific/Applications/Motion_Safety.TcPOU
new file mode 100644
index 0000000..3e7023c
--- /dev/null
+++ b/solution/tc_project_app/POUs/Application_Specific/Applications/Motion_Safety.TcPOU
@@ -0,0 +1,31 @@
+
+
+
+
+
+ bMCC_OK,
+ bAxisEnableAllowed => bAxisEnableAllowed,
+ bMCCWatchdogFault => bMCCWatchdogFault);
+
+//Specific Application
+
+
+fbMotionSafety.mWriteOutputs(stSafetyData := stSafety);
+]]>
+
+
+
\ No newline at end of file
diff --git a/solution/tc_project_app/POUs/Application_Specific/Applications/Zone_Monitoring.TcPOU b/solution/tc_project_app/POUs/Application_Specific/Applications/Zone_Monitoring.TcPOU
new file mode 100644
index 0000000..8c70b6d
--- /dev/null
+++ b/solution/tc_project_app/POUs/Application_Specific/Applications/Zone_Monitoring.TcPOU
@@ -0,0 +1,19 @@
+
+
+
+
+
+ ,
+ aErrorMsg =>,
+ nAlarmGrpBitNumber =>);
+]]>
+
+
+
\ No newline at end of file
diff --git a/solution/tc_project_app/tc_project_app.plcproj b/solution/tc_project_app/tc_project_app.plcproj
index 0f497c1..8bcb403 100644
--- a/solution/tc_project_app/tc_project_app.plcproj
+++ b/solution/tc_project_app/tc_project_app.plcproj
@@ -24,6 +24,15 @@
Code
+
+ Code
+
+
+ Code
+
+
+ Code
+
Code
@@ -40,6 +49,9 @@
Code
+
+ Code
+
Code
@@ -49,6 +61,9 @@
Code
+
+ Code
+
Code
@@ -178,18 +193,59 @@
Code
-
Code
-
+
+ Code
+
+
+ Code
+
+
+ Code
+
+
+ Code
+
+
+ Code
+
+
+ Code
+
+
+ Code
+
+
+ Code
+
+
+ Code
+
+
+ Code
+
+
+ Code
+
+
Code
Code
+
+ Code
+
Code
+
+ Code
+
+
+ Code
+
Code
@@ -214,6 +270,9 @@
Code
+
+ Code
+
Code
@@ -229,6 +288,12 @@
Code
+
+ Code
+
+
+ Code
+
Code
@@ -257,11 +322,14 @@
+
+
+