How do I view tags in an OPC server in OPC read block?

4 views (last 30 days)
I am trying to read a tag value from a Compact Logix PLC in simulink using an OPC server. I have the OPC Toolbox. I am not able to view the offline or online tags when setting up OPC Read block in simulink. I used a conventional naming syntax for the tag to add it manually but I get the following error:
=== Simulation (Elapsed: 1 sec) ===
Error:Error evaluating registered method 'Start' of MATLAB S-Function 'opcslread' in 'PLC_Demo/OPC Read'. The following is the MATLAB call stack (file names and line numbers) that produced this error:
Caused by:
Could not create all items for read block 'PLC_Demo/OPC Read'.
One or more items could not be added:
Adding PLC311._xTest_AO1 failed with 'The ItemID is not in the server address space.'
Adding PLC311/_xTest_AO1 failed with 'The ItemID is not in the server address space.'
===============================
I installed "OPC Foundation Core Components" as instructed in the Rockwell Automation forum. I tested the server using an OPC Test Client provided by Rockwell. It says that the OPC server is accessible and the tag value is being read successfully. How can I include the ItemID in the server address? Or better yet, how can I browse the existing tags in the PLC?

Answers (0)

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!