4. Interface Specification¶
4.1. Copyright¶
Copyright Creare LLC 2016. This software specification is proprietary and should be considered confidential. Reproduction or distribution prohibited without written permission from Creare.
4.2. Revision Log¶
Date | Author | Changes |
---|---|---|
4/7/2017 | MCR | Added mode and error check to BioTek Application Interface section. |
4/7/2017 | MCR | Added firmware update. |
3/29/2017 | MCR | Broke example-interface section out into new Development Interface section. |
3/8/2017 | MCR | Minor tweaks to example-interface section. |
3/3/2017 | MCR | Added example-interface section. |
4.3. Overview¶
This document describes the software interface that interacts with the DMS firmware. The host software invokes the commands enumerated in the Interface Control Document (which call the DMS to execute the functions defined in the Firmware Specification) and then handles any results returned. There are two primary components of this interface:
- A GUI which allows comprehensive interaction with the DMS for purposes of alignment, calibration, and debugging. This GUI will only be accessed by trained technicians, not by the end-user.
- A simple, low level interface which the BioTek host application uses to send simple commands and recieve fault detection data from the DMS during normal operation.
4.4. Host¶
For product roll-out, the DMS will be controlled by a PC (Windows 7 or later) over a USB Interface. In the future, different devices may interact with the DMS and act as its host, such as the dispenser itself, which runs Windows CE. The expectation is that the same USB interface will be used in all cases.
4.5. Configuration GUI¶
A GUI is required to invoke the firmware commands enumerated in the Interface Control Document and display the results. This GUI will be activated from within the BioTek host’s user interface. It will be used only by technicians trained to align, calibrate, and debug the device. It will not be available to end-users.
4.5.1. GUI Paramters¶
Parameters stored in the GUI are tabulated in Table 4.2:
Parameter | Description |
---|---|
dms_id |
The ID of the currently connected DMS (See ID). |
file_string |
A string that is inserted into all saved filenames for identification purposes. Default is an empty string. |
save_path |
Path where all files are saved. Default is a data folder in the DMS GUI software base path. |
4.5.2. GUI Functions¶
The GUI should have buttons to perform the following operations. (See Supported Commands Summary.)
- Connect to DMS. List all DMS systems physically connected to the host and allow the user to select one to activate. Assign the result to
dms_id
(See Table 4.2 above.) Display the ID of the active DMS at all times, and send commands only to this unit. (SeeID
command.)- Edit dispense parameters. Display an editable list of the Table 3.8 Configuration Data in a pop-up window. Provide confirmation and cancel buttons. (See
CONFIG-GET
andCONFIG-SET
commands.)- Edit file strings. Allow user to edit
file_string
andsave_path
. It would be nice if there was a ‘browse’ button for thefile_path
. (See Table 4.2 above.)- View background. Invoke
GET_CALIBRATION
and displayBackground
as a bar plot. For display, the data should be normalized at the ADC full scale and the y-limit fixed at 1. Ifcal_bin_edges
is defined, indicate these values on the bar plot by overlaying bold vertical lines at the appropriate pixel locations. (See Get Calibration.)- View calibration parameters. Invoke
GET_CALIBRATION
and display the Table 3.10 Calibration Data (exceptcal_background
andcal_image
) in a text format in a pop-up window. Also displaycal_image
as a bar plot. For display, the data should be normalized at the ADC full scale and the y-limit fixed at 1. Ifcal_bin_edges
is defined, indicate these values on the bar plot by overlaying bold vertical lines at the appropriate pixel locations. (See Get Calibration.)- Initiate alignment mode. Show a live bar-graph of the raw detector signal using the
STREAM
function. Overlay a line plot ofcal_background
on top of this dynamic bar plot (see Get Calibration.) For display, the data should be normalized at the ADC full scale and the y-limit fixed at 1. Provide a button or keystroke to exit this mode.- Update dark level. Prompt the user to cover the sensor. After the user confirms, invoke
CALIBRATE(1)
. Report both the original and the resultingDark_Level
(Calibration Data) in an informational pop-up window.- Collect new background. Prompt the user to confirm that they want to overwrite the current background. Prompt the user to confirm that the laser is aligned, no dispense cartridge is in place, and the optical path is clear. Then run the
CALIBRATE(2)
. Display the resulting background using the function defined in item 4 above.- Calibrate. Prompt the user to install the calibration cassette. Then run
CALIBRATE(3)
. Display the resulting calibration using the function defined in item 5 above. Upon user confirmation, runSTORE_CALIBRATION
.- Record raw data. Prompt user for a record
duration
in seconds (default 10). When user clicks go, runSTREAM
forduration
seconds. Write the returned data to an ASCII file as aduration X 386
array (384 integer pixel values at 12 bit + 2 binary trigger input values). The file name should be[save_path]\[file_string]_DMS_raw_0000.dat
. Increment the integer until eithersave_path
orfile_string
changes. When complete, show the saved file name with full path in an informational popup.- Monitor dispense. Poll
STATUS
to confirmState
isREADY
. If it is not, issue an error in a popup window and reportState
. Otherwise, invokeMONITOR_DISPENSE
. Wait until dispense is complete. PollSTATUS
untilState
is READY (timeout after 15 s). IfLast_Reported_Error
is not zero, report the error in a popup window. InvokeGET_DISPENSE_DATA
. Save the resulting Table 2.6 Dispense Data to[save_path]\[file_string]_DMS_data_0000.dat
on the host in some sensible format. Increment the integer index in the filename until eithersave_path
orfile_string
changes.- Set reference dispense. Invoke
SET_REFERENCE_DISPENSE
. PollSTATUS
. IfLast_Reported_Error
isDMS_ERR_NO_RECENT_HISTORY
, show a popup error message and exit. Otherwise, ifRef_Mode
(Calibration Data) is not'user'
, prompt to set this value, with confirm and cancel buttons. Upon user confirmation, apply this value usingCONFIG-GET
andCONFIG-SET
. (See Fault Detection.)- Set reference mode. Provide a listbox for the user to select one of the valid values of
Ref_Mode
(Calibration Data) as defined in Table 2.2 Configuration Parameters. Upon user confirmation, apply this value usingCONFIG_GET
andCONFIG_SET
(Supported Commands Summary).- Update Firmware. Prompt user to select a valid
DMS.bin
firmware file. InvokeFIRMWARE_BLOCK
multiple times to upload this file to the DMS. InvokeFIRMWARE_GET_CRC32
to get the checksum. Compute the CRC32 of the local file. If the checksums are equal, invokeFIRMWARE_PROGRAM
to install the uploaded binary to non-volatile memory.
4.5.3. GUI Layout¶
The layout of the configuration GUI should be designed around the following typical workflow:
- Connect to DMS will always be the first operation. This should be at the top and always visible.
- To calibrate a newly installed DMS unit:
- Initiate alignment mode.
- Update dark level.
- Collect new background.
- Calibrate.
- View background.
- View calibration paramters.
- Update Firmware will not be used often, but should be easily accessible.
- Manual dispense monitoring for debugging purposes. These commands are only likely to be used by Creare, and are the lowest priority for the BioTek configuration GUI.
- Edit file strings.
- Record raw data.
- Edit dispense parameters.
- Monitor dispense.
- Set reference dispense.
- Set reference mode.
4.6. BioTek Application Interface¶
In addition to being able to launch the GUI described above, the BioTek LHC should also be able to talk automatically to the DMS to do the following during normal operation:
- When initiating a dispense, activate the specific DMS associated with the active dispenser given its known
ID
.- Automatically set the Configuration Data with correct values for the current dispense using
CONFIG-GET
andCONFIG-SET
.- Run
MONITOR_DISPENSE
at least 500 ms prior to each dispense.- Poll
GET_STATUS
until the DMS mode returns toREADY
. Take appropriate action if there is an error code.- Retrieve fault data (
GET_WELL_FAULTS
) after each dispense and make this data available and actionable.- Give the user the ability to run
SET_REFERENCE_DISPENSE
at any time.- Give the user the option to set the
Ref_Mode
(Calibration Data) or runCLEAR_HISTORY
(Supported Commands Summary) at any time.- Automatically run
CLEAR_HISTORY
any time the Configuration Data changes (i.e. new cassette or dispense parameters.)