How to: Do Simulation
Last updated
Last updated
The guide demonstrates how to create expressions that generate a sinusoidal signal and a saw signal for simulation and testing purposes.
Open Monokot Server Administrator and double-click Scripts on the Server Explorer pane. Click New Expression and set the name Sin for the expression that appears. Insert the following code into the expression code editor:
Go to the Triggers tab and click Add Periodic. Now, we have created an expression that will be executed every 500 ms.
In the same way, create a second expression named Saw and specify a periodic trigger for it, but to simulate the saw signal, use the following code:
In order for the changes to take effect on the server, click the Sync button. Now, if you write the data (for example, in InfluxDB) generated by these expressions, you will see something similar as in the figure below: