I have some BasicLabels displaying the month/date/year hour:minute (and some with :second). I want to show the day/time in the PLC to match logs in it, not use the computer day/time that may be off. Also, I can click on each label and enter a correct time to write to the PLC.
I don't like the display when the time is say 1: 3: 5, I want it to show 1:03:05. What I am doing now is setting 3 bits in the PLC if the hour, minute or second are 0-9 and using them as visibility bits for 6 labels.
I have 2 for hour - one showing the 2 digit value if the bit is NOT, and one showing the one digit value with a '0' prefix if the bit is on. Sort of a clunky way of doing it.
Is there a property for BasicLabel that if it is a single digit, or less than a specified value, a prefix is added?
If it was a specified value then adding a prefix or suffux may be usable for applications other than time - temperature, pressure, level, flow, pH, etc.