SimServer How To #4: Method Simulation

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:

1. Make sure that OPC UA Simulation Server is in Running state and you have activated the Professional Edition.

OPC UA Simulation Server - Status tab

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.

Input argument configuration dialog.

6. Press the + button under Output Arguments.

7. Fill in the name and select String as data type.

Output argument configuration dialog.

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.

Adding a new action for the method.

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.

Choosing action type between SET and WAIT. SET is selected.

11. Select Constant variable under the Simulation folder to be the Target Variable.

Variable, Constant, is selected to be the target variable of the SET action.

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.

SET action configuration dialog filled.

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.

Browser is connected to Simulation Server and the created method is called from the context menu of the created method.

14. Write a double value for input and press Call.

Method call dialog.

15. The response will be shown in the dialog. 

Method response and output argument are shown in the dialog. Status is success.

16. You can verify the SET operation from the address space.

Constant variable has been selected in Browser and SET action has set the Constant variable value.

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!

A headshot of Iivo Yrjölä

Iivo Yrjölä

Customer Integration & Support, Prosys OPC

Email: iivo.yrjola@prosysopc.com

Related Posts

i-GuSystem – From MTConnect to OPC UA: Future-Proof CNC Data Collection with Forge

i-GuSystem Ltd., a Finnish specialist in CNC program transfer and production data acquisition, adopted Prosys OPC UA Forge to extend its data integration from MTConnect into the OPC UA era, ensuring future-proof and scalable solutions. To meet the growing demand for OPC UA, i-GuSystem integrated Prosys OPC UA Forge as a future-proof layer. Forge enables direct OPC UA connectivity with output in XML, ensuring full compatibility with iguXMLsync and downstream systems like VisualFactory, MES, Azure cloud, and Power BI.
The first Forge deployment was completed in just two hours, delivering reliable results and proving the scalability of i-GuSystem’s solutions. By adopting Forge, i-GuSystem has seamlessly extended its CNC data expertise into the OPC UA era, future-proofing its architecture while continuing to provide rapid, hands-on results for its customers.

Read More »

Interested in this topic?

Get updated about new posts through our newsletter!