Installation of LabX Bridge

The LabX Bridge service should be installed if you wish to create an interface to Mettler-Toledo’s LabX Software.

LabX Bridge is shipped as a zip archive in the \AspenTech\inmation.root\packages directory when installing AspenTech Inmation OT DataFabric with the setup wizard. The zip files can also be provided by contacting AspenTech Inmation Customer Service.

Requirements

The following software components need to be installed on any computer running LabX Bridge:

  • Microsoft .NET Framework 4.8

Installation

The easiest way to install or uninstall the LabX Bridge is via the Package Management. On installation the Configuration String property can be used to specify a JSON string with non-default values for configuration parameters.
For available parameters see The LabX Bridge Configuration File below.
Here is an example:

{"TCPPortClient":8989,"MaxRecordsReturned":99}

Manual Installation & Uninstallation

As an alternative to using the Package Management system, the LabX Bridge may also be installed and uninstalled manually.

Installation

Locate the LabX Bridge zip archive and then do the following:

Copy Files
  1. Create a folder for the files in the Program Files directory of the host machine. For example: "C:\Program Files\LabXBridge". Further in this document this will be referred to as the <LABXBRIDGEFOLDER>.

  2. Unzip and copy the files to the new folder

Update Config File
  1. Open the config file ('LabXBridge.exe.config') in your preferred editor.

  2. Find the EndpointAddress property and enter the correct endpoint address of the LabX system integration service.

  3. For the ServicePrincipalName property, replace LABXSVR01 with the name of the machine running the LabX service.

  4. For the Version property, this defines the LabX version which will be used by LaXBridge service. For LabX 12 this should be "12", for LabX 13 this should be "13".

    If this parameter does not exist then bridge service is using LabX 12.
  5. Save the config file and close the editor.

  • If an AspenTech Inmation Node is installed on the same host as the LabX Server, there is no need to open the configured TCPPortClient port (default 8989) in the network policies.

Register as a Windows Service

To register LabX Bridge as a Windows service, perform the following steps:

  1. Open command prompt (cmd) as "Administrator"

  2. Execute the following command:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe "<LABXBRIDGEFOLDER>\LaBXBridge.exe"
Start Windows Service

The LabX Bridge can be started as a Windows service when correctly installed. It can also be started directly by calling the "LabXBridge.exe" file. In this case, the Windows service has to be stopped in advance.

Firewall Configuration

On the server PC communication between LabX Bridge and the LabX service need to be permitted in the Windows Firewall configuration.

For the Outbound Rules, create a new rule for the Program Rule Type, specifying <installation folder>\LabXBridge.default\<version>\LabXBridge.exe as the program path.

For the Inbound Rules, create a new rule which allows connections for the TCP protocol on the port specified in the ClientBaseAddress argument (e.g. 9999).

Uninstallation

To deregister LabX Bridge as a Windows service, perform the following steps:

  1. Stop the "LabXBridge" Service

  2. Open command prompt (cmd) as "Administrator"

  3. Execute the following command:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe /u "<LABXBRIDGEFOLDER>\LabXBridge.exe"

The LabX Bridge Configuration File

parameter description default setting

TCPPortClient

TCP port for communication with inmation.

8989

EndOfTransmissionSignal

String that signals the end of a TCP data transmission. ATTENTION! This Value must be the same as in the esi-LabXBridge

CB3862EAE4064978852FE38092468A40

MaximalBufferSizeToSend

This Value sets the buffersize of the returning json telegram. ATTENTION! This Value must be the same as in the esi-LabXBridge

2048

MaxTCPConnectionQueues

The maximum length of the pending connections queue

128

EndOfLabXBridge

Exit string. If data sent to the Bridge contains this string the Bridge service exits (stops). This string may also be used to exit the program when the Bridge runs as a console: in the console input this string and press enter.

EndOfLabXBridge

ClientBaseAddress

IP address and port of client PC where LabX Bridge is running, also called Callback point. Replace localhost with the absolute IP address of the PC where LabX Bridge is running. Select 9999 or similar port to prevent conflict with other applications running in parallel. If ClientBaseAddress is empty then the port 80 is used on the client PC.

http://localhost:9999

EndpointAddress

The endpoint address of the LabX system integration service.

http://localhost:51155/LabX/SystemIntegrationService

ServicePrincipalName

Replace LABXSVR01 with the name of the PC where the LabX service runs. This setting might be required when LabX was installed distributed.

host/LABXSVR01

UserName

User name used to logon to LabX service. Leave it blank when user management option and user authentication are not enabled within LabX.

PredefinedUser

Password

Password used to logon to LabX service. Must be encoded using base64 encoding.

SecurityMode

Can be Message or None. Must match with those in the LabXHost.exe.config file for the LabX service. If LabX service is not part of the domain an therefore its host is unknown from a security standpoint, the security mode must be set to None.

Message

KeepAliveIntervalSeconds

The communication with LabX service is session based. This means after a certain timeout period and no activity on the interface an opened session will become closed. For LabX this session timeout is set to 10 minutes. A periodical method call is executed to keep the session open. KeepAliveIntervalSeconds parameter defines this period in seconds.

60

MaxRecordsReturned

If the method returns a list of objects this parameter defines maximal number of objects to be returned That parameter may be overwritten by MaxNumberOfRecords parameter of the method.

100

SubscriptionMaxItemsCount

Notifications are buffered by the LabX Bridge until they are retrieved by the Node. This is maximum number of events being buffered. If events are coming in faster then being retrieved by the Node and this maximum number is reached, the buffer will overflow and data will be lost.

10000

SubscriptionMaxReturnedItemsCount

When retrieving notifications from the LabX Bridge buffer with GETNOTIFICATIONS Lua function, they will be returned as an array. This setting defines the maximum number of notifications retrieved (=maximum array size returned) with one Lua call.

1000

SubscriptionMaxGetEventsIntervalSeconds

For each subscription notifications have to be retrieved from the LabX Bridge buffer regularly. Otherwise the subscription will automatically be removed. This setting defines the maximum time in seconds that the subscription will be held in memory without the Node retrieving data.

60

Version

This defines the LabX version which will be used by LaXBridge service. For LabX 12 this should be "12", for LabX 13 this should be "13".

12