STP Settings

<< Click to Display Table of Contents >>

Navigation:  Reference Section > Installation and Deployment > License GUI >

STP Settings

STP is the service that links PrimeCut NE to the cutting machines, and that serves the Operator Web App - the page an operator opens on a tablet at the machine. One STP service runs for each datastore it serves.

 

The STP Settings dialog configures every STP instance on the server from one place. Before it existed these settings were changed by editing STPService.ini by hand.

 

STP reads its settings only when it starts. Nothing changed here reaches a running service until that service is restarted. The dialog tells you which services are affected when you save, and offers to restart them.

 

Opening the Dialog

In PC4LicGUI, click the Tools menu and choose STP Settings. PC4LicGUI must be running as Administrator, because the dialog writes to the STP program folder and can install, start and stop Windows services.

 

The Tabs

Tab

What it covers

Instances

Every STP service on this machine, with its ports and whether it is installed and running.

Logging

How much detail STP records. These apply to every instance on the machine.

Certificate

The name devices use to reach this server, and the certificate they are asked to trust.

Sign-in list

The Server list on the Operator Web App sign-in page, and this server's operator app address.

Plate Image OCR

How plate markings are read - on the device, or by this server.

Log

STP's own log, with a level filter and a live view.

 

Instances

Each row is one STP service. The default instance serves the datastore named in the settings file; any others are named after the datastore they serve and run as a separate Windows service.

 

Selecting a row shows its ports:

•STP port - the port cutting machines connect on.

•REST HTTP port and REST HTTPS port - the ports that serve the Operator Web App and the REST API. Leave one blank to not serve it at all.

 

Use HTTPS for the Operator Web App. Over plain HTTP a browser will not give the page access to the camera unless the address is the tablet itself, so an operator cannot photograph a plate. Set an HTTPS port and give the devices a certificate to trust.

 

The buttons above the list install, remove, start and stop the Windows service for the selected instance. Ports are checked against every other instance before the settings are saved - two instances sharing a port means whichever service starts second fails to bind.

 

Logging

These settings apply to every STP instance on the machine - there is no instance to choose. Ports are the per instance setting, on the Instances tab.

 

Setting

What it does

Service log level

How much STP records in its own log. Higher means more detail.

REST API log level

How much is recorded for the Operator Web App and the REST API.

Request capture

0 records nothing. 1 records each address requested and the result it returned. 2 also records the contents of those requests and replies.

 

Leave Request capture at 0 or 1 in normal use. Setting it to 2 writes customer data - part names, work orders, plate photographs - into a log file that is not protected the way the database is. Turn it up to diagnose a problem, then turn it down again.

 

Certificate

Host name for devices is the name a tablet uses to reach this server - what you would type into its browser, for example primecut.yourcompany.local. Leave any port off it: a certificate names hosts, not ports, and one certificate is valid on every port the server listens on.

 

This does not change the machine's Windows or network name. It is only ever written into a certificate, and only when the certificate file named below does not exist yet. An existing certificate is never replaced - delete it if you want a new one generated.

 

•Show certificate opens the certificate so you can check its name and thumbprint.

•Trust on this machine adds it to this server's trusted roots. Tablets and phones must still be given it separately.

 

If a browser still warns after the certificate has been trusted, check the thumbprint shown by Show certificate against the one already trusted. An older certificate with the same name does not vouch for a newer one, and the old copy has to be removed.

 

Sign-in list

This tab shows this server's Operator Web App address - the address to give the operators, ending in /primecut-gui/operator/. It follows the host name and ports set on the other tabs, so it updates as you change them.

 

The list below it is the Server list on the sign-in page of that app. Each entry is a label and the root address of an STP server, and choosing one signs the operator in there. Since each STP service serves one datastore, this list is how an operator moves between datastores.

 

•Include this server in the list, so an operator can see which one they are on. Add this server to the list does it for you.

•Use the name a device uses, never localhost.

•Every server listed needs its certificate trusted on the device before it will open.

•Nothing here is checked or discovered - this server cannot ask another one what datastore it holds - so the label is whatever you write.

 

Plate Image OCR

The Operator Web App can read the markings stencilled on a plate from a photograph. A vision model reads the ones the built-in reader cannot. There are two ways to arrange this and they are exclusive - the tick box at the top of the tab chooses which, and only that half of the tab applies.

 

Setting

What it needs

Ticked - read on the device

The tablet calls the reading service itself. It needs the Key the device uses and the list of models an operator may choose from. This is the default.

Unticked - read on the server

This server makes the call on the tablet's behalf. It needs the Key this server uses and the one model it will use.

 

The two keys must be different. The device key is sent to every tablet that opens the operator page and is readable by anyone who opens it, so give it its own spending limit with the account it belongs to. The server key never leaves the server. The dialog refuses to save the same key in both.

 

A key you paste is stored encrypted. STP encrypts it the next time it starts and removes the readable copy, so restart the service after setting one. Each box shows the key it holds with the middle removed, which is enough to tell which key is in place.

 

Log

STP writes one log per day of the month, so the folder holds up to 31 of them and they are reused each month. The tab opens today's.

 

•Show filters what is displayed by severity, from errors only through to everything.

•Track log follows the log as it is written, keeping the newest line in view. It follows the change of day at midnight too.

•Open folder opens the folder the logs are kept in.

 

Reading the log here never interferes with STP writing to it.

 

Warnings About the Settings File

A yellow band across the top of the dialog reports a fault in the settings file itself. Two of these make a setting silently unread rather than wrong, which is worse than an error:

•A mark at the very start of the file hides its first section from Windows, so every setting in that section is ignored and its built-in default used instead. A server can be logging at a level nobody chose while the file plainly says otherwise.

•A section that appears twice, of which only one is ever read.

 

Repair corrects both. It shows exactly what it would change, line by line, and does nothing until you agree. STP itself only reports these faults when it starts - it never rewrites its own settings.

 

Saving

OK and Apply write the settings. If nothing has changed, nothing is written.

 

If any STP service is running, it is still using the settings it started with. The dialog names those services and offers to restart them. Restarting drops the machines connected to that service, so choose a moment that suits the shop floor - the settings are saved either way.

 

See also: License GUI