====3.12. Scale settings==== Define the scale under a [[implementation:wms:weighingroom|weighing room]],[[implementation:wms:docksettings|dock]] or a [[implementation:wms:packingline|packing station]]. One scale can only belong to a single weighing room/dock/packing station. At the scale level the following settings can be defined: {{ :implementation:wms:ose:scale.png |Scale}} //**Active**// \\ Set whether the weighing room is active or not. //**Scale definitions**// \\ Define the scale on the Scale definitions field. If the scale is connected without the ScaleComm service, define it with the one of the following formulas: * Direct connection: com:/ /Port?Baudrate,Databits,Parity,Stopbits \\ Example: com://COM3?9600,8,N,1 * Local network: tcp:/ /IP address\\ Example: tcp://192.168.1.5:4001 If the scale is connected by using the ScaleComm service, tick the //Use as a service// checkbox and define the scale with the following formula: * http:/ /URL of the server where the service runs/scale code (OSE)/communication parameters \\ Example: http://192.168.1.2:9991/SCL01/com://COM3?9600,8,N,1 //**Uom**// \\ Select the unit of measurement of the scale from the Uom dropdown list. //**Minimum weight**// \\ Enter the minimum weigh of the scale in the Minimum weigh field. //**Maximum weight**// \\ Enter the maximum weigh of the scale in the Maximum weigh field. //**Accuracy**// \\ Enter the accuracy of the scale to the Accuracy field. \\ Example: If the number of decimals is 2 – Accuracy: 0.01 //**Scale commands**// \\ Define the scale commands. Select the command type. The following command types are supported: * Set tare * Set zero * Get weight * Weight return The ‘Zero return’ and the ‘Tare return’ commands are not supported yet but are reserved for future use. Add the description to the //Description// field and the command to the //Command format// field. \\ //Command format// \\ Please refer to the user manual of the scale to see the command. The syntax of the Weight return result string should be a regular expression. Example: \\ Weight return string from the scale manual:

w1w2w3w4w5w6w7w8u1u2H1H2H3 Weight return string defined for the scale on the Organizational Structure: \x0a *(?'weight'.+)(?'uom'..)\x0d\x0a.+\x0d\x03 ===3.12.1. Defining multiple scales through one port=== **//Produmex WMS Organizational Structure//** \\ First create a ‘scale’ type element in the Organizational Structure of Produmex WMS for the port. \\ Add a unique code and name. Example: PORT, Port for scale Define the port on the Scale definitions field with one of the following formulas: * Direct connection: com:/ /Port?Baudrate,Databits,Parity,Stopbits \\ Example: com://COM3?9600,8,N,1 * Local network: tcp:/ /IP address \\ Example: tcp://192.168.1.5:4001 Do not check the ‘Use as service’ checkbox. \\ The ScaleComm service will establish the connection to the port based on the configuration file of the ScaleComm service. The scales connected through the port will be identified based on the sent command. Select the command type and add the scale codes and the scale command to the Command format field using the following formula: //scale code;command;scale code;command// Example: \\ Get weight command: scale01;S6R$;scale02;S7R$ Where: * ‘scale01’ = scale code of the first scale * ‘S6R$‘= get weight command of the first scale * ‘scale02’ = scale code of the second scale * ‘S7R$’ = get weight command of the second scale Weight Return command: (?'weight'.+)\x0d\x0a;(?'weight'.+)\x0d\x0a The order and the number of the scale commands must be the same as in the 'Get weight command'. {{ :implementation:wms:ose:scale_2.png |Scale}} **//ScaleComm service//** \\ Open the [[implementation:wms:app_config#application_configurations_for_the_scalecomm_service_only|configuration file]] of the ScaleComm Service. Add the code of the port defined in the Organizational Structure as the value for ScalesCodes. Example: Make sure that the ‘Skip Polling’ option is set to ‘False’ and adjust the ‘Polling Interval’ if needed. **//Scale weigh result//** \\ Open the [[implementation:wms:scwr|Scale Weigh Result user table]] via the following path: Tools> Default forms. Add the scale codes defined on the Command format field as the ‘Code’. When the ScaleComm Service runs, it will add the weight to the ‘Weigh’ field of the matching scale. {{ :implementation:weigh:config:scale_weigh_result.png |Scale Weigh Result}}