WOLFRAM SYSTEM MODELER
TriggeredSamplingDemonstrates how to sample data from an OPC UA node irregularly |
|
SystemModel["OPCUA.Examples.TriggeredSampling"]

This example demonstrates how to achieve irregular sampling from an OPC UA server using an EventClock .
This example requires an OPC UA example server running on localhost.
Read about how to start the example server here.
An EventClock is used as read clock for a Client to sample data from a OPC UA server at irregular time intervals.
Each time the output from booleanTable becomes true, data is read by the client.
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 the tank.
| errorHandling |
Value: Types.ErrorHandling.ErrorWhenUncertain Type: ErrorHandling Description: How to handle node errors (request errors are handled by the connected Read/WriteNodeList component) (write.errorHandling) |
|---|
| client |
Type: Client Description: Client for connecting to an OPC UA server |
|
|---|---|---|
| tank |
Type: ControlledTank Description: Model of a simple tank with actuator input |
|
| PI |
Type: LimPID Description: P, PI, PD, and PID controller with limited output, anti-windup compensation, setpoint weighting and optional feed-forward |
|
| booleanTable |
Type: BooleanTable Description: Generate a Boolean output signal based on a vector of time instants |
|
| const |
Type: Constant Description: Generate constant signal of type Real |
|
| gain |
Type: Gain Description: Output the product of a gain value with the input signal |
|
| filter |
Type: Filter Description: Continuous low pass, high pass, band pass or band stop IIR-filter of type CriticalDamping, Bessel, Butterworth or ChebyshevI |
|
| combiTimeTable |
Type: CombiTimeTable Description: Table look-up with respect to time and linear/periodic extrapolation methods (data from matrix/file) |
|
| write |
Type: Write Description: Adds writing of a Real scalar node to a WriteNodeList |
|
| read |
Type: Read Description: Adds reading of a Real scalar node to a ReadNodeList |
|
| writeClock |
Type: PeriodicExactClock Description: Generate a periodic clock signal with a period defined by an Integer number with resolution |
|
| readClock |
Type: EventClock Description: Generate a clock signal when the Boolean input changes from false to true |