Skip to main content
Skip table of contents

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

CommandCannotExecute

A command could not run because its execution criteria was not met.

FailedToLoadAppConfig

Failed to load an application SPC configuration.

FailedToPreprocess

The PDF could not be preprocessed.

FailedToPrint

The job was submitted, but failed to print.

FailedToRestoreConfigs

Failed to restore the HD configs to the original values.

FailedToSetConfigs

Failed to update the HD configs to the values required for printing.

FailedToSetPageRange

Failed to set the page range of a job.

FailedToStartPrintRun

The print run failed to start.

FailedToSubmit

Failed to submit the job to the server(s).

FeatureIsDisabled

Cannot execute the request. (External control not granted?)

IncompatibleSmd

The media's printer profile differs from the 'active' profile.

InvalidParameter

One or more of the parameters were invalid.

ItemNotFound

The specified item was not found.

NoServers

At least one server is required for printing.

PendingConnection

The HD connection(s) must be connected or disconnected - Not pending.

PreprocessingFailed

The PDF was preprocessed, but was invalid (E.g. It contains non-embedded fonts).

PrintBarNotFound

The print bar does not appear in the printer profile.

PrintRunIsActive

Direct printing cannot interrupt an active print run.

RequestDenied

The conditions needed to perform the action were not satisfied.

ServerIsDisabled

The specified server is disabled.

Success

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:

CODE
	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:

CODE
	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

PressEmulator

State relating to the Press Emulator.

PressEmulator

State relating to the Press Emulator.

Properties

Name

Type

Writable

Description

BufferLevel

Int32

No

The current buffer level (%).

BufferSize

Int32

Yes

The maximum buffer size.
NOTE Modification requires external control.

CurrentSpeed

Double

No

The current speed (m/min) of the emulated press.

EnableEmulation

Boolean

Yes

Whether press emulation is enabled.
NOTE Modification requires external control.

TargetSpeed

Double

Yes

The target speed (m/min) of the emulated press.
The default value is obtained from the active printer profile.
Use SetSpeed() to apply any changes.
NOTE Modification requires external control.

Methods

Name

Returns

Description

SetSpeed()

String

Set the emulated physical speed of the web using the TargetSpeed value.
NOTE Requires a print run to be active and emulation to be enabled.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.