Configure and Use Scales

Configure and Use Scales

You are here:

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 WebHID 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.

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

Configure WebHID Scales in Dynamic Ship Scale Setup

WebHID 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.

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

  1. Select Test Scale from the ribbon.
  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.

Handling Scales That Are Read Incorrectly with WebHID

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

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 WebHID implementation, WebSerial, or another service. This event is required to populate the out variables; not doing so may lead to unexpected runtime errors.

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.

Was this article helpful?
5 out Of 5 Stars

1 rating

5 Stars 100%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?

Leave A Comment

Go to Top