Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
880f081
MBP-388: Add DUTs related to MCC_SafetyFunctions
aslanliafichev May 18, 2026
bb191dd
MBP-388: Update MAIN to include Safety call
aslanliafichev May 18, 2026
85d608c
MBP-388: Fix double square brackets
aslanliafichev May 18, 2026
0b08f72
MBP-388: Fix pipeline
aslanliafichev May 18, 2026
b201a39
MBP-388 Rename DUT to E_SafetyFunctions
aslanliafichev May 20, 2026
546b07c
MBP-388 Add DUT LED state
aslanliafichev May 20, 2026
da0e568
MBP-388 Cleanup DUTs
aslanliafichev May 20, 2026
9bb5827
MBP-388 Add GVL_SafetyIO
aslanliafichev May 20, 2026
ee23141
MBP-388: Add DUT to handle PNOZ EtherCAT info
aslanliafichev May 20, 2026
1f4ead6
MBP-388: Add DUT for linking PNOZ EtherCAT info
aslanliafichev May 20, 2026
82802c2
MBP-388 Add PNOZ DUTs
aslanliafichev May 20, 2026
4922087
MBP-388: Add DUTs for Safety Function mapping
aslanliafichev May 20, 2026
f63d9b7
MBP-388: Add ST_Safety DUT
aslanliafichev May 20, 2026
3e49f71
MBP-388 Add helper functions
aslanliafichev May 20, 2026
f6c27ac
MBP-388: Add FB_MotionSafety
aslanliafichev May 20, 2026
74f573f
MBP-388: Fix double square brackets
aslanliafichev May 20, 2026
d38258e
MBP-388: Change indexing for E_SafetyFunctions
aslanliafichev May 21, 2026
8f33d3c
MBP-388: Cleanup DUTs
aslanliafichev May 21, 2026
2f69ee7
MBP-388: Remove raw input/output layer
aslanliafichev May 21, 2026
8cdfe9e
MBP-388: Remove functions
aslanliafichev May 21, 2026
82ad5cd
MBP-388: Clean up motion safety
aslanliafichev May 21, 2026
5884657
MBP-388: Map using references
aslanliafichev May 22, 2026
059ab18
MBP-388: Change to directly copying data
aslanliafichev May 22, 2026
4601a1c
MBP-388: Fix whitespace
aslanliafichev May 22, 2026
43f4b10
MBP-388: Add files to solution
aslanliafichev May 22, 2026
3cafb9e
MBP-388: Update generic safety code
aslanliafichev Jul 14, 2026
45f80e9
MBP-388: Fix whitespace
aslanliafichev Jul 14, 2026
be7ea5c
MBP-388: Update tc_project_app
aslanliafichev Sep 8, 2026
7d6d940
MBP-388: Add interface I_SafetyProvider
aslanliafichev Sep 8, 2026
8a9f0c4
MBP-388: Cleanup and fix whitespace
aslanliafichev Sep 8, 2026
e868ada
MBP-388: Add zone monitoring and safety provider
aslanliafichev Sep 8, 2026
d9a19a1
MBP-388: Refactor Motion_Safety into methods
aslanliafichev Sep 8, 2026
6e493fa
MBP-388: Add Zone_Monitoring
aslanliafichev Sep 8, 2026
a939fea
MBP-388: Double square brackets
aslanliafichev Sep 8, 2026
dd92119
MBP-388: Update tc_generic structure
aslanliafichev Sep 10, 2026
d2da91e
MBP-388: Update to defualt config
aslanliafichev Sep 11, 2026
a5203d6
MBP-388: Fix index and whitespace
aslanliafichev Sep 11, 2026
0f07354
MBP-388: Update tc_project_app.xti
aslanliafichev Sep 11, 2026
804e69e
MBP-388: Update tc_project_app.plcproj
aslanliafichev Sep 11, 2026
509c427
MBP-388: Update to follow coding standard
aslanliafichev Sep 11, 2026
09a14ba
MBP-388: Fix whitespace
aslanliafichev Sep 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
576 changes: 576 additions & 0 deletions solution/_Config/IO/PNOZ (EtherCAT).xti

Large diffs are not rendered by default.

772 changes: 771 additions & 1 deletion solution/_Config/PLC/tc_project_app.xti

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions solution/tc_project_app/DUTs/E_SafetyFunctions.TcDUT
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1">
<DUT Name="E_SafetyFunctions" Id="{67cba4a1-d914-0ba8-3f98-b5150a554ddf}">
<Declaration><![CDATA[{attribute 'qualified_only'}
{attribute 'strict'}
(*
Central definition of safety functions includes for a motion control cabinet.
Add new safety functions to match the incoming safety functions from the PNOZmulti 2.
Each safety function represents 4-bits of information. However the PLC still stores the incoming 4-bits
into 1-byte.
*)
TYPE E_SafetyFunctions :
(
//Note: This is just an example
eNone,
eEStop,
ePSSAccess,
eStartExp,
eStartOpt,
eMFStop,
eMFEnable,
eReserved
);
END_TYPE
]]></Declaration>
</DUT>
</TcPlcObject>
28 changes: 28 additions & 0 deletions solution/tc_project_app/DUTs/ST_MCC_CustomStatusIn.TcDUT
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1">
<DUT Name="ST_MCC_CustomStatusIn" Id="{3047c094-43cd-0281-2261-d5308c49a667}">
<Declaration><![CDATA[TYPE ST_MCC_CustomStatusIn :
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.
bEStopExperimentOK: BIT; //The experiment cave, bitEStopOK (MCC5)
bEStopOpticsOK: BIT; //The Optics cave, bitEStopOK (MCC3)
bEStopExternalOK: BIT; //The Selene Guides, bitEStopOK (MCC4) = bitEStopOK (MCC3) AND bitEStopOK (MCC5)
bReserved19: BIT;
bFocusDoorClosed: BIT;
bOptCaveInRemote: BIT; //Allow requests to jog focus changer from NICOS
bFocusChangerPos: BIT; //Request Changer move positive
bFocusChangerNeg: BIT; //Request Changer move negative
bChangerStandstill: BIT;
bReserved25: BIT;
bReserved26: BIT;
bReserved27: BIT;
bReserved28: BIT;
bReserved29: BIT;
bReserved30: BIT;
bReserved31: BIT;
END_STRUCT
END_TYPE
]]></Declaration>
</DUT>
</TcPlcObject>
29 changes: 29 additions & 0 deletions solution/tc_project_app/DUTs/ST_MCC_CustomStatusOut.TcDUT
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1">
<DUT Name="ST_MCC_CustomStatusOut" Id="{6d8ad02a-be6f-0232-209b-380247c69933}">
<Declaration><![CDATA[//Status information specific to the cabinet IPC --> 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
]]></Declaration>
</DUT>
</TcPlcObject>
3 changes: 3 additions & 0 deletions solution/tc_project_app/GVLs/GVL_APP.TcGVL
Original file line number Diff line number Diff line change
Expand Up @@ -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
]]></Declaration>
</GVL>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[//Cabinet monitoring
(*fbCabinetMonitoring(
nEcMasterNetId:= , //AMS NetId of Device (EtherCAT) from I/Os
aErrorID=> ,
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 =>
//);
]]></ST>
</Implementation>
</POU>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1">
<POU Name="Motion_Safety" Id="{2cc620d0-4324-0fec-1587-9760faae60d9}" SpecialFunc="None">
<Declaration><![CDATA[PROGRAM Motion_Safety
VAR
fbMotionSafety: FB_MotionSafety;
stSafety: ST_Safety;
bMCC_OK: BOOL;
bAxisEnableAllowed: BOOL;

bMCCWatchdogFault: BOOL;

//Specific Application
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[fbMotionSafety(
bEnable := TRUE,
stSafety := stSafety,
bMCC_OK => bMCC_OK,
bAxisEnableAllowed => bAxisEnableAllowed,
bMCCWatchdogFault => bMCCWatchdogFault);

//Specific Application


fbMotionSafety.mWriteOutputs(stSafetyData := stSafety);
]]></ST>
</Implementation>
</POU>
</TcPlcObject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1">
<POU Name="Zone_Monitoring" Id="{2b0d7b86-187f-0bc2-2f54-f64dd930b8f4}" SpecialFunc="None">
<Declaration><![CDATA[PROGRAM Zone_Monitoring
VAR
fbZoneMonitoring: FB_ZoneMonitoring;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[fbZoneMonitoring(
iSafetyProvider := Motion_Safety.fbMotionSafety,
stSafety := Motion_Safety.stSafety,
aErrorID =>,
aErrorMsg =>,
nAlarmGrpBitNumber =>);
]]></ST>
</Implementation>
</POU>
</TcPlcObject>
72 changes: 70 additions & 2 deletions solution/tc_project_app/tc_project_app.plcproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
<Compile Include="DUTs\E_CPUType.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="DUTs\E_SafetyFunctions.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="DUTs\ST_MCC_CustomStatusIn.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="DUTs\ST_MCC_CustomStatusOut.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="GlobalTextList.TcGTLO">
<SubType>Code</SubType>
</Compile>
Expand All @@ -40,6 +49,9 @@
<Compile Include="POUs\Application_Specific\Applications\Cabinet_Monitoring.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="POUs\Application_Specific\Applications\Motion_Safety.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="POUs\Application_Specific\Applications\Slit_Template.TcPOU">
<SubType>Code</SubType>
</Compile>
Expand All @@ -49,6 +61,9 @@
<Compile Include="POUs\Application_Specific\Applications\Shutter_Operator_Panel.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="POUs\Application_Specific\Applications\Zone_Monitoring.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="POUs\Application_Specific\Axes\Axis_Template.TcPOU">
<SubType>Code</SubType>
</Compile>
Expand Down Expand Up @@ -178,18 +193,59 @@
<Compile Include="tc_mca_std_lib\DUTs\E_SlitPairStates.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\ST_MonitoringAlarm.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\E_MotionFunctions.TcDUT">
<Compile Include="tc_mca_std_lib\DUTs\Safety\I_SafetyProvider.TcIO">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\Safety\PNOZ\ST_LEDState.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\Safety\PNOZ\ST_MCCStatusIn.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\Safety\PNOZ\ST_MCCStatusOut.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\Safety\PNOZ\ST_PNOZCommDiag.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\Safety\PNOZ\ST_PNOZEtherCATIn.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\Safety\PNOZ\ST_PNOZEtherCATOut.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\Safety\PNOZ\ST_SafetyFunctionIn.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\Safety\PNOZ\ST_SafetyFunctionOut.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\Safety\ST_Safety.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\Safety\ST_SafetyIn.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\Safety\ST_SafetyOut.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\ST_McStatus.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\ST_TechnosoftMotionError.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\GVLs\GVL.TcGVL">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\GVLs\GVL_Safety.TcGVL">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\FB_PulseGenerator.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Monitoring\FB_ESSMonitoringBase.TcPOU">
<SubType>Code</SubType>
</Compile>
Expand All @@ -214,6 +270,9 @@
<Compile Include="tc_mca_std_lib\POUs\Monitoring\FB_ESSMonitoringMCU6001b.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Monitoring\FB_ZoneMonitoring.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Motion\FB_Axis.TcPOU">
<SubType>Code</SubType>
</Compile>
Expand All @@ -229,6 +288,12 @@
<Compile Include="tc_mca_std_lib\POUs\Pneumatics\FB_PneumaticAxis.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Safety\FB_MotionSafety.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Safety\F_TechnosoftErrorActive.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\VISUs\CoEParamTextList.TcTLO">
<SubType>Code</SubType>
</Compile>
Expand Down Expand Up @@ -257,11 +322,14 @@
<Folder Include="POUs\Application_Specific\Applications" />
<Folder Include="POUs\Application_Specific\Axes" />
<Folder Include="tc_mca_std_lib\DUTs\Axis_Structures" />
<Folder Include="tc_mca_std_lib\DUTs\Safety" />
<Folder Include="tc_mca_std_lib\DUTs\Pneumatics" />
<Folder Include="POUs\Application_Specific\Applications" />
<Folder Include="POUs\Application_Specific\Axes" />
<Folder Include="tc_mca_std_lib\DUTs\Safety\PNOZ" />
<Folder Include="tc_mca_std_lib\POUs\Motion\Homing" />
<Folder Include="tc_mca_std_lib\POUs\Monitoring" />
<Folder Include="tc_mca_std_lib\POUs\Safety" />
<Folder Include="tc_mca_std_lib\POUs\Pneumatics" />
<Folder Include="tc_mca_std_lib\VISUs" />
<Folder Include="tc_mca_std_lib" />
Expand Down
Loading