Ticket compleated to original specification

The code can read and write all possible PLC Open and Beckhoff
axis parameters it uses the MC_ReadParameter and MC_WriteParameter
function block within FB_Axis. Errors are passed out to the error
handling and it is possible to control it all through MainVisu.
This commit is contained in:
[Luke Nisbet]
2020-02-06 13:38:32 +00:00
parent 13dc7a0ba1
commit bf64da273b
6 changed files with 1162 additions and 212 deletions

View File

@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
# TcXaeShell Solution File, Format Version 11.00
VisualStudioVersion = 15.0.28010.2050
MinimumVisualStudioVersion = 10.0.40219.1
Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "solution", "solution\solution.tsproj", "{9CF97348-B9D3-4938-B1F2-5F0B0B6AA66A}"
EndProject
@@ -33,22 +33,6 @@ Global
{9CF97348-B9D3-4938-B1F2-5F0B0B6AA66A}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64)
{9CF97348-B9D3-4938-B1F2-5F0B0B6AA66A}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86)
{9CF97348-B9D3-4938-B1F2-5F0B0B6AA66A}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86)
{FB261665-FD20-4BF2-97F8-2854C82B752D}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7)
{FB261665-FD20-4BF2-97F8-2854C82B752D}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7)
{FB261665-FD20-4BF2-97F8-2854C82B752D}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2)
@@ -65,8 +49,26 @@ Global
{FB261665-FD20-4BF2-97F8-2854C82B752D}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64)
{FB261665-FD20-4BF2-97F8-2854C82B752D}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86)
{FB261665-FD20-4BF2-97F8-2854C82B752D}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86)
{F935F1DE-0753-4702-B418-1DC0ED040A4D}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86)
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3F42AC3D-5210-4834-8C00-062CE02B7502}
EndGlobalSection
EndGlobal

File diff suppressed because it is too large Load Diff

View File

@@ -10,16 +10,36 @@
<v n="TextDefault">"%2.2f"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"165"</v>
<v n="TextDefault">"%2.3f"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"543"</v>
<v n="TextDefault">"%2.4f"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"878"</v>
<v n="TextDefault">"%d"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"294"</v>
<v n="TextDefault">"%f"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"706"</v>
<v n="TextDefault">"%i"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"821"</v>
<v n="TextDefault">"%s"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"940"</v>
<v n="TextDefault">"%x"</v>
@@ -105,6 +125,11 @@
<v n="TextDefault">"bResetDone"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"693"</v>
<v n="TextDefault">"bSet"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"944"</v>
<v n="TextDefault">"bWarning"</v>
@@ -195,6 +220,16 @@
<v n="TextDefault">"gearOut"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"566"</v>
<v n="TextDefault">"homeSensorNeg"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"677"</v>
<v n="TextDefault">"homeSensorPos"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"711"</v>
<v n="TextDefault">"Inactive:"</v>
@@ -240,6 +275,11 @@
<v n="TextDefault">"Overflows:"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"993"</v>
<v n="TextDefault">"Read"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"942"</v>
<v n="TextDefault">"reset"</v>
@@ -260,6 +300,11 @@
<v n="TextDefault">"toggle"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
<o>
<v n="TextID">"445"</v>
<v n="TextDefault">"Write"</v>
<l n="LanguageTexts" t="ArrayList" />
</o>
</l>
<l n="Languages" t="ArrayList" />
<v n="GuidInit">{062c6d5a-aca0-4f82-8481-8e26e8c8681e}</v>

View File

@@ -55,7 +55,7 @@ VAR PERSISTENT
bRestoreOnStartup : BOOL;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[fbUPS(eUpsMode := eUpsMode); (* call UPS-FB instance in first lines of the fastest PLC Task *)
<ST><![CDATA[(*fbUPS(eUpsMode := eUpsMode); (* call UPS-FB instance in first lines of the fastest PLC Task *)
IF eGlobalSUpsState = eSUPS_PowerFailure THEN
(* first cycle of powerfailure *)
@@ -67,7 +67,7 @@ ELSIF eGlobalSUpsState > eSUPS_PowerFailure THEN
(* next cycles of powerfailure *)
(* skip regular code execution for the remaining cycles of the powerfailure/writing of persistent data/quick shutdown ... *)
RETURN;
END_IF
END_IF*)
RESTORE_POSITIONS();
PROG();

View File

@@ -29,6 +29,9 @@
<Compile Include="POUs\MAIN.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\E_AxisParameters.TcTLEO">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\DUTs\RestorePosition.TcDUT">
<SubType>Code</SubType>
</Compile>
@@ -352,8 +355,8 @@
<ProjectExtensions>
<PlcProjectOptions>
<XmlArchive>
<Data>
<o xml:space="preserve" t="OptionKey">
<Data>
<o xml:space="preserve" t="OptionKey">
<v n="Name">"&lt;ProjectRoot&gt;"</v>
<d n="SubKeys" t="Hashtable" ckt="String" cvt="OptionKey">
<v>{192FAD59-8248-4824-A8DE-9177C94C195A}</v>
@@ -404,15 +407,15 @@
</d>
<d n="Values" t="Hashtable" />
</o>
</Data>
<TypeList>
<Type n="Boolean">System.Boolean</Type>
<Type n="Hashtable">System.Collections.Hashtable</Type>
<Type n="Int32">System.Int32</Type>
<Type n="OptionKey">{54dd0eac-a6d8-46f2-8c27-2f43c7e49861}</Type>
<Type n="String">System.String</Type>
</TypeList>
</XmlArchive>
</Data>
<TypeList>
<Type n="Boolean">System.Boolean</Type>
<Type n="Hashtable">System.Collections.Hashtable</Type>
<Type n="Int32">System.Int32</Type>
<Type n="OptionKey">{54dd0eac-a6d8-46f2-8c27-2f43c7e49861}</Type>
<Type n="String">System.String</Type>
</TypeList>
</XmlArchive>
</PlcProjectOptions>
</ProjectExtensions>
</Project>