Skip to content


OPC UA is a popular industrial protocol for interfacing PLCs, control systems, HMIs, etc. You can find more info about the protocol here.

OPC UA Server

Running an OPC UA server is supported on the following products:

  • V16X
  • V4X
  • RidePlayer
  • BinloopX

Network Interface

When the OPC UA server is enabled, the show controller will open an unencrypted endpoint on every available control network interface. This endpoint is discoverable on port 4840 of the device by default.

Default Representation

Variable Types

Currently, enabling the OPC UA server on supported Alcorn devices will represent every supported variable in your show using OPC UA variable nodes whose data types correspond to the table below. Every Device Variable on the show controller hosting the OPC UA server will also be represented with variable nodes in this same manner.

Show Variable Type OPC UA Node DataType Additional Notes
Integer Int32
String String
Bool Boolean
Timecode Int32 This counts total frames. A timecode of 00:00:02.00 at 60 FPS yields a value of 120 in OPC UA.
LCDString String
Date/Time DateTime
Percent Double All percent variables on the OPC UA server are out of 1. A value of 85% in Winscript yields a value of 0.85 in OPC UA.
Decimal Double

Variable arrays will appear as arrays in OPC UA.

NOTE: You MUST define a type for every variable you wish to expose in OPC UA. Variables without an assigned type will be ignored!

NOTE: Device variable arrays are currently not supported.

Browsing and Node Identification

On startup, the following objects are created:

Node ID Display Name Browse Name
ns=1;i=51000 Show Variables Show Variables
ns=1;i=52000 Device Variables Device Variables

The "Show Variables" object houses all of the defined variables in your show. The "Device Variables" object contains all device variables, including the ones on this show controller and external device variables (if applicable).

Every show variable lives in namespace 1 and uses a string identifier type. The identifier is the name of the variable in Winscript. For example, an integer variable named "Test Integer" in Winscript would have a node ID of: ns=1;s=Test Integer. The Browse Names and Display Names of the nodes are also the names of the variables from Winscript.

Device variables function similarly, keeping in mind that their names in Winscript are the device name concatenated with a "." and then the variable name. A V16X device variable named "Locked" would have a node ID of ns=1;s=V16X.Locked.

Every variable has read+write permissions by default, though this can be changed to read only if needed. If a write from Winscript and OPC UA occurs within the same frame, the write from OPC UA takes precedence.

Monitoring Data

Monitoring data is supported for all exposed variables. The OPC UA server supports a sampling interval range of 1ms to 24 hours and a publishing interval range of 1ms to 1 hour. Although the minimum sampling interval is 1ms, the server will only update variable values once per frame. For frame-accurate reporting on the client, best results have been achieved by setting the sampling and polling rates to half of the frame's interval to ensure that the client receives the updated variable value on the frame edge when it changes. If frame-by-frame reporting is not required, it is possible to lengthen the sampling and publishing intervals to limit network traffic.

Getting Started

Follow these steps to start running an OPC UA server on your Alcorn device:

  1. With a script open in Winscript Live, navigate to the top of the window and select Configuration followed by Script...
  2. On the left sidebar, select OPC UA. You should see a window like the one pictured below.
  3. Select Enable OPC UA Server at the top of the window.
  4. Customize the OPC UA server. You can find more info about the options in the next section (Configuration).
  5. Click "OK" and upload your script to the controller.

OPC UA Config Window

NOTE: This OPC UA configuration only takes effect on controller reboot- you cannot change settings in this window while using Live Mode.


After enabling the OPC UA server in Getting Started, you will find several options to tweak the server.

  • Make Variables Read-Only: When this option is checked, there will be no write permissions in any of the nodes representing the show variables. However, the show variables will still be writable from the script.
  • Use External Device Variables: This will expose the device variables of every device in your script in addition to the ones on the show controller that are enabled by default. For example, if you are running a V16X script that has a BinloopX device added in the Devices table, all device variables corresponding to the BinloopX will also be exposed on this OPC UA server. WARNING: If you have a script that already contains a large amount of devices, it is NOT recommended to enable this option. Doing so may cause a performance hindrance from using too many device variables.
  • Custom Port: By default, many OPC UA servers listen on TCP port 4840. If you need, you can change that port here.
  • Application Name: This option directly corresponds to the applicationName parameter in the ApplicationDescription structure. This will appear as the descriptive name of this OPC UA server when connecting to its discovery service.
  • Discovery URL Hostname: The text in this box corresponds to the hostname part of this server's Discovery URL. For example, if this parameter is set to "AlcornController" and the port setting is configured to 4840, then the discovery URL of this device will be opc.tcp://AlcornController:4840/. This setting will NOT actually set the hostname of your controller- it will only change what this server reports its Discovery URL to be. The default value of this is the name of the product (V16X, RidePlayer, etc.) your script is running on.
  • Maximum Number of Sessions: This setting configures the maximum number of client sessions that may be connected at the same time on this server. This setting's absolute minimum is 0 and the absolute maximum is 30.
  • Maximum Session Timeout: This setting dictates the maximum amount of time the server will wait to terminate a client's session if the client stops sending session requests. The default value is 3,600,000ms, or 1 hour.

Stress Testing and Timing

The following table shows the performance limits of the OPC UA server. Each row is a test with a set of factors that, when combined with processing the rest of the script, spend one frame (16.67ms) at 60 FPS processing in the worst case. It is possible to exceed these numbers of variables exposed, polling intervals, etc. However, the performance of your controller may vary if you attempt to do so. These tests assume an empty script outside of the parameters defined here, but the timing of the tests includes the general overhead of processing in firmware.

In each test, a set of integer variables was created. On another machine, UAExpert version 1.6.3 was used to monitor all of the integer variables at the intervals specified in the table. Every monitored item used a notification queue size of 1.

The number of variables exposed corresponds to how many total variables are in the script and therefore how many are available on the OPC UA server.

# of Variables Exposed Sampling and Publishing Interval
600 5ms
3200 250ms

These test results are not a guarantee of performance.