Merged in MBP-265-add-bmoving-and-temp-to-visu (pull request #86)

MBP-265 add bmoving and temp to visu
This commit is contained in:
Federico Rojas
2023-12-12 11:27:56 +00:00
7 changed files with 49 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<TcSmItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.beckhoff.com/schemas/2012/07/TcSmProject" TcSmVersion="1.0" TcVersion="3.1.4024.32" ClassName="CNestedPlcProjDef">
<Project GUID="{FB261665-FD20-4BF2-97F8-2854C82B752D}" Name="tc_project_app" PrjFilePath="..\..\tc_project_app\tc_project_app.plcproj" TmcFilePath="..\..\tc_project_app\tc_project_app.tmc" ReloadTmc="true" AmsPort="852" FileArchiveSettings="#x000e" SymbolicMapping="true">
<Instance Id="#x08502040" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcPath="tc_project_app\tc_project_app.tmc" TmcHash="{4D60DAD6-60EF-E84B-B0BE-6EF31A5C5743}">
<Instance Id="#x08502040" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcPath="tc_project_app\tc_project_app.tmc" TmcHash="{F0CA46F3-5A8F-BEBD-EF65-56E870AEF64B}">
<Name>tc_project_app Instance</Name>
<CLSID ClassFactory="TcPlc30">{08500001-0000-0000-F000-000000000064}</CLSID>
<Contexts>

View File

@@ -130,6 +130,11 @@
<v n="TextDefault">"bGeared"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"902"</v>
<v n="TextDefault">"bHighTempAxisDisabled"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"948"</v>
<v n="TextDefault">"bHomed"</v>
@@ -140,6 +145,11 @@
<v n="TextDefault">"bCommandAborted"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"509"</v>
<v n="TextDefault">"bHWMaskActive"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"183"</v>
<v n="TextDefault">"bInterlock"</v>
@@ -155,6 +165,11 @@
<v n="TextDefault">"bInVeloit"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"386"</v>
<v n="TextDefault">"bMoving"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"485"</v>
<v n="TextDefault">"bMovingExtend"</v>
@@ -210,6 +225,16 @@
<v n="TextDefault">"eHomeDirect"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"302"</v>
<v n="TextDefault">"eHomeToBlock_Bwd"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"1049"</v>
<v n="TextDefault">"eHomeToBlock_Fwd"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"198"</v>
<v n="TextDefault">"eHomeToEncPulse_Bwd"</v>
@@ -315,6 +340,11 @@
<v n="TextDefault">"fAcceleration"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"730"</v>
<v n="TextDefault">"fActualTemp"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"956"</v>
<v n="TextDefault">"fDeceleration"</v>

View File

@@ -3,7 +3,8 @@
<POU Name="Application_Template" Id="{4bdeebc0-15d8-4790-97d0-e9c4239d121c}" SpecialFunc="None">
<Declaration><![CDATA[PROGRAM Application_Template
VAR
//Define all necessary variables for your application
//Define all necessary variables for your application
END_VAR
]]></Declaration>
<Implementation>

View File

@@ -12,19 +12,23 @@ END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[//Initial parameters of an Axis
(*IF _TaskInfo[fbGetCurTaskIndex.index].FirstCycle THEN
(* Uncomment the next IF statement to configure and activate the intial parameters of the axis
IF _TaskInfo[fbGetCurTaskIndex.index].FirstCycle THEN
//Axis description for EPICS PV
GVL.astAxes[1].stDescription.sAxisName := 'MotorApplication1';
GVL.astAxes[1].stDescription.eUnit := E_AxisEngUnit.eMeter;
GVL.astAxes[1].stDescription.nPrefix := -3;
GVL.astAxes[x].stDescription.sAxisName := 'MotorApplication1';
GVL.astAxes[x].stDescription.eUnit := E_AxisEngUnit.eMeter;
GVL.astAxes[x].stDescription.nPrefix := -3;
//Initial default values:
GVL.astAxes[1].stConfig.eHomeSeq := 0;
GVL.astAxes[1].stConfig.fHomePosition := 0.0;
GVL.astAxes[1].stConfig.fHomeFinishDistance := 0.0;
GVL.astAxes[1].stConfig.eRestorePosition := E_RestorePosition.eRestoreWithoutHome;
END_IF*)
GVL.astAxes[x].stConfig.eHomeSeq := 0;
GVL.astAxes[x].stConfig.fHomePosition := 0.0;
GVL.astAxes[x].stConfig.fHomeFinishDistance := 0.0;
GVL.astAxes[x].stConfig.eRestorePosition := E_RestorePosition.eRestoreWithoutHome;
GVL.astAxes[x].stConfig.bEnableTemperatureDisable := FALSE;
GVL.astAxes[x].stConfig.fMaxTemperature := 0.0;
END_IF
*)
//Define ACTIONS() or write exclusive code for an specific axis.
(*Eg. Stop when temperature reaches certain values, reduce speed if a signal is activated, etc.
Eg. GVL.astAxes[x].stControl.bInterlockFwd := NOT bInterlockFwdOK;*)

View File

@@ -109,11 +109,11 @@ GVL.fbGetCurTaskIndex();
//Create as many programs in that folder as axes and applications you have or need
//Axes initial parameters and program
//Axis_Template();
Axis_Template();
//Pneumatics_Template();
//Application program calls
//Application_Template();
Application_Template();
]]></ST>
</Implementation>
</Action>

View File

@@ -131,9 +131,6 @@
<Compile Include="tc_mca_std_lib\GVLs\GVL.TcGVL">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\FB_AxisTemperature.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\FB_ESSMonitoring.TcPOU">
<SubType>Code</SubType>
</Compile>