The Keyboard Interface
The keyboard interface allows QBench LIMS users to use any mobile device to receive communication directly from an instrument that typically communicates unidirectionally, such as an analytical balance or a pH meter, directly to their cursor location. This interface type is generally intended for use with the QBench Desktop App but also supports custom user-built interfaces using the API.
Using the Keyboard Interface requires at least one "Managed Interface" subscription (or a subscription package that includes one).
This article covers how to use the keyboard interface, and a developer guide on how to program your own interface.
- User Guide - Interface Setup
- User Guide - Using the Keyboard Interface
- Developer Guide - How to Send Data via the API
User Guide - Interface Setup
Important: Keyboard Interface drivers are currently in beta. If you do not find the driver corresponding to your needs please contact your Account Manager.
At a high-level to set up the interface you will to do the following:
- Download the QBench Desktop App on a PC that has connectivity to the instrument (either directly via serial, via ethernet, or via a device server).
- Set up a driver for the appropriate instrument (or select a generic driver if applicable). Contact your Account Manager if you're unable to find a driver that suits your needs.
- Start the interface in the Desktop App.
User Guide - User the Keyboard Interface
As a user to receive data transmission from an instrument you will need to select the appropriate interface from the dropdown menu in the main navigation bar. The graphic below shows what the connection process looks like. When successfully connected the icon will turn green indicating that instantaneous communication is online and that any data transmitted on the interface will be placed at the position of your cursor within the browser window.
Developer Guide - How to Send Data via the API
The QBench API also supports the ability to program your own custom Keyboard Interface. To use your own custom interface you will need to perform the following steps.
- Register your interface with at least a name, ID, and with the type parameter set to KEYBOARD_INTERFACE. The screenshot below shows a list of managed interfaces with one interface having the necessary parameters set.
- To register the interface use the following endpoint:
- HTTP PATCH <Your QBench instance URL>/qbench/api/v1/managed-interface/<interface_id>
- Example payload:
"type" : "KEYBOARD_INTERFACE",
"interface_id" : "My custom interface",
"name" : "My custom interface"
- After completing step 2 your interface can be selected via the dropdown in the UI. When users select the interface from the dropdown a web socket connection is established allowing near real-time communication.
- To send data to the cursor via the web socket, you simply need do an HTTP POST to the following endpoint:
- HTTP POST <Your QBench instance URL>/qbench/api/v1/managed-interface/<interface_id>/send-to-keyboard
- Example payload:
"data" : "This is my data"