Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: KatzYaakov on February 04, 2020, 02:23:57 PM

Title: how set the button state
Post by: KatzYaakov on February 04, 2020, 02:23:57 PM
hi
i have some butons that change the registry when press ,problem is that when i shut down mach
its save registry status but not butoon status
so when i turn on i need read the registry and update the button
i try the  comand:
scr.SetProperty("auto", "Button State", "Down")

but its not work
(i put it in "screen load script")
thanks
yaakov
Title: Re: how set the button state
Post by: SwiftyJ on February 04, 2020, 04:12:11 PM
Instead of “Down” use “0” (up) or “1” (down)
Title: Re: how set the button state
Post by: KatzYaakov on February 04, 2020, 06:10:42 PM
hi thanks its work(only when i save the  "Edit screen" )
 
but when i restart mach its back to up (the status write on the control it self) its seem that the screen load after screen load script and override the status i put in script
Title: Re: how set the button state
Post by: jbuehn on February 04, 2020, 09:45:07 PM
Try putting it in the first loop of the PLC script.