Hello coopdegrace;
There is no canned function to do this directly, but you can use a trick:
Use FC40 TIM_S5TI (From the IEC_blocks library)
Description
The function FC40 converts the data type format TIME to the format S5TIME. The value is rounded down during conversion. If the input parameter is greater than the S5TIME format allows (greater than TIME#02:46:30.000), the result S5TIME#999.3 is output and the binary result (BR) bit of the status word is set to "0".
Now, the TIME datatype is basically a 32-bit integer that contains the millesconds corresponding to your time value. So, for a REAL value of 1.5 (hours), the corresponding TIME value would be 1.5h * 3600 s/h* 1000 ms/s = 5,400,000 ms. This TIME value can be converted to a S5Time value using FC40.
Start by converting the REAL time value to ms in a register defined as a TIME variable, then use FC40 on that variable; the result (as long as it remains within the limits of a S5Time varable) will be in S5Time format.
Hope this helps,
Daniel Chartier