Configure OPC clients for model, pseudo real-time control, and behavior for OPC errors and events
The OPC Configuration block defines the OPC 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
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 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 server. For more information, see Use the OPC Client Manager.
These parameters defines 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
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
Defines the behavior when a read or write operation fails.
Server unavailable— Behavior on server shutdown
Defines the behavior when the client cannot connect to the OPC server, or when the server sends a shutdown event to the client.
Pseudo real-time violation— Behavior on real-time violation
Defines the behavior when the simulation runs slower than real time. See the Pseudo real-time simulation options for more information.
Enable pseudo real-time simulation— Control simulation speed
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
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
Check this parameter (on) to add an output port to the block for the model pseudo real-time latency.