28.12.2019, 19:08 (This post was last modified: 28.12.2019, 19:10 by Tokatubs.)
(28.12.2019, 15:00)Auzzii Wrote: Hello,
what is best way to make virtual object for time input for scada. I need it to be 08:00 instead of 8:0 (image in attachment)
Tnx,
Code:
123456789101112131415161718192021222324
-- get current data as tablenow = os.date('*t')
-- system week day starts from sunday, convert it to knx formatwday = now.wday == 1and7ornow.wday - 1-- time tabletime = {
day = wday,
hour = now.hour,
minute = now.min,
second = now.sec,
}
-- date tabledate = {
day = now.day,
month = now.month,
year = now.year,
}
-- write to busgrp.write('9/0/8', time, dt.time)
grp.write('9/0/9', date, dt.date)
Post as resident script. Then modify adresses as you choose. Then time is 10. 3 byte and date is 11. 3 byte.
what is best way to make virtual object for time input for scada. I need it to be 08:00 instead of 8:0 (image in attachment)
Tnx,
Code:
123456789101112131415161718192021222324
-- get current data as tablenow = os.date('*t')
-- system week day starts from sunday, convert it to knx formatwday = now.wday == 1and7ornow.wday - 1-- time tabletime = {
day = wday,
hour = now.hour,
minute = now.min,
second = now.sec,
}
-- date tabledate = {
day = now.day,
month = now.month,
year = now.year,
}
-- write to busgrp.write('9/0/8', time, dt.time)
grp.write('9/0/9', date, dt.date)
Post as resident script. Then modify adresses as you choose. Then time is 10. 3 byte and date is 11. 3 byte.
Hi, i have no problem with script.
But user input in scada. In one fild user want input hours from 00 to 24 and in other minutes 00 to 60.
31.12.2019, 08:25 (This post was last modified: 31.12.2019, 08:59 by Erwin van der Zwart.)
Ja Hi,
Just use the object type 10 (3 byte time/day) that is designed for this type of input, if you don’t want the day input you can hide it with css.
I would do this kind of input for heating mode in another way, create a schedule button and a widget with the iframe to a scheduler that controls the heating mode, this way you can make several switching times instread of the 2 static (from-to) times you now have designed in the visu. Use custom values to set the comfort/standby/night modes as text instead of 1,2,3 etc.
The scheduler can control the heating mode directly without the need of any scripting (:
(31.12.2019, 08:25)Erwin van der Zwart Wrote: Ja Hi,
Just use the object type 10 (3 byte time/day) that is designed for this type of input, if you don’t want the day input you can hide it with css.
I would do this kind of input for heating mode in another way, create a schedule button and a widget with the iframe to a scheduler that controls the heating mode, this way you can make several switching times instread of the 2 static (from-to) times you now have designed in the visu. Use custom values to set the comfort/standby/night modes as text instead of 1,2,3 etc.
The scheduler can control the heating mode directly without the need of any scripting (:
02.01.2020, 16:54 (This post was last modified: 02.01.2020, 16:58 by Erwin van der Zwart.)
Hi,
You don’t need 2 widgets, all actions on your current widget are related to from-to times for comfort, standby mode etcetera, all you need is a scheduler to do that.
So the current widget must only hold the frame to the scheduler and there you set the from-to times for each mode. Your current widget layout can be dropped.
With CSS you could even match the colors of the scheduler page to the same colors as used in the visu.