Associating Variable Script Events to Screens

Inside the Script Code of a Screen, in addition to the standard events made available by Movicon (Click, DblClick, KeyDown, etc.), it is possible to insert customized events, associated with the variation of variables in the Movicon Real Time DB and the Local Variables to the Screen.  Practically, an event can be added to be executed whenever the selected variable changes status. Therefore it is the programmer's task to insert the appropriate code into the event's internal according to what is required.  By inserting the event in this way it will be active and processed only when the Screen is active, meaning when loaded in Ram.

 

Associating a Variable Script Event to a Screen can be done by selecting the Screen and activating the 'Add New Variable Script Event' which can also be found in the 'Command' window of the 'Project Explorer'.

 

 

The request for a Variable Script Event association to a Screen will open up a further window containing a list of the available Real Time DB variables. Once the variable has been selected the new event will automatically be inserted in the Script Explorer window with the syntax "OnVariableNameChanged":

 

 

 

See Also