Electronic Scale Integration#
The Weigh and Dispense pages make some assumptions about the communication with the electronic scale through the application message bus. This page describes the structure of the messages and the integration workflows for positive and negative weighing.
Info
The scale Resource must integrate with the system, so that the Weigh and Dispense wizard receives the values of the scale automatically. For the configuration of the scale, see Configure Weigh and Dispense.
Message Structures#
1. Instrument Configuration#
| Type | Subject |
|---|---|
| RequestReply | Measurement.[ResourceId].Setup |
Table: Instrument configuration message
The SetTare property is true or false.
2. Begin Weighing#
| Type | Subject |
|---|---|
| RequestReply | Measurement.[ResourceId].Start |
Table: Begin weighing message
The ResetTare property is true or false.
3. Stop Weighing#
| Type | Subject |
|---|---|
| RequestReply | Measurement.[ResourceId].Stop |
Table: Stop weighing message
4. Notify Weight Value#
| Type | Subject |
|---|---|
| RequestReply | The SendToSubject that the Begin Weighing request defines |
Table: Notify weight value message
{
"Timestamp": "2019-02-05T11:17:51.626Z",
"Value": 1234.5678,
"IsStable": false,
"Extra": {
"TareValue": 0,
"WeightIncludesTare": false,
"WeighingUnits": "Kg"
}
}
5. Interface Events#
| Type | Subject |
|---|---|
| RequestReply | Measurement.[ResourceId].Event |
Table: Interface events message
The interface sends this message structure for the following events:
- Dispense and Continue
- Dispense and Reset
- Dispense
- Begin weighing
- Complete weighing
- Scale change
- Weighing mode change, from positive to negative or from negative to positive
- Undo
- Page close, when the operator closes the page abruptly
- Ingredient selection, when the operator switches ingredients or opens the Weigh and Dispense page
The following examples show the message for three events.
Example 1: Weighing mode change.
Example 2: Ingredient selection.
{
"OperationType": 13,
"Data": {
"tareValue": 0,
"dispensedQuantity": 0,
"requiredQuantity": 3,
"bomProductName": "BomAutomationWD#IG.4ToFlour.6",
"bomProductId": "2002110227330000006"
}
}
Example 3: Generic event.
Integration Workflows#
The following workflows describe the interaction between the Weigh and Dispense GUI, the equipment integration, and the scale.
Positive Weighing#
- When the Weigh and Dispense GUI starts, it sends a
Startrequest to the equipment integration and setsResettotrue. The equipment integration resets the tare, if the scale supports it, and stores theTareValue. It reports the weight and the tare to the GUI withReportValue, including whether the weight includes the tare. The GUI setsGUIWeightValueandGUITareValue. - When the operator selects Set Tare & Begin, the GUI sends
Configure (Positive). If the scale supports it, the equipment integration performs a remote tare and stores theTareValue. The GUI setsGUITareValuetoTareValue. - The equipment integration reads the weight of the scale with
GetValueand reports it to the GUI. When the weight includes the tare, the GUI calculatesGUIWeighasWeightValueminusTareValue. Otherwise,GUIWeighisWeightValue. - On a partial or complete dispense, the GUI sends the
Startrequest again, setsResettotrue, and the workflow repeats.
Negative Weighing#
- When the Weigh and Dispense GUI starts, it sends an
Initializerequest to the equipment integration and setsResettotrue. The equipment integration resets the tare, if the scale supports it, and stores theTareValue. It reports the weight and the tare to the GUI withReportValue. The GUI setsGUIWeightValueandGUITareValue. - When the operator begins weighing, the GUI performs the action alone and sends no message to the equipment integration. When the weight includes the tare, the GUI sets
GUIGrossWeightoWeightValue. Otherwise, it setsGUIGrossWeightoWeightValueplusTareValue. - For each new
ReportValue, the GUI calculatesGUIWeightValue. When the weight includes the tare,GUIWeightValueisGUIGrossWeighminusWeightValue. Otherwise, it isGUIGrossWeighminus the sum ofWeightValueandTareValue. - On a partial or complete dispense, the GUI sends the
Initializerequest again, setsResettotrue, and the workflow repeats.
Expected Result#
You know the messages and the workflows that the equipment integration must support, so that the Weigh and Dispense pages receive the values of an electronic scale.

