Operating an Instrument Widget
Each instrument connection is associated with an instrument widget.
To capture data from an instrument, the following steps must be taken:
- Launch the instrument widget on the instrument workstation.
The instrument widget's configuration file contains instrument connections.
The instrument widget performs an instrument connection search, to read and return instrument connection details for the instrument connection configured by the CCINST—Instrument application. These details include the EFS folder and filename that is used for instrument data upload to CCLAS.
The widget is configured either to:
- Read data directly from the instrument's RS232 port and write it to a local file and then place that file on the EFS folder with the required filename.
- Access a local file that was placed on the local drive by the instrument operator, or by some other means.
and then place that file on the EFS folder with the required filename.
- The instrument operator selects an instrument connections in the instrument widget, and starts by double-clicking the row.
- Launch a workbook session using the CCWKOP—Open Workbook application.
- Select an instrument connection and start data capture.
An instrument data capture session is run as a separate process.
If the browser running the workbook session crashes, then instrument capture can be stopped as soon as possible by detecting whether the CCWKOP—Open Workbook application is still running. The workbook instrument data capture process does by using the workbookSession.workbookUIInstrumentTimeoutInMilliseconds property, such that, when the time-out is >0 and the time at which last workbook heartbeat was received (a workbook heartbeat is sent every 10 seconds) is greater than the time-out, then the workbook instrument data capture process terminates itself. The default value of the time-out property is 0, to apply no time-out.
- If the instrument requires a manual trigger to export its data via the RS232 port or file, then the operator must initiate this on the instrument.
- As data is detected by the instrument widget, it is uploaded to the appropriate file in the EFS folder.
The workbook instrument data capture process uses the logic in the instrument script to:
- Read the instrument data from the filename contained within the EFS folder, as configured by the instrument connection.
The FILE_CHECK_DURATION_IN_MILLISECONDS application preference is set to ensure a file is fully copied before it is processed for result upload: Set the FILE_CHECK_DURATION_IN_MILLISECONDS Preference.
- Format the instrument data as captured from the instrument into a consistent format and pass it to the workbook session.
- Remove consumed instrument data files.
- Read the instrument data from the filename contained within the EFS folder, as configured by the instrument connection.
The instrument widget, workbook and file instrument capture locate files with a case-insensitive file mask.
When the workbook is launched in normal or worklist mode to upload instrument results to CCLAS, then the instrument script is re-enabled to proceed.
An instrument connection's capture session ID is updated for every capture start, such that, where the instrument connection's capture session ID is empty, or it is not empty but the capture session's ID does not match an existing workbook or background file capture session's ID, then the instrument connection's capture session ID is updated to contain the current capture session's ID.
To overcome network latency issues when uploading results from a file, the FILE_CHECK_DURATION_IN_MILLISECONDS application preference allows the file upload process to wait until the entire file is uploaded from the network before it is processed.
