OPC Server block

Block Category: OPC

The OPC Server block is used to establish a connection with the OPC server.  There should be one OPC Server block for each OPC server. There might be many OPC Server blocks if the connection to many OPC servers is required.

The OPC Server block has two outputs. When the value of the top output is 1, the block is connected to a server; when the value is 0, it is not connected. The bottom output indicates the number of errors.


Connect to the server and stay connected: Connects to the specified OPC server immediately. In this case, all server items will be available for browsing.

Establish connection to the server at the simulation start: Connects to the specified OPC server when the model is running.

If connection to the server is broken

Stay disconnected: Does not try to reconnect to the specified OPC server.

Try to reestablish connection: Tries to reconnect to the specified OPC server.

Properties: Shows the OPC server properties. Note that the properties can be viewed only if a connection to the server is established. Properties may vary from server to server.

Registered Servers: Lists the OPC servers registered on the computer.

Remote Computer Name: Specifies the name of the computer where the OPC server is (or will be) running. To choose a server, click on the > button to navigate across the network. Leave this field blank if the OPC server is local. To connect via an alias, type $<alias-name>. If you are planning to deploy your distributed model in another network, you will likely need different computer names. To make the distributed model portable, you can use Embed's path aliases. To access path aliases, choose the Edit > Preferences command and click the Path Aliases tab. Enter the alias in the following general format:


You can use an alias as a substitute for a real computer name. To expand the alias, prefix the alias name with a dollar sign ($).

Server ID: Specifies the name of the OPC server to which to connect.

Show Log: Views log events.


See the examples under Examples > OPC.