GCMS
More information
WebinarsAbout usContact usTerms of use
LabRulez s.r.o. All rights reserved. Content available under a CC BY-SA 4.0 Attribution-ShareAlike

Clarity UNI RUBY DEVELOPMENT

Presentations | 2023 | DataApexInstrumentation
Software
Industries
Other
Manufacturer
DataApex

Summary

Significance of the Topic


Control software for analytical instruments relies on robust driver scripts. Using a structured Ruby scripting framework enhances flexibility and maintainability when integrating various device types into chromatography data systems. This approach supports rapid development, simplifies updates, and fosters consistent user interfaces across instruments.

Objectives and Overview of the Document


This guide presents the architecture and best practices for creating instrument drivers in the Clarity software environment using the UNI Ruby framework. It outlines the lifecycle of a driver script, covers class hierarchies for devices and subdevices, and explains key programming concepts such as communication handling, user interface components, and workflow hooks within Clarity.

Methodology and Instrumentation


  • Software platform: DataApex Clarity CDS with embedded Ruby interpreter
  • Scripting language: Ruby (UNI Ruby dialect), device wrapper SDK
  • Communication channels: serial (RS232), TCP/IP, USB (FTDI or SiUSBXp chipsets)
  • Utilities: Text editor with Ruby plugin, Termite terminal for RS232 testing, DbgView for debug output

Main Results and Discussion


  • Script Structure
    • Two main classes: DeviceWrapper and SubDeviceWrapper
    • Framework lifecycle methods: Init, InitCommunication, InitConfiguration, CmdTimer, CmdSendMethod, CmdLoadMethod, error handlers
    • Global variables ($) for script scope and instance variables (@) for device attributes
  • User Interface Elements
    • Configuration, Method, and Monitor pages created via AddString, AddDouble, AddCheckBox, AddChoiceList, AddTable
    • Value retrieval with GetString, GetInt, GetDouble, GetTableColumnValues
  • Communication Handling
    • CommandWrapper for sending and parsing ANSI or binary frames
    • Custom frame detection with FindFrame, SetFrameStart, SetFrameEnd
    • Error and exception management via ReportError and Ruby syntax checks
  • Device Specific Implementations
    • Thermostat, pump, autosampler, detector, fraction collector each subclass a dedicated wrapper to define behavior
    • Auxiliary signals, inputs, and outputs integrated through framework APIs
  • Localization and Debugging
    • String translation via custom t function using a global hash
    • Debug tracing through TracePipe and Trace utilities

Benefits and Practical Application of the Method


The described framework enables laboratories and instrument vendors to deliver consistent and feature-rich device drivers without extensive C++ coding. It streamlines integration of new hardware, simplifies validation workflows, and offers a unified control interface for operators, boosting efficiency in routine QA/QC and research tasks.

Future Trends and Opportunities


Anticipated developments include automated code generation for common device patterns, AI-assisted script creation to reduce manual coding, and deeper integration with cloud-based data platforms. Expanding support for additional communication protocols and modern hardware interfaces will further enhance the adaptability of the framework.

Conclusion


Implementing instrument drivers with the UNI Ruby framework in Clarity CDS provides a modular and extensible approach to device integration. By leveraging structured class hierarchies, standardized UI components, and robust communication routines, developers can accelerate deployment and maintenance of analytical instruments within chromatography data systems.

Reference


  • UNI Ruby DataApex Help and DeviceWrapper Class Reference

Content was automatically generated from an orignal PDF document using AI and may contain inaccuracies.

Downloadable PDF for viewing
 

Similar PDF

Toggle
Clarity Control Module ADVANTEC CHF122SC
ADVANTEC CHF122SC Clarity Control Module ENG Code/Rev.: M161/90B Date: 2024-11-13 DataApex Ltd. Phone: +420 251 013 400 Petrzilkova 2583/13 [email protected] 158 00 Prague 5 www.dataapex.com Czech Republic ® are trademarks of DataApex Ltd. Microsoft® and WindowsTM are Clarity®, DataApex® and…
Key words
fraction, fractionsignal, signalfulfilled, fulfilledvial, vialstart, startstop, stopdetector, detectorclarity, claritydialog, dialogsetup, setupderivative, derivativedecreases, decreasescollector, collectorfirst, firstcollection
UNI Ruby
UNI Ruby
2024|DataApex|Manuals
UNI Ruby Set of tools for easy and quick development of control modules Control modules are pieces of software creating a bridge between Clarity CDS and chromatographic hardware as detectors, thermostats, pumps, etc. Sometimes you might want to control a…
Key words
ruby, rubyuni, unicontrol, controlclarity, claritymodule, modulemodules, modulesscript, scriptnotepad, notepadplugins, pluginsyour, yourfile, fileopen, openyou, youplugin, pluginwhat
Clarity – Ordering Guide
Clarity – Ordering Guide
2024|DataApex|Guides
Clarity – Ordering Guide This document shall provide basic guidelines on the compatibility of available Clarity Software products and an alphabetical list of part numbers (p/n). This document is further referenced to following documents: • D004 –List of controlled instruments…
Key words
clarity, claritycable, cableservices, servicesaccessories, accessoriesextension, extensionmodule, modulechs, chslite, litecontrol, controlupgrade, upgradeproduct, productcolibrick, colibrickbasic, basickbcb, kbcbinterface
Clarity Control Module DEMO GCXGC MODULATOR
DEMO GCXGC MODULATOR Clarity Control Module ENG Code/Rev.: M205/100A Date: 2025-05-12 DataApex Ltd. Phone: +420 251 013 400 Petrzilkova 2583/13 [email protected] 158 00 Prague 5 www.dataapex.com Czech Republic ® are trademarks of DataApex Ltd. Microsoft® and WindowsTM are Clarity®, DataApex®…
Key words
demo, demogcxgc, gcxgcmodulator, modulatorclarity, clarityuni, unidataapex, dataapexdialog, dialogdevice, deviceitem, itemsetup, setupruby, rubycontrol, controlcontents, contentsmodulation, modulationtext
Other projects
LCMS
ICPMS
Follow us
More information
WebinarsAbout usContact usTerms of use
LabRulez s.r.o. All rights reserved. Content available under a CC BY-SA 4.0 Attribution-ShareAlike