WOLFRAM SYSTEM MODELER
This example demonstrates how to achieve irregular sampling from an OPC server using a triggered sampling block.
A triggered sampling block for reading data of type Real is used to sample data from a saw-toothed signal ("Saw-toothed Waves.Real8") at irregular time intervals. Each time the output from booleanTable is true, data is read from opcServer. The sampled signal is then passed through a lowpass Butterworth filter and used as a reference signal to control the height of the liquid in tank2.
Plots of the sampled signal read from opcServer and the output from booleanTable. Note how data has been sampled each time the Boolean output trigger is true.
Plot of the reference signal and the height of the liquid in tank2.