diff --git a/solution/_Config/PLC/tc_project_app.xti b/solution/_Config/PLC/tc_project_app.xti index 5ee5506..30b5ff4 100644 --- a/solution/_Config/PLC/tc_project_app.xti +++ b/solution/_Config/PLC/tc_project_app.xti @@ -1,11 +1,59 @@ + + + AMSNETID + 48 + BYTE + + 0 + 6 + + + %d.%d.%d.%d.%d.%d + [0] + [1] + [2] + [3] + [4] + [5] + + + + + + AMSNETID + 48 + BYTE + + 0 + 6 + + + %d.%d.%d.%d.%d.%d + [0] + [1] + [2] + [3] + [4] + [5] + + + - + tc_project_app Instance {08500001-0000-0000-F000-000000000064} PlcTask Inputs + + MAIN.aEtherCATMasterNetId + AMSNETID + + + MAIN.aEtherCATMasterNetId + AMSNETID + Safety_Shutter.bPSSPermit1 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..f8efc1f 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 @@ -2,6 +2,9 @@ , - aErrorMsg=> , - nEcMasterFramesLost=> , - nCPULoad=> , - fCycleExecTime_ms=> , - nAlarmGrpBitNumber=> ); + nEcMasterNetId := sEtherCATMasterNetId, //AMS NetId of Device (EtherCAT) from I/Os + aErrorID => , + aErrorMsg => , + nEcMasterFramesLost => , + nCPULoad => , + fCycleExecTime_ms => , + nAlarmGrpBitNumber => ); *) ]]> diff --git a/solution/tc_project_app/POUs/MAIN.TcPOU b/solution/tc_project_app/POUs/MAIN.TcPOU index ffc8e43..6286bc2 100644 --- a/solution/tc_project_app/POUs/MAIN.TcPOU +++ b/solution/tc_project_app/POUs/MAIN.TcPOU @@ -21,7 +21,7 @@ VAR bRestoreExecute: BOOL := FALSE; nReadEncRefSysRetry: UINT := 0; //Counts number of retries to read encoder reference system nCheckRestoreRetry: UINT := 0; //Counts number of retries to restore axis position or position bias - iAxes: UINT; //Index for, for-loops in position recovery actions + iCnt: UINT; //Index for various for-loops iCurrentAxis: UINT := 1; //Index for position recovery actions (not in for loops) afbReadPositionBias: ARRAY [1..GVL_APP.nAXIS_NUM] OF MC_ReadParameter; @@ -32,6 +32,11 @@ VAR fbGetDeviceIdentification: FB_GetDeviceIdentificationEx; dtAtStartup: DT; + + {attribute 'TcLinkTo' := 'TIID^KF200-EC1 (EtherCAT Device)^InfoData^AmsNetId'} + aEtherCATMasterNetId AT%I*: AMSNETID; + sEtherCATMasterNetId: T_AmsNetId; + nTestNum: UINT := 0; //Variable used in ESS's FAT_SAT_tools scripts to keep track of the test number //Read position at a specific time interval @@ -46,7 +51,8 @@ END_VAR ]]> - eSUPS_PowerOK THEN //Next cycles of powerfailure //Skip regular code execution for the remaining cycles of the powerfailure/writing of persistent data/quick shutdown... END_IF +]]> + + + + + @@ -125,8 +152,8 @@ END_IF - -