homepage › Forums › HMI Support › RECIPE FORMAT/SYNTAX › Reply To: RECIPE FORMAT/SYNTAX
Hi,
First of all why U want to store in the app the state and the preconfigured value? This is HMI app which connect with many brands PLC devices, all these values are stored in this devices. First if U open or load the app all values are read from connected PLC and set the correct state for all switches, buttons, fields, slider, etc…, then U can changes and write it in real time to the PLC Memory again.
If U want for example set on startup the app the state of the switch which is not connected with any device, U can use system method direct in switch or background expression connected with many switches and other objects:
SWITCH:
Name SWITCH
value $System.pulseOnce ? LoadState : !LoadState
or if U connect with exp1
SWITCH value EXP1.value
Background EXP1
Name EXP1
value $System.pulseOnce ? LoadState : !LoadState
where:
Name – name of Your switch,
LoadState – for switch 1/0, true/false ( on first start the app will be loaded MainState to the value field of the switch).
Thanks