Hi everybody,
is there a smart way to set date + time of the CPU via mappview? in my beloved visual components it was so easy, just set system time directly with a component.
Now there are 2 widgets, datetime input and output but I don’t understand why they are there if they can’t set the system time directly.
I just would like a widget where I set the current date+time and then it shows the new value, as any component of that type.
From what I understand, the only way to do it would be via code: when the value of datetime picker changes, set the system time via DTsetTime and then continuously call DTgetTime to show it. But it does not seem so efficient.
I would expect that PLC where mappView server runs has a same system time like a client (synchronized to NTP server e.g.) and then it is enough if you just show in visualization system time of client. So you do not need to read cyclically PLC time. You are right that if you would like to change system time on PLC side, you have to bind DateTime variable and call respective function to change the time. It is not done automatically.
the NTP client (display connected via ethernet) will automatically sync with that time?
This would be perfect, I’d just need to set the PLC time once.
But I don’t see how to show the system time of the client via mapp view directly without using code, the only available value is
which does not look like the current system time…
thank you for adding your code.
this is more or less what I’m doing right now, but I thought there would be a quicker way directly from mappview.
I find really frustrating that B&R upgraded the HMI design by moving to mappview and still make things so much complicated than with visual components. Setting/viewing system time was just 1 click!