Run Mode provides a means of simulating real time behaviour of symbols and developing and testing the diagrams.
Run Mode is toggled on or off from the main toolbar.
The dynamics of Diagram Objects (such as steps in State Transition diagrams) can set entire objects to their states and input-output calculations can set values.
When a ControlDraw page is in run mode:
The objects have a different right click menu.
The Run Mode Control form is shown.
Provided the page is not in Static run mode, the following sequence is performed periodically, at the rate determined by the Simulation Timer setting on the main toolbar. By default this is two seconds.
The values of all Symbol inputs are updated from their input connections
Each Symbol performs the calculation that has been defined in the Symbol Dynamics form
The values of all outputs are passed through their connections to the downstream Symbol inputs
When you click a Symbol a popup list relevant to the Dynamics of the object appears
If the object is multi state then a list of the possible states of the object is popped up and you can set the object to any of it's states or enter a value for single data type symbols.
See also AutoSFC
You can take a snapshot of a collection of object states and save them in a State Matrix, and you can then reload the state from the state matrix run form.
In order for a symbols script to be valid the following conditions apply:
Al the inputs and outputs of a symbol must have unique names. You can use auto-naming to achive this.
The script must be valid
There is a test function in the Run form. This causes each symbol that has any dynamics in turn to be highlighted in red, tested and then, if it does not fail, changed to green. This is a good way to test page dynamics and find out which symbols have expressions and if any of them have an error.
By default this is run the first time you run a page, but it can be switched off by deselecting Run on Startup in the Run form.
See also What Happens in Run Mode