Skip to content

Commit

Permalink
Fixes #14
Browse files Browse the repository at this point in the history
  • Loading branch information
bengeisler committed Nov 21, 2023
1 parent 39d9be9 commit 899198c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/TcLogProj/TcLog/Utils/AnyToString.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ VAR_INPUT
data : ANY;
END_VAR
VAR
_anyInt : POINTER TO INT;
_anyReal : POINTER TO REAL;
_anyLReal : POINTER TO LREAL;
_anyDateAndTime : POINTER TO DATE_AND_TIME;
Expand All @@ -22,7 +23,11 @@ VAR
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[IF data.TypeClass = __SYSTEM.TYPE_CLASS.TYPE_REAL THEN
<ST><![CDATA[IF data.TypeClass = __SYSTEM.TYPE_CLASS.TYPE_INT THEN
_anyInt := data.pValue;
AnyToString := INT_TO_STRING(_anyInt^);
ELSIF data.TypeClass = __SYSTEM.TYPE_CLASS.TYPE_REAL THEN
_anyReal := data.pValue;
AnyToString := REAL_TO_STRING(_anyReal^);
Expand Down

0 comments on commit 899198c

Please sign in to comment.