-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Added new file and directory general error codes. + Added `F_CreateErrorFromStartRange(...)` + Updated loggers to use `F_CreateErrorFromStartRange`
- Loading branch information
1 parent
8934b1e
commit 7d006ce
Showing
26 changed files
with
120 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TcPlcObject Version="1.1.0.1"> | ||
<POU Name="F_CreateErrorFromStartRange" Id="{d5f028a0-24ee-0f73-1be1-cd20ce46f9c4}" SpecialFunc="None"> | ||
<Declaration><![CDATA[// Create errors with specified parameters and sets the timestamp to the local time from a starting range. | ||
// Some error descriptors have ranges for error codes. | ||
// If the code is 0 an unraised error is created. | ||
FUNCTION F_CreateErrorFromStartRange : T_Error // Instance of created error. | ||
VAR_INPUT | ||
ipDescriptor : I_ErrorDescriptor; // Error descriptor. | ||
StartRange : T_ErrorCode; // Error code starting Range. | ||
Code : T_ErrorCode; // Error code. | ||
END_VAR | ||
VAR | ||
fbMutError : FB_MutableError; | ||
nResult, | ||
nLowResTimestamp : DWORD; | ||
nHighResTimestamp : ULINT; | ||
END_VAR]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[// Get high res. local timestamp. | ||
nResult := SysTimeRtc.SysTimeRtcConvertUtcToLocal( | ||
SysTimeRtc.SysTimeRtcGet(nResult), | ||
nLowResTimestamp); | ||
// Add milliseconds to high res. timestamp. | ||
nHighResTimestamp := TO_ULINT(nLowResTimestamp)*1000 | ||
+ | ||
(TO_ULINT(LTIME()) MOD TO_ULINT(LTIME#1S)) / TO_ULINT(LTIME#1MS); | ||
// Set muttable error. | ||
fbMutError.SetDescriptor(ipDescriptor) | ||
.RaiseError(SEL(Code <> 0, 0, StartRange + Code)) | ||
.SetTimestamp(nHighResTimestamp); | ||
// Return as immutable error. | ||
F_CreateErrorFromStartRange := fbMutError;]]></ST> | ||
</Implementation> | ||
</POU> | ||
</TcPlcObject> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+613 KB
.../_Libraries/beckhoff automation gmbh/tc2_utilities/3.4.8.0/tc2_utilities.compiled-library
Binary file not shown.
Binary file added
BIN
+512 KB
src/FsError_Test/_Libraries/fisothemes/fserror/0.1.0.0/fserror_0.1.0.0.library
Binary file not shown.
Binary file added
BIN
+515 KB
src/FsError_Test/_Libraries/fisothemes/fserror/0.2.0.1/fserror_0.2.0.1.library
Binary file not shown.
Binary file added
BIN
+14.3 KB
src/FsError_Test/_Libraries/system/base interfaces/3.5.2.0/base_itfs.compiled-library
Binary file not shown.
Binary file added
BIN
+52.8 KB
...or_Test/_Libraries/system/cmperrors2 interfaces/3.5.12.0/cmperrors2_itfs.compiled-library
Binary file not shown.
Binary file added
BIN
+92.5 KB
src/FsError_Test/_Libraries/system/sysdir/3.5.12.0/sysdir.compiled-library
Binary file not shown.
Binary file added
BIN
+55.9 KB
src/FsError_Test/_Libraries/system/sysfile/3.5.9.0/sysfile.compiled-library
Binary file not shown.
Binary file added
BIN
+18.7 KB
src/FsError_Test/_Libraries/system/systime/3.5.9.0/systime.compiled-library
Binary file not shown.
Binary file added
BIN
+11.3 KB
src/FsError_Test/_Libraries/system/systimecore/3.5.5.0/systimecore.compiled-library
Binary file not shown.
Binary file added
BIN
+23.7 KB
src/FsError_Test/_Libraries/system/systimertc/3.5.5.0/systimertc.compiled-library
Binary file not shown.
Binary file added
BIN
+12.1 KB
...sError_Test/_Libraries/system/systypes2 interfaces/3.5.4.0/systypes_itfs.compiled-library
Binary file not shown.
Binary file added
BIN
+579 KB
src/FsError_Test/_Libraries/www.tcunit.org/tcunit/1.2.0.0/tcunit.library
Binary file not shown.