Virtuino Forum
custom format for value display - Printable Version

+- Virtuino Forum (https://virtuino.com/forum)
+-- Forum: Virtuino (https://virtuino.com/forum/forumdisplay.php?fid=1)
+--- Forum: Virtuino IoT (https://virtuino.com/forum/forumdisplay.php?fid=2)
+--- Thread: custom format for value display (/showthread.php?tid=219)



custom format for value display - MasterTom - 06-05-2022

Hello Friends,
I converted the HMI of my coffee roaster from Virtuino V6 to Virtuino IoT. There is a display showing a time code. The minutes and the seconds are transfered in separated variables. I´m searching for a way to add a leading "0" to the seconds when the value is one digit only (e.g. 07 instead of 7). In V6 it was possible to use a custom format in the value display. In VIoT I can´t find an option for that purpose. Did I miss something?

Thomas


RE: custom format for value display - iliaslamprou - 06-06-2022

Hi Thomas,

it is complicated. I think I have to add a new option to the value display for this case 

Check this video:
https://virtuino.com/forum/images_examples/dateDisplay.mov


RE: custom format for value display - MasterTom - 06-07-2022

Hello Ilias,
If I understand correctly I can change my software to send the time in seconds instead of seconds and minutes. Then I use the date converter to convert the format from ss to mmConfuseds. The value display can show this format. I do not have to take care about leading zeros. I think this is a very good solution for my problem. I will implement it latest next weekend.


RE: custom format for value display - MasterTom - 06-07-2022

Hello Ilias,
I found a solution even without changing my Arduino code. I'm using your math script to calculate the seconds using 60*minutes + seconds. In a second step I use the date converter to convert ss to mmConfuseds. This can be displayer by the value displayer perfectly.