OSCAT Forum
oscat.lib => oscat.lib fuer Step 7 => Thema gestartet von: c3p0 am 10. Februar 2010, 09:01:28
-
Hi,
It seems that the SDT_TO_TOD function is missing a cast. To function properly the .SECOND part of the SDT-structure must be converted to a DINT. The compiler apparently realizes that the other parts must be converted (since they are multiplied by numbers larger than what an INT can hold)...
The correct conversion would be:
SDT_TO_TOD := DINT_TO_TOD(DTI.HOUR * 3600000 + DTI.MINUTE * 60000 + INT_TO_DINT(DTI.SECOND) * 1000 + DTI.MS);
-
Hi c3p0,
thank you! ;)
Greetings Daniel