Logic Machine Forum
1bit to 1byte rely on which pushbutton. - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: 1bit to 1byte rely on which pushbutton. (/showthread.php?tid=5262)



1bit to 1byte rely on which pushbutton. - ceddix - 22.02.2024

Hi.

I need to do a script that contains 5 GA 1bit object (push-buttons) and one 1byte value object 

Function:
When I push the first button it sends 'true' on the first GA and then need to be convert to a GA object value that shows 100%
Then I push the second button and it sends 'true' to the second GA and then need to change the same object value 75% instead of 100%

And so on with the other three pushbuttons..


RE: 1bit to 1byte rely on which pushbutton. - Daniel - 22.02.2024

Create event script on each bit object with such script and change the values.
Code:
value = event.getvalue()
if value then
grp.checkwrite('1/1/1', 100)
end



RE: 1bit to 1byte rely on which pushbutton. - ceddix - 22.02.2024

Thanks, It is as simple as that!