As the first step, install the Serial Grabber. The Serial Grabber is an application that tests the connection and the configuration of the scale.
You can download the application from here: FTP
Make sure the scale is connected and visible in the device manager. Only continue if the scale is visible.
The configuration steps might differ based on the used device. In this documentation we describe the configuration steps of a Mettler Toledo PS60 scale.
Check the following setup parameters of the scale:
Mettler Toledo PS60 example
In order to check the scale settings, follow these steps:
|Parameter||Scale display||Example Value|
|Number of Databits per ASCII Characters||ASCii||7|
|Number of Stopbits||StoP||1|
Test the scale connection with the help of the SerialGrabber application.
Run the application and fill in the values:
1. Port: The port number. You can check the port number on the Device Manager.
2. Baudrate: The Baudrate value.
3. Databits: The number of Databits per ASCII characters.
4. Parity: The Parity value.
5. Stopbits: The number of Stopbits.
Add any scale command to the field next to the ‘Send’ button (6) then press the button. You can look up the scale command in the documentation of the scale. Make sure that you use a valid command used by the given scale.
The response of the scale is displayed on the field below the command in the following format:
7. TX: entered command
9. returned command in HEX
10. returned command in ASCII
In the example we used the get weight command for the Mettler Toledo PS60 scale which is ‘W’.
In return, the Serial Grabber displays the return weight command displayed in hexadecimal and in ASCII characters.
Serial Grabber does not support special characters except for the line feed (\n) and carriage return (\r) characters.
If you have to include another special character(s) in the entered command, you can use Docklight instead of SerialGrabber. You can download the evaluation version of Docklight from here: https://docklight.de/downloads/
Create a scale in the Organizational Structure. For more information about the scale settings please see: Scale settings.
First define the scale connection. Make sure that you use the correct scale parameters when you define the communication parameters. In some cases it is possible that the connection can be established with incorrect parameters but the scale returns the result in incorrect characters if the connection is not set properly.
Example: Scale definition for the Mettler Toledo PS60
The following parameters are required in order to define the scale connection:
If the scale is connected through direct connection, the scale definition is:
If the scale is connected through the ScaleComm service, the scale definition is:
Then set up the scale commands based on the manual of the given scale. The weight return command is used to return the captured weight into the Produmex application. The weight return command must be defined as a regular expression.
You can use the RegExTester tool to test your regular expression for the weight return command. Download the tool from here: FTP
Example: Weight return command for the Mettler Toledo PS60
On the SerialGrabber we can see that the scale returns the following HEX command:
02 30 30 31 2E 39 30 0D
The HEX command starts and ends with a control character, in this example the start control character is ‘02’ and the end control character is ‘0D’.
|HEX code||Regexp code|
The string between the control characters is the weight. The weight in the expression should always be surrounded by (?’weight’). Because the weight string can contain any character and has no defined length, we also add the ‘.’ (match any character operator) and the ‘+’ (match one or more operator) to the expression.
Therefore the regular expression for the weight return command is: \x02(?'weight'.+)\x0d
Set up the scale on the Scale definition user table:
Link a scale to a thin client on the Defines the weighing scales available to a specific thin-client user table.
Please note: Only one scale can be hooked up to a thin client.