OPC-UA Interface Guide (Press Emulator)
Press Emulator v4.8.5741.0, Copyright (c) 2023 Global Graphics Software. All rights reserved.
Overview
The Press Emulator allows a user to emulate the performance of a printing press.
When the Open Platform Communications (OPC) server in Press Emulator is enabled an OPC node tree is published.
The nodes in this tree represent grouped areas of state and functionality.
Default address: opc.tcp://localhost:26742/spc-pressemulator
Certificates
Communication between OPC UA clients and servers require both parties to possess their own application certificate. To enable further communication each party must trust the opposing certificate. This trust can be established automatically, programmatically or manually depending on the application's configuration or implementation.
The certificate for SPC can be found in %programdata%\\Global Graphics Software Ltd\\Press Emulator\\App Certificates\\certs
should you need to copy it to the Trusted Peer Certificate folder. In this release it will be a Self Signed Certificate issued by and for Smart Print Controller.
OPC Methods
Many published OPC method nodes return a String
value indicating their success or error state. In all such cases a check for Success
will indicate success, and any other value is an error.
Return Value | Description |
---|---|
| A command could not run because its execution criteria was not met. |
| Failed to load an application SPC configuration. |
| The PDF could not be preprocessed. |
| The job was submitted, but failed to print. |
| Failed to restore the HD configs to the original values. |
| Failed to update the HD configs to the values required for printing. |
| Failed to set the page range of a job. |
| The print run failed to start. |
| Failed to submit the job to the server(s). |
| Cannot execute the request. (External control not granted?) |
| The media's printer profile differs from the 'active' profile. |
| One or more of the parameters were invalid. |
| The specified item was not found. |
| At least one server is required for printing. |
| The HD connection(s) must be connected or disconnected - Not pending. |
| The PDF was preprocessed, but was invalid (E.g. It contains non-embedded fonts). |
| The print bar does not appear in the printer profile. |
| Direct printing cannot interrupt an active print run. |
| The conditions needed to perform the action were not satisfied. |
| The specified server is disabled. |
| The request completed successfully. |
Any methods returning data (E.g. JSON, comma-separated values, ...) will be explicitly documented. Callers should check the format of the returned data to see if the call succeeded (otherwise one of the above errors may be returned).
Any methods listed in this documentation include details about their required parameters (if any), and return value.
In the event of an error, please see the application log file for more information.
OPC Client Library
The following documentation provides guidance on using the Traeger Industry Components GmbH OPC client library for software developers working with Press Emulator.
Configuring Custom Message Sizes
The default maximum message sizes used by OPC clients to communicate to the server are sufficient for most use cases. However, to ensure transfer of larger data packets (such as retrieving some job thumbnail images) it may be necessary to configure the OPC client with custom values.
For example:
Client = new OpcClient();
Client.Transport.MaxArrayLength = 1024 * 1024 * 50;
Client.Transport.MaxBufferSize = 1024 * 1024 * 50;
Client.Transport.MaxMessageSize = 1024 * 1024 * 50;
Client.Transport.MaxStringLength = 1024 * 1024 * 50;
See here for more information.
Adjusting Communication Timeouts
OPC clients regularly verify the responsiveness of the connection to the OPC server. However, in certain circumstances where the system is under heavy load, maintaining a responsive connection might not always be possible. To mitigate potential issues under such conditions, it is recommended to increase the default communication timeouts.
The example below demonstrates how to adjust the default values:
var defaultTimeOut = (int)TimeSpan.FromMinutes(10).TotalMilliseconds;
Client = new OpcClient
{
// Don't auto-disconnect - Dispose the client to explicitly disconnect.
DisconnectTimeout = int.MaxValue,
KeepAlive = { Interval = defaultTimeOut },
SessionTimeout = defaultTimeOut,
OperationTimeout = defaultTimeOut,
ReconnectTimeout = defaultTimeOut
};
Please note that the provided examples serve as illustrations, and it's important to tailor the configuration to your specific requirements.
PressEmulatorSet
The top-level set containing all available OPC nodes.
Immediately underneath this root-level node are a categorized collection of sub-nodes, each encapsulating a different area of behavior.
Section Name | Description |
---|---|
State relating to the Press Emulator. |
PressEmulator
State relating to the Press Emulator.
Properties
Name | Type | Writable | Description |
---|---|---|---|
|
| No | The current buffer level (%). |
|
| Yes | The maximum buffer size. |
|
| No | The current speed (m/min) of the emulated press. |
|
| Yes | Whether press emulation is enabled. |
|
| Yes | The target speed (m/min) of the emulated press. |
Methods
Name | Returns | Description |
---|---|---|
|
| Set the emulated physical speed of the web using the |