From 37bd88b23f62ae20323d454e28cf7edab61aa991 Mon Sep 17 00:00:00 2001 From: tongju12 Date: Mon, 16 Sep 2024 10:31:20 -0700 Subject: [PATCH 1/3] giving a new pa1k4-out position and add st1k4 veto --- plc-tmo-motion/_Config/PLC/tmo_motion.xti | 2 +- plc-tmo-motion/plc-tmo-motion.tsproj | 2 +- .../DUTs/ENUM_Sample_Calibration_States.TcDUT | 6 +- .../tmo_motion/POUs/PRG_3_PMPS_POST.TcPOU | 12 +-- .../tmo_motion/POUs/PRG_PA1K4_PF.TcPOU | 8 +- plc-tmo-motion/tmo_motion/tmo_motion.tmc | 92 +++++++++---------- 6 files changed, 63 insertions(+), 59 deletions(-) diff --git a/plc-tmo-motion/_Config/PLC/tmo_motion.xti b/plc-tmo-motion/_Config/PLC/tmo_motion.xti index 5c2c72e..ae56d2c 100644 --- a/plc-tmo-motion/_Config/PLC/tmo_motion.xti +++ b/plc-tmo-motion/_Config/PLC/tmo_motion.xti @@ -1260,7 +1260,7 @@ External Setpoint Generation: - + tmo_motion Instance {08500001-0000-0000-F000-000000000064} diff --git a/plc-tmo-motion/plc-tmo-motion.tsproj b/plc-tmo-motion/plc-tmo-motion.tsproj index fa9d653..2b5ef36 100644 --- a/plc-tmo-motion/plc-tmo-motion.tsproj +++ b/plc-tmo-motion/plc-tmo-motion.tsproj @@ -16,8 +16,8 @@ {57BD9670-089D-434A-85CF-90A857EE0EFF} {66689887-CCBD-452C-AC9A-039D997C6E66} {3EBB9639-5FF3-42B6-8847-35C70DC013C8} - {E008E3C8-6BD9-491C-B673-DC45CC7AA4F1} {520DE751-9DB6-47CB-8240-BD5C466E7E64} + {E008E3C8-6BD9-491C-B673-DC45CC7AA4F1} diff --git a/plc-tmo-motion/tmo_motion/DUTs/ENUM_Sample_Calibration_States.TcDUT b/plc-tmo-motion/tmo_motion/DUTs/ENUM_Sample_Calibration_States.TcDUT index 517693a..a6d63f9 100644 --- a/plc-tmo-motion/tmo_motion/DUTs/ENUM_Sample_Calibration_States.TcDUT +++ b/plc-tmo-motion/tmo_motion/DUTs/ENUM_Sample_Calibration_States.TcDUT @@ -1,5 +1,5 @@  - + diff --git a/plc-tmo-motion/tmo_motion/POUs/PRG_PA1K4_PF.TcPOU b/plc-tmo-motion/tmo_motion/POUs/PRG_PA1K4_PF.TcPOU index ac85f1d..e5ac1a1 100644 --- a/plc-tmo-motion/tmo_motion/POUs/PRG_PA1K4_PF.TcPOU +++ b/plc-tmo-motion/tmo_motion/POUs/PRG_PA1K4_PF.TcPOU @@ -20,7 +20,7 @@ VAR pa1k4_enumGet: ENUM_Sample_Calibration_States; fbStateSetup: FB_StateSetupHelper; stDefault: ST_PositionState :=( - fDelta :=0.5, + fDelta :=2.0, fVelocity := 1.0, bMoveOk := TRUE, bValid := TRUE @@ -35,12 +35,14 @@ END_VAR - + ST_System @@ -19263,21 +19263,6 @@ contributing fast faults, unless the FFO is currently vetoed. - - USINT (USINT#1..255) - 8 - USINT - - - LowerBorder - 1 - - - UpperBorder - 255 - - - E_IPCDiag_Datatype parameter datatype 1..15 @@ -20886,7 +20871,7 @@ contributing fast faults, unless the FFO is currently vetoed. nParameterIdx - USINT (USINT#1..255) + USINT (1..255) 8 @@ -24747,7 +24732,7 @@ contributing fast faults, unless the FFO is currently vetoed. - UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) 16 UINT @@ -24761,6 +24746,21 @@ contributing fast faults, unless the FFO is currently vetoed. + + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + 16 + UINT + + + LowerBorder + 1 + + + UpperBorder + 1000 + + + FB_AdsTestResultLogger @@ -24778,7 +24778,7 @@ contributing fast faults, unless the FFO is currently vetoed. PrintingTestSuiteResultNumber - UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 192 @@ -24816,12 +24816,12 @@ contributing fast faults, unless the FFO is currently vetoed. TestsInTestSuiteCounter - UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) 16 MaxNumberOfTestsToPrint - UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) 16 @@ -25754,7 +25754,7 @@ contributing fast faults, unless the FFO is currently vetoed. WritingTestSuiteResultNumber - UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 530752 @@ -26156,21 +26156,6 @@ contributing fast faults, unless the FFO is currently vetoed. - - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) - 16 - UINT - - - LowerBorder - 1 - - - UpperBorder - 100 - - - U_ExpectedOrActual 4096 @@ -27794,7 +27779,7 @@ contributing fast faults, unless the FFO is currently vetoed. NumberOfTestsToAnalyse - UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 @@ -29329,7 +29314,7 @@ contributing fast faults, unless the FFO is currently vetoed. NumberOfTestsToAnalyse - UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 @@ -29914,7 +29899,7 @@ contributing fast faults, unless the FFO is currently vetoed. NumberOfTestsToAnalyse - UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 @@ -30362,7 +30347,7 @@ contributing fast faults, unless the FFO is currently vetoed. NumberOfTestsToAnalyse - UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 @@ -30736,7 +30721,7 @@ contributing fast faults, unless the FFO is currently vetoed. NumberOfTestsToAnalyse - UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 @@ -58333,6 +58318,14 @@ second version of targets paddle 2 Target5 6 + + Target6 + 7 + + + Target7 + 8 + qualified_only @@ -100443,7 +100436,7 @@ second version of targets paddle 2 We do this by defining an array, in where we can see which current TEST_ORDERED() is the one to be handled right now. The below array is only used for TEST_ORDERED()-tests. 16000 - UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) 1 1000 @@ -102038,7 +102031,6 @@ second version of targets paddle 2 PRG_3_PMPS_POST.bM1K1Veto - bST1K4_Veto: BOOL; 8 BOOL 685524560 @@ -102068,7 +102060,7 @@ second version of targets paddle 2 .fDelta - 0.5 + 2 .fVelocity @@ -104504,6 +104496,12 @@ second version of targets paddle 2 697617856 + + PRG_3_PMPS_POST.bST1K4_Veto + 8 + BOOL + 697655984 + 4 @@ -104595,11 +104593,11 @@ second version of targets paddle 2 ChangeDate - 2024-08-29T14:17:28 + 2024-09-13T14:16:06 GeneratedCodeSize - 1282048 + 1220608 GlobalDataSize From 9f4b6b89d0bd5db8c806ab4ac69598f9daee401c Mon Sep 17 00:00:00 2001 From: tongju12 Date: Tue, 17 Sep 2024 10:12:01 -0700 Subject: [PATCH 2/3] editing sp1k4-flow meter PV --- plc-tmo-motion/_Config/PLC/tmo_motion.xti | 2 +- plc-tmo-motion/plc-tmo-motion.tsproj | 2 +- .../tmo_motion/POUs/PRG_SP1K4.TcPOU | 2 +- plc-tmo-motion/tmo_motion/tmo_motion.tmc | 221 ++++++++++-------- 4 files changed, 121 insertions(+), 106 deletions(-) diff --git a/plc-tmo-motion/_Config/PLC/tmo_motion.xti b/plc-tmo-motion/_Config/PLC/tmo_motion.xti index ae56d2c..d7fb35b 100644 --- a/plc-tmo-motion/_Config/PLC/tmo_motion.xti +++ b/plc-tmo-motion/_Config/PLC/tmo_motion.xti @@ -1260,7 +1260,7 @@ External Setpoint Generation: - + tmo_motion Instance {08500001-0000-0000-F000-000000000064} diff --git a/plc-tmo-motion/plc-tmo-motion.tsproj b/plc-tmo-motion/plc-tmo-motion.tsproj index 2b5ef36..fa9d653 100644 --- a/plc-tmo-motion/plc-tmo-motion.tsproj +++ b/plc-tmo-motion/plc-tmo-motion.tsproj @@ -16,8 +16,8 @@ {57BD9670-089D-434A-85CF-90A857EE0EFF} {66689887-CCBD-452C-AC9A-039D997C6E66} {3EBB9639-5FF3-42B6-8847-35C70DC013C8} - {520DE751-9DB6-47CB-8240-BD5C466E7E64} {E008E3C8-6BD9-491C-B673-DC45CC7AA4F1} + {520DE751-9DB6-47CB-8240-BD5C466E7E64} diff --git a/plc-tmo-motion/tmo_motion/POUs/PRG_SP1K4.TcPOU b/plc-tmo-motion/tmo_motion/POUs/PRG_SP1K4.TcPOU index 274335a..1866dc2 100644 --- a/plc-tmo-motion/tmo_motion/POUs/PRG_SP1K4.TcPOU +++ b/plc-tmo-motion/tmo_motion/POUs/PRG_SP1K4.TcPOU @@ -120,7 +120,7 @@ VAR SP1K4_ATT_RTD_02 : FB_CC_TempSensor; {attribute 'TcLinkTo' := '.iRaw := TIIB[EP3174-FWM-E2]^AI Standard Channel 2^Value'} - {attribute 'pytmc' :='pv: SP1K4'} + {attribute 'pytmc' :='pv: TMO:SPEC'} fbFlowMeter: FB_FDQ_FlowMeter; END_VAR ]]> diff --git a/plc-tmo-motion/tmo_motion/tmo_motion.tmc b/plc-tmo-motion/tmo_motion/tmo_motion.tmc index bf6d65c..ce182b9 100644 --- a/plc-tmo-motion/tmo_motion/tmo_motion.tmc +++ b/plc-tmo-motion/tmo_motion/tmo_motion.tmc @@ -1,5 +1,5 @@ - + ST_System @@ -19263,6 +19263,21 @@ contributing fast faults, unless the FFO is currently vetoed. + + USINT (USINT#1..255) + 8 + USINT + + + LowerBorder + 1 + + + UpperBorder + 255 + + + E_IPCDiag_Datatype parameter datatype 1..15 @@ -20871,7 +20886,7 @@ contributing fast faults, unless the FFO is currently vetoed. nParameterIdx - USINT (1..255) + USINT (USINT#1..255) 8 @@ -24732,7 +24747,7 @@ contributing fast faults, unless the FFO is currently vetoed. - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) + UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) 16 UINT @@ -24746,21 +24761,6 @@ contributing fast faults, unless the FFO is currently vetoed. - - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) - 16 - UINT - - - LowerBorder - 1 - - - UpperBorder - 1000 - - - FB_AdsTestResultLogger @@ -24778,7 +24778,7 @@ contributing fast faults, unless the FFO is currently vetoed. PrintingTestSuiteResultNumber - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 192 @@ -24816,12 +24816,12 @@ contributing fast faults, unless the FFO is currently vetoed. TestsInTestSuiteCounter - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) + UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) 16 MaxNumberOfTestsToPrint - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) + UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) 16 @@ -25754,7 +25754,7 @@ contributing fast faults, unless the FFO is currently vetoed. WritingTestSuiteResultNumber - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 530752 @@ -26156,6 +26156,21 @@ contributing fast faults, unless the FFO is currently vetoed. + + UINT (1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) + 16 + UINT + + + LowerBorder + 1 + + + UpperBorder + 100 + + + U_ExpectedOrActual 4096 @@ -27779,7 +27794,7 @@ contributing fast faults, unless the FFO is currently vetoed. NumberOfTestsToAnalyse - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 @@ -29314,7 +29329,7 @@ contributing fast faults, unless the FFO is currently vetoed. NumberOfTestsToAnalyse - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 @@ -29899,7 +29914,7 @@ contributing fast faults, unless the FFO is currently vetoed. NumberOfTestsToAnalyse - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 @@ -30347,7 +30362,7 @@ contributing fast faults, unless the FFO is currently vetoed. NumberOfTestsToAnalyse - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 @@ -30721,7 +30736,7 @@ contributing fast faults, unless the FFO is currently vetoed. NumberOfTestsToAnalyse - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestSuites) + UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestSuites) 16 @@ -92622,7 +92637,7 @@ second version of targets paddle 2 TcVarGlobal - 685524584 + 685524592 GVL_PMPS.PMPS_ST4K4_OUT @@ -92641,7 +92656,7 @@ second version of targets paddle 2 TcVarGlobal - 685524592 + 685524600 PRG_3_PMPS_POST.fbArbiterIO.q_stRequestedBP @@ -100436,7 +100451,7 @@ second version of targets paddle 2 We do this by defining an array, in where we can see which current TEST_ORDERED() is the one to be handled right now. The below array is only used for TEST_ORDERED()-tests. 16000 - UINT (1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) + UINT (UINT#1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite) 1 1000 @@ -101823,7 +101838,7 @@ second version of targets paddle 2 pytmc - pv: SP1K4 + pv: TMO:SPEC 679653632 @@ -102030,23 +102045,29 @@ second version of targets paddle 2 685524544 - PRG_3_PMPS_POST.bM1K1Veto + PRG_3_PMPS_POST.bST1K4_Veto 8 BOOL 685524560 - PRG_3_PMPS_POST.bM1K3Veto + PRG_3_PMPS_POST.bM1K1Veto 8 BOOL 685524568 - PRG_3_PMPS_POST.bST4K4_Veto + PRG_3_PMPS_POST.bM1K3Veto 8 BOOL 685524576 + + PRG_3_PMPS_POST.bST4K4_Veto + 8 + BOOL + 685524584 + PRG_PA1K4_PF.fbStateSetup 92032 @@ -103647,21 +103668,6 @@ second version of targets paddle 2 TcVarGlobal - 697564160 - - - Constants.bSimulationMode - Does the target support multiple cores? - 8 - BOOL - - false - - - - TcVarGlobal - - 697564168 @@ -103725,12 +103731,12 @@ second version of targets paddle 2 697564240 - Constants.nRegisterSize + Constants.bSimulationMode Does the target support multiple cores? - 16 - WORD + 8 + BOOL - 64 + false @@ -103740,48 +103746,49 @@ second version of targets paddle 2 697564304 - Constants.nPackMode + Constants.bFPUSupport Does the target support multiple cores? - 16 - UINT + 8 + BOOL - 8 + true TcVarGlobal - 697564320 + 697564312 - Constants.bFPUSupport + Constants.nRegisterSize Does the target support multiple cores? - 8 - BOOL + 16 + WORD - true + 64 TcVarGlobal - 697564336 + 697564320 - Constants.bMulticoreSupport - 8 - BOOL + Constants.nPackMode + Does the target support multiple cores? + 16 + UINT - false + 8 TcVarGlobal - 697564344 + 697564336 Constants.RuntimeVersionNumeric @@ -103814,9 +103821,23 @@ second version of targets paddle 2 697564384 - TwinCAT_SystemInfoVarList._AppInfo - 2048 - PlcAppSystemInfo + Constants.bMulticoreSupport + 8 + BOOL + + false + + + + TcVarGlobal + + + 697564416 + + + TwinCAT_SystemInfoVarList._TaskPouOid_PlcTask + 32 + OTCID no_init @@ -103825,16 +103846,12 @@ second version of targets paddle 2 TcVarGlobal - 697564416 + 697564448 - TwinCAT_SystemInfoVarList._TaskInfo - 1024 - PlcTaskSystemInfo - - 1 - 1 - + TwinCAT_SystemInfoVarList._AppInfo + 2048 + PlcAppSystemInfo no_init @@ -103843,12 +103860,16 @@ second version of targets paddle 2 TcVarGlobal - 697566464 + 697564480 - TwinCAT_SystemInfoVarList._TaskPouOid_PlcTask - 32 - OTCID + TwinCAT_SystemInfoVarList._TaskInfo + 1024 + PlcTaskSystemInfo + + 1 + 1 + no_init @@ -103857,7 +103878,7 @@ second version of targets paddle 2 TcVarGlobal - 697567488 + 697566528 TwinCAT_SystemInfoVarList._TaskOid_PlcTask @@ -103871,7 +103892,7 @@ second version of targets paddle 2 TcVarGlobal - 697567520 + 697567552 TwinCAT_SystemInfoVarList.__PlcTask @@ -103892,7 +103913,7 @@ second version of targets paddle 2 TcVarGlobal - 697567552 + 697567616 TC_EVENT_CLASSES.TcSystemEventClass @@ -103964,7 +103985,7 @@ second version of targets paddle 2 TcVarGlobal - 697583936 + 697584000 TC_EVENT_CLASSES.TcGeneralAdsEventClass @@ -104036,7 +104057,7 @@ second version of targets paddle 2 TcVarGlobal - 697584064 + 697584128 TC_EVENT_CLASSES.TcRouterEventClass @@ -104108,7 +104129,7 @@ second version of targets paddle 2 TcVarGlobal - 697584192 + 697584256 TC_EVENT_CLASSES.TcRTimeEventClass @@ -104180,7 +104201,7 @@ second version of targets paddle 2 TcVarGlobal - 697584320 + 697584384 TC_EVENT_CLASSES.Win32EventClass @@ -104252,7 +104273,7 @@ second version of targets paddle 2 TcVarGlobal - 697584448 + 697584512 TC_EVENT_CLASSES.LCLSGeneralEventClass @@ -104324,7 +104345,7 @@ second version of targets paddle 2 TcVarGlobal - 697584576 + 697584640 TC_EVENT_CLASSES.TcIPCDiagEventClass @@ -104396,7 +104417,7 @@ second version of targets paddle 2 TcVarGlobal - 697584704 + 697584768 TC_EVENT_CLASSES.TcIPCDiagPlcApiEventClass @@ -104468,7 +104489,7 @@ second version of targets paddle 2 TcVarGlobal - 697584832 + 697584896 TC_EVENTS.LCLSGeneralEventClass @@ -104494,13 +104515,7 @@ second version of targets paddle 2 TcVarGlobal - 697617856 - - - PRG_3_PMPS_POST.bST1K4_Veto - 8 - BOOL - 697655984 + 697617920 @@ -104593,11 +104608,11 @@ second version of targets paddle 2 ChangeDate - 2024-09-13T14:16:06 + 2024-09-17T09:59:11 GeneratedCodeSize - 1220608 + 1282048 GlobalDataSize From 4ad5287ea95b296f79060f63ba1e28884b7e4182 Mon Sep 17 00:00:00 2001 From: tongju12 Date: Tue, 17 Sep 2024 11:45:43 -0700 Subject: [PATCH 3/3] removing comments for MR1K3 veto before we add it in --- plc-tmo-motion/tmo_motion/POUs/PRG_3_PMPS_POST.TcPOU | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plc-tmo-motion/tmo_motion/POUs/PRG_3_PMPS_POST.TcPOU b/plc-tmo-motion/tmo_motion/POUs/PRG_3_PMPS_POST.TcPOU index e7f0fdb..54974c1 100644 --- a/plc-tmo-motion/tmo_motion/POUs/PRG_3_PMPS_POST.TcPOU +++ b/plc-tmo-motion/tmo_motion/POUs/PRG_3_PMPS_POST.TcPOU @@ -21,7 +21,7 @@ bM1K1Veto := NOT PMPS_GVL.stCurrentBeamParameters.aVetoDevices[PMPS.K_Stopper.MR bM1K3Veto := NOT PMPS_GVL.stCurrentBeamParameters.aVetoDevices[PMPS.K_Stopper.MR1K3_OUT] AND PMPS_GVL.stCurrentBeamParameters.aVetoDevices[PMPS.K_Stopper.MR1K3_IN]; -// Adding TXI MR1K3 veto in + fbArbiterIO( i_bVeto:=bST3K4_Veto OR bM1K1Veto OR bST1K4_Veto, Arbiter:=fbArbiter,