Logic Machine Forum
Options button Mosaic 2 - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Options button Mosaic 2 (/showthread.php?tid=2687)



Options button Mosaic 2 - Tokatubs - 12.06.2020

Hi

I choose the option button in Mosaic. And set the values options 1-4. With values 500-600-700-800.
But when loaded and i try to use the mosaic, the value returned is everytime 400. It could be a smaller value, since lowest setpoint in the thermostat is 400.

What am i doing wrong. 


.pdf   Co2 set.pdf (Size: 13.04 KB / Downloads: 21)



RE: Options button Mosaic 2 - Daniel - 12.06.2020

Feadback in this case is not needed when you use the same object.
Check what value you have in your object as this only display corresponding value


RE: Options button Mosaic 2 - Tokatubs - 12.06.2020

Checked now in objects log. Button sends 1-2-3-4 instead of the choices 500-600-700-800. 
Therefore the value returns 400 which is minimum in the thermostat..


RE: Options button Mosaic 2 - admin - 12.06.2020

This is correct: left side (before |) is value, right side is display text. You need this instead:
Code:
500 | 500
600 | 600
700 | 700
800 | 800



RE: Options button Mosaic 2 - Daniel - 12.06.2020

If you want the value to send 500.600... then you have to do it other way around. This is simple enumeration.
500 | 1
600 | 2

If you want to display 500 and send 500 then do it like 500 | 500 ...
It goes back to minimum as you send them 1,2,3,4 so thermostat is sending minimum value back.


RE: Options button Mosaic 2 - Tokatubs - 12.06.2020

Fixed it in the value, which of course was wrong. 
But when choosing 600 and 800 both send this value as setpoint. 
When sending 700, value shown in objects value is 699.52 and then the value is not shown as the chosen one in option button. 
500 also shown as 499.84. Why is this.?


RE: Options button Mosaic 2 - Daniel - 12.06.2020

This is a problem of KNX floating objects. With higher values they do this. KNX org screw this as they assumet this will be used only for temp. The only work around is to use an integer object for this control and then you will have to convert it via script to floating object if you need this format on thermostat..


RE: Options button Mosaic 2 - Tokatubs - 12.06.2020

Learn a bit everyday  Cool

Yes its a setpoint for Co2 so the setpoint is rather high. Then i know why. Will check the FBeditor if i can find a simple converter there. 

Thanks.-


RE: Options button Mosaic 2 - Daniel - 12.06.2020

Just do it with event script like that
Code:
grp.write('1/1/1', event.getvalue())



RE: Options button Mosaic 2 - Tokatubs - 14.06.2020

Feeling a bit stupid. But whats the correct way to put it. Just adding this to the group adress in object viewer as an event scrtipt didnt do the trick.
So what is the correct way?


RE: Options button Mosaic 2 - admin - 15.06.2020

Create a virtual object, set data type to 2 bytes unsigned. Attach an event script to this object. Change 1/1/1 in the script to 2 bytes floating point object address that controls CO2 setpoint.


RE: Options button Mosaic 2 - Tokatubs - 15.06.2020

Ok, tried it. Writing to the virual adress updates the float adress, but result stays the same?
With 700 output is 699.52.  







.pdf   Integer.pdf (Size: 74.74 KB / Downloads: 5)



RE: Options button Mosaic 2 - Daniel - 15.06.2020

On your widget you have to use the virtual object.


RE: Options button Mosaic 2 - Tokatubs - 15.06.2020

Yes, but used the set value directly from "Objects" Pane.

May be that i misunderstood. The value now shows in the widget, and that was originally the end target.
I was waiting for the float value to return to 700, but maybe that was never the intention.?


RE: Options button Mosaic 2 - Daniel - 15.06.2020

You will not fix floating object, this trick is only to correctly display values on visu.
Do you have feadback object which you want to use in visu too?


RE: Options button Mosaic 2 - Tokatubs - 15.06.2020

Daniel it works now like intended. No problem. I got a bit looked on the thought of fixing the Float value. But now the value shows in the "Option button" in the widget, and that was the end goal all along.

Thanks for help.


RE: Options button Mosaic 2 - admin - 15.06.2020

You can't "fix" 16-bit floating point value because this data type does not have enough precision for larger numbers