The type conversion chart shows that TIME and LTIME are isolated with no conversions possible either TO or FROM
However there is indeed a TO_TIME function which appears to conflict with the above chart
I am interested in converting the other way to change TIME into INT or REAL in order to do scaling of parameters relative to time intervals.
How might this be achieved ?
Also, I was surprised that I was allowed to define a time value t#-1s
I am curious what the interpretation of minus time is ?
I was using a negative number as an error indication in my code developed in ST on another platform. I am curious about the implementation and implications of equivalent functionality.
I notice that the type conversion is relatively tightly constrained
On this other platform pretty much anything could be converted to anything else.
In the course of codebashing I ended up with a bunch of instances of TO_INT
where the variable was already an INT.
PLCNE views that as not merely a warning but as a hard error.
Anyone have any insights on type conversions involving TIME datatypes
Surely there is some way to do calculations involving TIME variables both as data sources and destinations ?
Hi Kurt,
the help shows that you can convert ANY_INT and it is based on milliseconds. I assume that when you convert something like SINT#-256 it results in TIME#-256ms and vice versa.

Have you tried the SPLIT_TIME function?
It takes a TIME datatype and outputs a ANY_INTs for the individual components.
