---
title: "Configure and Use Scales"
app: "Dynamic Ship"
section: "Set up"
last_updated: "2024-09-03"
url: "https://insight-works.com/kb/dynamic-ship/configure-and-use-scales/"
---

# Configure and Use Scales

The following instructions show you how to configure and use scales in Dynamic Ship (version 2.6 and newer).

1. Navigate to the _Dynamic Ship Setup_ page in Business Central_._
2. Set _Scale Integration_ to **Enabled** or **Force UI** under the Weights and Dimensions heading.
3. Open the Dynamic Ship Scale Setup page from _Related_ in the ribbon or from the role center.
4. Set the integration by completing to either Direct USB or PrintNode (see instructions in sections below).

One Dynamic Ship Setup and Dynamic Ship Scale Setup have been completed, you can test the integration:

1. Create a new package (or open an existing one) to use the scale within the Package Worksheet.
2. Navigate to **Actions** > **Functions** > **Scale** > **Get** **Weight**.

 Note: The Scale Dialogue Time Out you see on the _Scale Setup_ page determines how long before the scale’s reading is accepted as correct. It must be greater than zero. If the Setup is configured to Force UI, this value has no effect, and the dialogue remains open until you select **OK**.

The package is updated with the weight read from the scale.

### Configure Direct USB Scales in Dynamic Ship Scale Setup

 Note: Direct USB requires the printer to be USB HID compatible.

Direct USB uses your browser to connect to a local USB-connected scale. Most Chromium-based browsers support this feature (e.g., Google Chrome and Microsoft Edge); other browsers do not (e.g., Safari and Firefox). You can find supported browsers [here](https://caniuse.com/webhid).

Once you have the scale integration configured to Direct USB, complete the following:

1. Select **Test Scale** from the ribbon.

Note: If your browser is not supported, you receive the following message: “This web browser does not support Direct USB to communicate with USB devices.”

1. Select **Connect**.
2. Select the appropriate scale and select **Connect**.
3. Return to and complete _Configure and use scales in Dynamic Ship_ instructions_._

You can now see the scale and read its weight in real time.

### Configure PrintNode Scales in Dynamic Ship Scale Setup

This uses PrintNode services to communicate with any scale connected to a machine with the PrintNode client. You must have an active account and the client running on the computer with the scale connected.

Once you have the scale integration configured to PrintNode, you must enter your API key.

1. Retrieve the API key from your PrintNode account.
2. Copy the key and insert it into the appropriate field in the scale setup.
3. Open the PrintNode client and ensure that scales are enabled and yours is visible.
4. Open the Logs tab and note the Computer ID.
5. Select **Add Computer ID** in the ribbon.
6. Insert the Computer ID.
7. Select **Test Scale**.
8. Return to and complete _Configure and use scales in Dynamic Ship_ instructions.

If the client is running, the account is correctly licensed, and the scale is connected, you can see a readout of the current weight that aligns with PrintNode client.

### Advanced Configuration

When attempting to use the scale, you may see an error if the system could not determine the mapping automatically. The Advanced Configuration section shows you what to do in that situation.

#### Missing Scale Mapping

If you receive an error informing you that “the Scale Unit of Measure Mapping is missing for [X]” (e.g.,  g, kg, oz, lb or other), configure a relation between X and Insight Works’ Unit of Measures.

1. Open the Scale Unit of Measure Mapping, either by navigating from the Related in the Scale Setup, or by searching for it.
2. Insert X (from the error) in the Scale Unit of Measure column.
3. Select or create the appropriate unit of measure (e.g., KG equals KILOGRAM).
4. Leave the Scale Name column blank to use this mapping for all scales.

 Note: If this mapping should only be used for a specific scale, insert the name displayed on the scale’s weight dialogue.

#### Handling Scales That Are Read Incorrectly with Direct USB

There are two events you can use, and they are published in the DSHIP Event Publisher codeunit. These events are:

![](/wp-content/uploads/kb-legacy/dship-use-scales2-2-600x216.png)

![](/wp-content/uploads/kb-legacy/dship-use-scales3-600x154.png)

These events provide you with the raw device data. Device data is a comma-separated string of integers. The integers are byte values. The data is an unprocessed stream from the device, so it follows the HID standards for scales.

You can utilize this to manipulate the data as needed (e.g., if you are applying the scale incorrectly or the scale is returning data in a non-standard way). You can overwrite data with the after event or handle it in its entirety.

There is also final event, OnAfterGetWeight(), that you can use to manipulate the data. It only provides the Business Central-valid data after processing.

#### Adding Additional Integrations

To add additional integrations, you must extend the DSHIP Scale Implementation enum. Once extended and configured within the Scale Setup, it triggers an event from the DSHIP Event Publisher codeunit.

With this event, you can add any additional implementation you require. This could be a new Direct USB implementation, WebSerial, or another service. This event is required to populate the out variables; not doing so may lead to unexpected runtime errors.

![](/wp-content/uploads/kb-legacy/dship-use-scales4-600x142.png)

#### Overriding Scale Handling Entirely

To replace all scale handling, including the existing implementations, you can use an event from the DSHIP Event Publisher codeunit. This allows you to replace the entire functionality to go through any process type required.

![](/wp-content/uploads/kb-legacy/dship-use-scales5-600x130.png)
