MT-SICS driver for scales

Prev Next

Using the MT-SICS Scale Driver

A guide to the MT-SICS Scale Driver for Tulip

Player Information

This driver will only be available for Player 2.8.0 and above. Please reach out to developer@tulip.co to put this on your instance.

This article describes the capabilities and configuration associated with the MT-SICS (e.g., Sartorius) scale driver in Tulip.

Overview

In this article, we'll focus on the connection between Tulip and an MT-SICS compatible scale, such as a Sartorius scale. We'll cover how to configure the connection and then explore the driver's capabilities, such as getting weight, taring, and zeroing the scale. You'll need the scale connected to your Windows PC and the appropriate Feature Flag enabled in your Tulip instance.


Configuration

To configure your MT-SICS scale to be used with Tulip, follow the steps below.

Prerequisites

  1. Connect the Scale: Plug your Sartorius (or other MT-SICS compatible) scale into your Windows PC, typically via USB or a serial connection.
  2. Windows Configuration: Ensure your Windows PC can recognize the connected scale. If it's a serial connection, note the COM port assigned by Windows (though the driver can help list these).

Tulip Player Configuration

Connection to the scale is managed through the Tulip Player. The following steps are typically performed on the Player Driver page within a relevant Tulip application (e.g., a Driver Unit Tests app):

  1. Navigate to MT-SICS Driver:
    • Open the Tulip Player.
    • Go to the designated page for device drivers (often labeled "Player Driver Page" or similar within your testing/utility app).
    • Locate and select the "MT-SICS" button or section.

image.png{height="" width=""}
2. Identify COM Port:
* Click the List serial devices button. This will query the system and display available COM ports.
* Identify the COM port corresponding to your connected scale.

image.png

  1. Establish Connection:
    • Enter the identified COM port into the appropriate field.
    • Enter the baud rate. For many Sartorius scales using MT-SICS, this is typically 115200.
    • Click the Connect button. A success message or status indicator should confirm the connection.

Troubleshooting

  • Unable to List COM Port:
    • Ensure the scale is properly connected to the PC and powered on.
    • Check Windows Device Manager to see if the scale (or its USB-to-Serial adapter) is recognized and if a COM port is assigned.
    • Try reconnecting the scale or restarting the Tulip Player.
  • Connection Fails:
    • Verify the correct COM port and baud rate are entered.
    • Ensure no other application is currently using the same COM port.
    • Check if the CUSTOM_EDGE_DRIVER_MT_SICS_SCALE Feature Flag is active.

Capabilities

The MT-SICS Scale driver allows network-connected or directly connected (e.g., via USB/Serial) scales to be integrated into Tulip Apps through the Windows Tulip Player.

The driver supports connecting to the scale, retrieving weight, zeroing the scale, taring the scale, and canceling operations.

Functions

The following functions can be used in Tulip Triggers to interact with the connected scale:

image.png

  • List serial devices:
    • Description: Queries the Windows Player machine and lists available serial (COM) ports. Useful for identifying the correct port for the scale.
    • Inputs: None.
    • Outputs: A list of available COM ports.
  • Connect:
    • Description: Establishes a connection to the MT-SICS scale.
    • Inputs:
      • COM Port: The serial port the scale is connected to (e.g., "COM3").
      • Baud Rate: The communication speed for the serial connection (e.g., 115200).
    • Outputs: Status of the connection attempt (success/failure).
  • Get weight:
    • Description: Requests the current weight from the scale. The driver will typically then emit a WeightData event with the reading.
    • Inputs: None (assumes a connection is active).
    • Outputs: Triggers a WeightData event. Ensure your app is set up to receive and display this (e.g., in a "Current Weight" variable).
  • Zero:
    • Description: Sends a command to zero the scale. The scale's display should also reflect this.
    • Inputs: None.
    • Outputs: Triggers an OperationStatus event (success/failure).
  • Zero Immediately:
    • Description: Sends an immediate command to zero the scale.
    • Inputs: None.
    • Outputs: Triggers an OperationStatus event (success/failure).
  • Tare:
    • Description: Tares the scale with the current weight on it. The scale's display should show zero. This command may fail if the weight is too large or outside the tare limits.
    • Inputs: None (uses the weight currently on the scale).
    • Outputs: Triggers an OperationStatus event (success/failure).
  • Tare Immediately:
    • Description: Sends an immediate command to tare the scale with the current weight on it.
    • Inputs: None.
    • Outputs: Triggers an OperationStatus event (success/failure).
  • Cancel:
    • Description: Attempts to cancel any ongoing communication or command with the scale. This may also stop continuous weight updates if the driver was streaming them.
    • Inputs: None.
    • Outputs: Triggers an OperationStatus event (success). "Current Weight" updates may cease.
  • Disconnect:
    • Description: Closes the connection to the MT-SICS scale.
    • Inputs: None.
    • Outputs: Status of the disconnection attempt.

Events

The following events can be used in Tulip Triggers to react to information or status changes from the scale driver:

  • Error:
    • Description: Indicates an issue with the driver or communication with the scale.
    • Payload: Contains a message detailing the error.
  • WeightData:
    • Description: Fired when new weight information is received from the scale, typically after a Get weight command or if the driver is set to stream weight.
    • Payload: Contains the weight (numeric value) and unit (e.g., "g", "kg"). This should be stored in a Tulip variable to display "Current Weight".
  • OperationStatus:
    • Description: Indicates the result of an executed command (e.g., Zero, Tare, Cancel).
    • Payload:
      • status: "success" or "failure".
      • message: Additional information about the operation's outcome (e.g., "Tare successful", "Tare failed: overload").