Fixed cycle time library namespace issues
This commit is contained in:
@@ -136,7 +136,7 @@
|
||||
</System>
|
||||
<Plc>
|
||||
<Project GUID="{4E62D9E7-436C-457D-8DC4-82D2FEF91C96}" Name="BasicComponents" PrjFilePath="BasicComponents\BasicComponents.plcproj" TmcFilePath="BasicComponents\BasicComponents.tmc" ReloadTmc="true" AmsPort="851" FileArchiveSettings="#x000e" CopyTmcToTarget="true" CopyTpyToTarget="false" SymbolicMapping="true">
|
||||
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcHash="{994AF725-57BD-C8F2-A11E-43E32EDE2B55}" TmcPath="BasicComponents\BasicComponents.tmc">
|
||||
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcHash="{63E07965-E818-C034-FD63-DBA12806D3FA}" TmcPath="BasicComponents\BasicComponents.tmc">
|
||||
<Name>BasicComponents Instance</Name>
|
||||
<CLSID ClassFactory="TcPlc30">{08500001-0000-0000-F000-000000000064}</CLSID>
|
||||
<Vars VarGrpType="2" AreaNo="1">
|
||||
|
||||
Binary file not shown.
@@ -21,7 +21,7 @@
|
||||
<GlobalVersionStructureIncluded>false</GlobalVersionStructureIncluded>
|
||||
<Company>Heisig GmbH</Company>
|
||||
<Title>BaseComponents</Title>
|
||||
<ProjectVersion>1.3.2</ProjectVersion>
|
||||
<ProjectVersion>1.3.3</ProjectVersion>
|
||||
<DefaultNamespace>BC</DefaultNamespace>
|
||||
<Author>M.Heisig</Author>
|
||||
<Description>Basic components fb's (Valves, AI, AO, Motors, etc.)</Description>
|
||||
@@ -112,6 +112,9 @@
|
||||
<Compile Include="POUs\Components\Utilities\FC_HashFNV1a_32Bit.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="POUs\Components\Utilities\F_GetTaskCycleTime.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="POUs\Components\Valves\FB_Valve.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
||||
@@ -33,7 +33,7 @@ END_VAR
|
||||
_xFirstCycle := FALSE;
|
||||
|
||||
// Get current task time
|
||||
_rT := LREAL_TO_REAL(UDINT_TO_LREAL(_TaskInfo[GETCURTASKINDEXEX()].CycleTime) * 1E-7);
|
||||
_rT := F_GetTaskCycleTime();
|
||||
END_IF
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ END_VAR
|
||||
_xFirstCycle := FALSE;
|
||||
|
||||
// Get current task time
|
||||
_rT := LREAL_TO_REAL(UDINT_TO_LREAL(_TaskInfo[GETCURTASKINDEXEX()].CycleTime) * 1E-7);
|
||||
_rT := F_GetTaskCycleTime();
|
||||
|
||||
_rPVLast := rPV;
|
||||
END_IF
|
||||
|
||||
@@ -27,7 +27,7 @@ END_VAR]]></Declaration>
|
||||
_xFirstCycle := FALSE;
|
||||
|
||||
// Get cycle time
|
||||
_rT := LREAL_TO_REAL(UDINT_TO_LREAL(_TaskInfo[GETCURTASKINDEXEX()].CycleTime) * 1E-7);
|
||||
_rT := F_GetTaskCycleTime();
|
||||
END_IF
|
||||
|
||||
// If not enabled output equals input
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<POU Name="F_GetTaskCycleTime" Id="{f260011a-790c-4820-8d51-924daa2b9f5a}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[FUNCTION F_GetTaskCycleTime : REAL]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[F_GetTaskCycleTime := LREAL_TO_REAL(UDINT_TO_LREAL(TwinCAT_SystemInfoVarList._TaskInfo[GETCURTASKINDEXEX()].CycleTime) * 1E-7);]]></ST>
|
||||
</Implementation>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
Reference in New Issue
Block a user