Configuration of OPC-Simulations

The OPC-Server offers to simulate process-values. In this case no communication to the ADS-device (like PLC) is done instead simulated values are send to OPC-client.
Different simulation templates like sinus, ramp, random etc. are available to be configured with detailed behaviour (amplitude, start /stop values).

The OPC-Server offers:

Configuration of OPC-Simulations 1:

It is not possible to combine both simulated and real-process values.

The usage of OPC-Conversions needs the configuration of a TPY-File (AutoCfgSymFile) for the corresponding device and AutoCfg 8.

Step 1: Configuration of OPC-Simulation in OPC-Server

In the first step you need to configure TwinCAT OPC-Server for conversions. This is a one-time configuration and does not need to be repeated when changes to the PLC project occur.

Start TwinCAT-OPC-Configurator "Start - All Programs - TwinCAT System - TwinCAT - TwinCAT OPC Configurator"

Configuration of OPC-Simulations 2:

Navigate to "Simulations", right click and select menue "New".

Configuration of OPC-Simulations 3:

For "Name" please enter a name for this simulation template. This name has to be OPC conform, no special characters allowed. With "OK" you get into the dialog to configure in details your new "Simulations Signal".

Configuration of OPC-Simulations 4:

The following table gives an overview about all possible configuration settings.

Signal Type

Beschreibung

0 : ReadCount

 

1 : WriteCount

 

2 : Random

Random-Function

3 : Ramp

Ramp-Function

4 : Sine

Sinus-Function

5 : Square

Square-Function

6 : Triangle

Triangle-Function

7 : Stepp

Step-Function

Disable

Deactivates the simulation

Save the configuration via "File" --> "Save As". After the configuration has been saved, you will be asked if this configuration should be set as the startup-configuration.

Configuration of OPC-Simulations 5:

The configuration will be automatically activated on next restart of the OPC-Server.

Configuration of OPC-Simulations 6:

Step 2: Configuration of PLC-Variables for OPC-Simulation

With previous steps we defined a "simulation-template" with detailed information about simulation handling. Now we define, which PLC variable should be handled with simulation. Similar to the Data Access feature, this configuration also occurs by adding comments to the PLC-project.

Beispiel:

Configuration of OPC-Simulations 7:

Configuration of OPC-Simulations 8:

Today just global PLC-variables can be linked to simulation-templates. Elements of structures or arrays can not be configured as an OPC-Simulation.