Main Content

OPC Write

Write data to OPC server


OPC Toolbox

  • OPC Write block


The OPC Write block writes data to one or more items on an OPC server. The write operation takes place synchronously or asynchronously.

Each element of the input vector is written to the corresponding item in the item ID list defined for the OPC Write block.


You must have an OPC Configuration block in your model to use the OPC Write block. You cannot open the OPC Write dialog without first including an OPC Configuration block in the model.


Import from Workspace

Allows you to import settings for the OPC Write block from a dagroup object in the base workspace. The client, item IDs, and sample time are updated based on the properties of the imported group.


Defines the OPC client associated with this block. You can add clients to the list using Configure OPC Clients. For more information, see Use the OPC Client Manager.


Shows the items to be written to the specified server. You can add items to the list using Add Items, or delete items using Delete. You can reorder the items in the list using Move Up or Move Down. Each element of the input port is written to the corresponding item in the list.

Write mode

Defines the write mode for this block. Available options are Asynchronous and Synchronous. Synchronous writes have slightly more overhead than asynchronous writes, but they are generally more reliable than asynchronous writes.

Sample time

Defines the sample time for the block. Data is written to the server at the specified sample time. You can specify 0 for continuous mode, or -1 to inherit the sample time of the block connected to the input of the OPC Write block.

Introduced before R2006a