I am wondering if there is any additional sizing and limitation information available for the OPC Toolbox.
The example application is using Simulink to run pseudo real-time simulation of machines in an industrial automation setting. Using OPC Read and Write commands, the application communicates to multiple Programmable Logic Controllers (PLCs) through a single OPC Topic. This tests the control strategies of the processor with simulated hardware. The OPC server in this example is local to the instance of MATLAB, but it may be advantageous to run it remotely in the future.
I have so far used these documents as resources:
- How can I improve the performance of a model so that I do not receive pseudo real-time violations when using OPC blocks in Simulink?
- What is the maximum number of tags that OPC Toolbox 2.1.5 (R2010a) can transfer simultaneously at one time?
- OPC Toolbox User's Guide
This is the information I understand so far and have applied to reduce computational overhead:
- Asynchronous read/write operations are better than synchronous ones
- Longer read/write time intervals are better than shorter ones
- Acceleration modes helps marginally – however, I did not use them as some subsystems did not work when acceleration modes were enabled
- No Scope blocks
- Used a fixed-step solver (preferred anyways)
- Longer solver step times are better than shorter ones
- Set the pseudo real-time violations in the OPC Config Real-Time block to None
- Closed nearly all other applications on the virtual machine and ensured enough resources were allocated for MATLAB/Simulink
Here are some of my questions regarding sizing and limitations. If there is additional information available that was not asked for, that would be greatly appreciated.
- Given a fixed amount of data per item (assume most are 4-byte tags), is there a way to calculate how much "bandwidth" is consumed for each tag, given its communication settings (sync/async, read/write time interval, etc.)?
- Why does increasing the model solver step time improve the OPC pseudo real-time performance? I would have assumed that evaluating the model and sending/receiving data through DCOM are mutually exclusive.
- Why does navigating the model subsystems (clicking in and out of them) negatively impact pseudo real-time performance? I assume the reason is similar to why Scope blocks negatively impact model performance more broadly.
- Per the second article: How does the guidance on multiple groups apply to Simulink? By "group", does that mean number of items configured inside an OPC Read or OPC Write block? If so, the article mentions having 100 items per group versus 1000. Is there any recommendation for the maximum number of items in a group?
- Are the resources available for the OPC Toolbox fixed, or may they be expanded through running of additional services, multithreading, etc?
- Not particularly about sizing, but is it possible to programatically enter the OPC shortcut for each Item ID in an OPC Read/Write block as opposed to manual entry?
Best Answer