(Not recommended) Configure OPC DA clients for model, pseudo real-time control, and behavior for OPC errors and events
Support for the OPC Data Access (DA) standard will be removed in a future release. See Compatibility Considerations.
Industrial Communication Toolbox
The OPC Configuration block defines the OPC Data Access clients to be used in a model, configures pseudo real-time behavior for the model, and defines behavior for OPC errors and events.
The block has no input ports. One optional output port displays model latency.
You cannot place more than one OPC Configuration block in a model. If you attempt to do so, an error message appears, and the second OPC Configuration block is disabled.
Pseudo real-time latency — Wait time for each simulation step
vector of double
Outputs the model latency as the time spent waiting at each simulation step to achieve pseudo real-time behavior.
Configure OPC Clients — Define and configure OPC DA clients for use throughout the model
Click to open the OPC Client Manager dialog for the model. Each model has a list of clients associated with it. These clients are used during the simulation to read or write data to an OPC DA server.
These parameters define actions when OPC-specific errors and events are encountered. The available actions are to produce an error and stop the simulation, produce a warning and continue the simulation, or ignore the error or event.
Items not available on server — Behavior on missing items
Error (default) |
Defines the behavior for items that are specified in a Read or Write block but do not exist on the server when the simulation starts.
Read/write errors — Behavior on read or write errors
Warn (default) |
Defines the behavior when a read or write operation fails.
Server unavailable — Behavior on server shutdown
Error (default) |
Defines the behavior when the client cannot connect to the OPC DA server, or when the server sends a shutdown event to the client.
Pseudo real-time violation — Behavior on real-time violation
Warn (default) |
Defines the behavior when the simulation runs slower than real time. See the Pseudo real-time simulation options for more information.
Pseudo real-time simulation
Enable pseudo real-time simulation — Control simulation speed
on (default) | off
This parameter allows you to configure options for running the simulation in pseudo real time. When checked (on), the model execution time matches the system clock as closely as possible by slowing down the simulation appropriately. Note that the real-time control settings do not guarantee real-time behavior.
If the model runs slower than real time, a pseudo real-time latency violation error occurs. You can control how Simulink® responds to a pseudo real-time latency violation using the settings in the Error control pane.
Speedup — Simulation speedup factor
1 (default) | integer value
The Speedup setting determines how many times faster than the system clock the simulation runs. For example, a setting of 2 means that a 10-second simulation will take 5 seconds to complete. The Speedup parameter must be a literal integer; you cannot use a MATLAB or Simulink model workspace variable to define the speedup factor.
Show pseudo real-time latency port — Add latency output port
off (default) | on
Check this parameter (on) to add an output port to the block for the model pseudo real-time latency.
Version HistoryIntroduced before R2006a
R2023b: OPC DA Support to Be Removed
Support for the OPC Data Access (DA) standard will be removed in a future release.