From f0dff8ea56e0584960a700816e157abace2c59b9 Mon Sep 17 00:00:00 2001 From: SCooper Date: Wed, 13 Jul 2022 11:30:28 +0100 Subject: [PATCH] multi gearing logic improved. Status logic changed to array of pointers for easier scaling. Homing added --- solution/_Config/NC/NC.xti | 1 + solution/_Config/PLC/tc_project_app.xti | 2 +- solution/tc_project_app/POUs/MAIN.TcPOU | 19 +++++++++++++++++++ solution/tc_project_app/tc_mca_std_lib | 2 +- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/solution/_Config/NC/NC.xti b/solution/_Config/NC/NC.xti index 4198911..2017d23 100644 --- a/solution/_Config/NC/NC.xti +++ b/solution/_Config/NC/NC.xti @@ -1425,6 +1425,7 @@ External Setpoint Generation: Axis 1 + diff --git a/solution/_Config/PLC/tc_project_app.xti b/solution/_Config/PLC/tc_project_app.xti index 407b10e..d4a8d92 100644 --- a/solution/_Config/PLC/tc_project_app.xti +++ b/solution/_Config/PLC/tc_project_app.xti @@ -965,7 +965,7 @@ External Setpoint Generation: - + tc_project_app Instance {08500001-0000-0000-F000-000000000064} diff --git a/solution/tc_project_app/POUs/MAIN.TcPOU b/solution/tc_project_app/POUs/MAIN.TcPOU index 899cfd5..03737b6 100644 --- a/solution/tc_project_app/POUs/MAIN.TcPOU +++ b/solution/tc_project_app/POUs/MAIN.TcPOU @@ -98,6 +98,18 @@ Axis_Template(); //Application program calls //Application_Template(); + +IF astAxes[1].stStatus.fActPosition > 50 THEN + astAxes[1].stInputs.bLimitFwd := FALSE; +ELSE + astAxes[1].stInputs.bLimitFwd := TRUE; +END_IF + +IF astAxes[1].stStatus.fActPosition < -5 THEN + astAxes[1].stInputs.bLimitBwd := FALSE; +ELSE + astAxes[1].stInputs.bLimitBwd := TRUE; +END_IF ]]> @@ -265,6 +277,13 @@ END_FOR]]> + + + + + + + diff --git a/solution/tc_project_app/tc_mca_std_lib b/solution/tc_project_app/tc_mca_std_lib index a51213c..e4547af 160000 --- a/solution/tc_project_app/tc_mca_std_lib +++ b/solution/tc_project_app/tc_mca_std_lib @@ -1 +1 @@ -Subproject commit a51213ca1368444f4ce1bca951d5d2f2adc8ac5f +Subproject commit e4547afd3176ab1eba1d126d4921e4bc83072d17