RSJ-Labelprinter - follow the QR-Code RSJ-Next Generation Label Printing System - makes workflow easier RSJ-Software, Company Logo

Authentication

Authentication is done via OAuth2

This refresh token must be exchanged for an access token by the industrial device.

The access token must be supplied with all requests (either in the Authorization header or in the oauth_token parameter)

The access token has to be recreated if expired or an HTTP 402 error code is received.

Exchange refresh token for access token

HTTP(s) POST http://<ipaddress>/auth

client_id=xxxxx&client_secret=xxxxx&grant_type=refresh_token&
referesh_token=xxxxxxx
The response is a JSON document:
{"access_token": "xxxxxx",
 "refresh_token": "xxxxxxx",
  "expires_in": 3600
}

OAuth2 based authentication can be disabled via a configuration option.

If OAuth2 is enabled, all web service requests should use HTTPS, (because the security of OAuth2 is based on encrypted communication).


Data Provisioning Interface

The Data Provisioning Interface allows the controlling system to supply variable data for the next labels created.

The data has to be resupplied (eg via manual interaction on the controlling system) when LPSNG is restarted.

The data is used like the input into the corresponding manual entry form. All input fields are required to be in the correct printable format (eg correct date format for label desired).

The field names in the interface can be converted via a simple table (included in the configuration file) into the field names used in the label descriptions.

Fields not supplied via the interface will be filled with the values from the label description

The interface is available in different forms (which could be used interchangeably):

  • XML interface
  • HTTP FORM interface
  • Web browser based GUI

Production Control

The following fields are required for every label:

itemId
Label format (eg 5564-9105). No default
_labelNo
Number of the next case to produce. This field is 1 except on restart or last case. Default: 1
_remaining
Remaining order size (in units). Default: 1
_content
Content (in units) of a full case. Default: Value from label description.

Sample:

_labelNo _remaining _content
1103
273
343
413

Sample Field Mapping

SCADA Field LPSNG field
VE_Print_layoutitemId
Batch_LOTlot
Batch_ExpDate_VE_ReadableExpDate
Batch_CartonPerCase_content
Batch_LOT_Size_remaining

XML Interface

HTTP(s) POST http://<ipaddress>/dataProvisioning?master=<guid>

<data VE_Print_Layout="5564-9105" Batch_LOT="JMXXXA" 
Batch_ExpDate_VE_Readable="12.2013" Batch_LOT_Size="120" 
Batch_CartonPerCase_VE="10" _labelNo="1" />

Where:

<ipaddress>
IP Address of LPSNG
<guid>
Printer specific master id (GUID). This id is supplied during system integration by RSJ.

The post data must be application/x-www-form-urlencoded.

Returncode

The following HTTP status codes have special meaning;

200
Successful completion.
400
Invalid format
401
Unauthorized (OAuth2 missing or invalid)
402
Recreate OAuth2 access token and retry
404
Not found (eg master or itemId)

Form Interface

HTTP(s) POST http://<ipaddress>/dataProvisioning

master=<guid>&VE_Print_Layout=5564-9105&Batch_LOT=JMXXXA&
Batch_ExpDate_VE_Readable=12.2013&Batch_LOT_Size=120& 
Batch_CartonPerCase_VE=10&_labelNo=1 />

Where:

<ipaddress>
IP Address of LPSNG
<guid>
Printer specific master id (GUID)

The post data must be application/x-www-form-urlencoded.

Returncode

The following HTTP status codes have special meaning;

200
Successful completion.
400
Invalid format
401
Unauthorized (OAuth2 missing or invalid)
402
Recreate OAuth2 access token and retry
404
Not found (eg master or itemId)


Vision Control Interface

The Vision Control Interface allows vision systems to query LPSNG about validation rules for the last label created.

Interface

HTTP GET http://<ipadress>/visionControl?master=<guid>

Where:

<ipaddress>
IP Address of LPSNG
<guid>
Printer specific master id (GUID)

Result

XML document with validation rules for the last label created

<validation>

<page orientation="1"/>

<ocr action="0" content="JMXXX1" direction="0" invers="0" 
xpos="54.0901464968" xsize="38.2102575016" 
ypos="66.8185382964" ysize="11.8397021459"/>

<barcode action="0" content="2638B3924" direction="90" invers="0" 
type="Code-128" xpos="237.147304083" xsize="23.9093424133" 
ypos="25.2189983354" ysize="76.8463686448"/>

</validation>
  • All coordinates are in points (1/72 inch).
  • Base point is the upper left corner of the label.
  • Angles are in degrees counter clockwise based on the the x axis (possible values are 0, 90, 180 and 270)
  • Fields are described as printed (ie with no tolerance added)
  • Position (and size) of fields, which are part of container fields are given as position and size of the the container field (which might contain other fields)

Returncode

The following HTTP status codes have special meaning;

200
Successful completion.
400
Invalid format
401
Unauthorized (OAuth2 missing or invalid)
402
Recreate OAuth2 access token and retry
404
Not found (eg master)

Vision Status Interface

The Vision Status Interface allows vision systems to display status images (eg result of last scan) in the LPSNG device control interface.

The status images is updated (without the need for a browser refresh)

HTTP(s) GET http://<ipaddress>/visionStatus?master=<guid>&url=<url>

Where:

<ipaddress>
IP Address of LPSNG
<guid>
Printer specific master id (GUID). This id is supplied during system integration by RSJ.
<url>
URL of vison image to display. The vision system could serve this URL on it's own or (if it is residing on the same system as LPSNG) use LPSNG to do so (by configuring LPSNG to serve the.file).

Industrial Integration

LPSNG can be integrated in industrial production processes.

The following interfaces are available:

  • Data Provisioning Interface
  • Vision Control Interface
  • Vision Status Interface

The interfaces are provided via REST HTTP.

If the system is configured for mandatory authentication, all requestes have to be authenticated via OAuth2

© Copyright 2011-2016 by RSJ Software GmbH Stockdorf. All rights reserved. - Version:1.11.0007