Technical FAQs

Ask a Question

How to convert integer value to time in unity safety

In Unity pro safety v7.0 use S_UDINT_TO_***: Type Conversion block for converting UDINT value to Time variable. 

Time(in BCD) value is stored in below System words in Unity Safety Plc:
%SW49: day of the week:
1 = Monday,
2 = Tuesday,
3 = Wednesday,
4 = Thursday,
5 = Friday,
6 = Saturday,
7 = Sunday,
%SW50: Seconds (16#SS00),
%SW51: Hours and Minutes (16#HHMM),
%SW52: Month and Day (16#MMDD),
%SW53: Year (16#YYYY).
These words are managed by the system when the bit %S50 is set to 0.
These words can be written by the user program or by the terminal when the bit %S50 is set to 1.
Was this helpful?
What can we do to improve the information ?