In the previous article: SimServer How To #3, we explored how to create custom simulated patterns for Simulation Server using either Prosys OPC UA Browser or Prosys OPC UA SDK for Java.
This time, we are exploring Method Simulation, an exciting new feature in the Simulation Server. This feature enhances Simulation Server’s capabilities and makes it an even more versatile testing tool for your OPC UA client applications.
In this article, we’ll cover the basics of using method simulation, guiding you through its core functionality and providing a basic example.
If you want to watch a video tutorial instead, you can find our video on how to use Method Simulation on our YouTube channel.
Configure Method Simulation
For this tutorial, you will need the following products:
- Prosys OPC UA Simulation Server
- You will need the Professional Edition. If you don’t have it yet, you can get an evaluation license by contacting our sales team.
- Prosys OPC UA Browser
1. Make sure that OPC UA Simulation Server is in Running state and you have activated the Professional Edition.
2. Open the Objects view. I have created a “MyInstances” folder to which I will add the new method. Select the folder and press the + button to add new method.
3. Fill in the Name.
4. Open the Arguments tab from the right-hand side of the view and press the + button under Input Arguments.
5. Fill in the Name and select Double as data type.
6. Press the + button under Output Arguments.
7. Fill in the name and select String as data type.
8. Press the settings icon of the created output argument.
9. Select Constant from the dropdown list and write the value for Initial Value.
10. Navigate to Actions tab and press the + button.
11. You can add two types of Actions.
- SET: Create a method that will read a from one node and then write it into another.
- WAIT: Configure a waiting time before continuing the method.
Select SET and press OK.
11. Select Constant variable under the Simulation folder to be the Target Variable.
12. Select Input from the dropdown list when defining the Source Variable.
NOTE: The dropdown list shows the input option only if the data type is applicable for the target variable.
13. Open OPC UA Browser and connect to Simulation Server. Find the MyMethod node from the address space and open the context menu with right-clicking and selecting Call Method.
14. Write a double value for input and press Call.
15. The response will be shown in the dialog.
16. You can verify the SET operation from the address space.
Next Steps
In this article, we used Simulation Server’s new method simulation feature and showed you how to do a basic configuration for a new method. Now, feel free to try it out yourself!
If you are still missing the professional edition please contact our sales!
Author Info
Iivo Yrjölä
Customer Integration & Support, Prosys OPC
Email: iivo.yrjola@prosysopc.com