User Tools

Site Tools


code:commercial:hse-gendaq:architecture

Architecture

Channel Architecture Overview

The architecture separates channel definition, runtime processing and value transport.

  • Channel Config describes what a channel is.
  • Runtime Channel describes how a configured channel is processed inside a runtime task.
  • Data Channel transports the current value of a channel.

All three objects are linked by the same Channel ID.

Channel ConfigChannel IDLabel / UnitTask GroupProject MetadataRuntime ChannelChannel IDTask IndexRaw To Engineering()Engineering To Raw()Data ChannelChannel IDValueTimestampQualityTask BuilderBuild Runtime Channel[]Runtime TaskRuntime Channel[]Read()Write()setup inputcreatescreatescreatessame Channel IDsame Channel ID

Channel Configuration

Notes

  • DAQmx channel configs are specific because they contain DAQmx/cDAQ setup information.
  • Generic Numeric/Boolean Channel Config is used for normal device values without special behavior.
  • Device-specific channel configs are only added when special validation or configuration is needed.
  • Example: Chiller Setpoint Channel Config adds setpoint limits and validation.

Channel Config.lvclassChannel IDLabelShort NameUnitDevice IDTask GroupProject MetadataProject Metadata.lvclassTeststandDevice TypeIO Box TypeProcess TagNI C Series ModuleNumeric Channel Config.lvclassNumeric Transformation Chain[]Boolean Channel Config.lvclassBoolean Transformation Chain[]True TextFalse TextDAQmx AI Voltage Channel Config.lvclassPhysical Channel StringAI Voltage ConfigDAQmx AI Temp TC Channel Config.lvclassPhysical Channel StringAI Temp TC ConfigDAQmx AO Voltage Channel Config.lvclassPhysical Channel StringAO Voltage ConfigInitial Application ValueDAQmx CI Frequency Channel Config.lvclassPhysical Channel StringCI Frequency ConfigDAQmx Digital Input Channel Config.lvclassPhysical Channel StringDI ConfigDAQmx Digital Output Channel Config.lvclassPhysical Channel StringDO ConfigInitial Application StateGeneric Numeric Input Channel Config.lvclassMin ValueMax ValueGeneric Numeric Output Channel Config.lvclassMin ValueMax ValueInitial Application ValueGeneric Boolean Input Channel Config.lvclassDefault StateGeneric Boolean Output Channel Config.lvclassInitial Application StateChiller Setpoint Channel Config.lvclassMin SetpointMax SetpointRamp LimitInitial Application ValueValidate Setpoint()

Task Group defines which runtime handler is responsible for a channel, for example DAQmx.AI, DAQmx.AO, or Chiller. It is used by the builder/dispatcher to group channels and route read/write actions to the correct runtime task or device module.

Data Transformation

Groups reusable value conversion logic used by Channel Config and Runtime Channel classes.

Numeric transformations are optional and ordered. An empty transformation array means the value is passed through unchanged.

Read means converting values into the representation used by the application. Write means converting application values back into the representation expected by the device or API.

Read path:

Device/API Value -> Application Value

Write path:

Application Value -> Device/API Value

Examples:

  • DAQmx voltage input: voltage value → pressure value
  • Digital device API value: device unit → application/SI unit
  • Calibration: measured value → corrected application value

Numeric Transformation.lvinterfaceApply for Read DBL()Apply for Write DBL()Apply for Read DBL Array()Apply for Write DBL Array()Apply for Read DBL Waveform()Apply for Write DBL Waveform()Supports Write()Linear Scaling.lvclassGainOffsetApply for Read DBL()Apply for Write DBL()Apply for Read DBL Array()Apply for Write DBL Array()Apply for Read DBL Waveform()Apply for Write DBL Waveform()Supports Write()Curve Scaling.lvclassCurve DataApply for Read DBL()Apply for Write DBL()Apply for Read DBL Array()Apply for Write DBL Array()Apply for Read DBL Waveform()Apply for Write DBL Waveform()Supports Write()Linear Calibration.lvclassGainOffsetApply for Read DBL()Apply for Write DBL()Apply for Read DBL Array()Apply for Write DBL Array()Apply for Read DBL Waveform()Apply for Write DBL Waveform()Supports Write()Boolean Transformation.lvinterfaceApply for Read Boolean()Apply for Write Boolean()Supports Write()Inverting.lvclassInvert LogicApply for Read Boolean()Apply for Write Boolean()Supports Write()

Channel Config Registry

Central lookup for all static Channel Config objects.

  • Provides channel config lookup by Channel ID, Task Group or any project specific filtering.
  • Used by Task Builder, Data Hub, UIs and other Modules.

Channel Config Registry.lvclassChannel Config ArrayChannel ID MapAdd Channel Config()Get All Channels()Get Channel by Channel ID()Get Channels by Task Group()Get Channels by Project Filter()Validate Registry()Channel Config.lvclassChannel IDDevice IDTask GroupProject Metadata«typedef cluster»Project Metadata.ctlTeststandDevice TypeIO Box TypeProcess TagDAQmx Task Builder.lvclassData Hub ModuleUI ModulesOther ModulesGet by Task GroupMetadata LookupProject FilteringChannel Lookup

Runtime Channel

Runtime Channels are light weighted and created during task setup and used during cyclic read/write processing.

  • Maps task array index to Channel ID.
  • Contains only runtime processing data.
  • Does not contain full static metadata or live broadcast values.
  • Runtime Channels are ordered in the same order as the hardware task channels for DAQmx

Runtime Channel.lvclassChannel IDTask IndexRuntime Numeric Channel.lvclassNumeric Transformation Chain[]Apply for Read DBL()Apply for Write DBL()Create Numeric Data DBL()Runtime Boolean Channel.lvclassBoolean Transformation Chain[]Apply for Read Boolean()Apply for Write Boolean()Create Boolean Data()Data Channel.lvclassChannel IDTimestampQualityChannel Config.lvclassChannel IDTask Groupcreated fromcreatescreates

Data Channel

Data Channels transport current runtime values.

  • Identified by Channel ID.
  • Used by Data Hub, Logger, UI, Calculation, and other modules.
  • Contains no static channel metadata, only the actual data of a channel
  • Child Implementation to project needs

We decided to name them Data Channel and e.g. not Measurement because we also want to use them for setpoints and calculated values.

Data Channel.lvclassChannel IDTimestampQualityNumeric Data DBL.lvclassEngineering ValueNumeric Raw and Engineering Data DBL.lvclassRaw ValueEngineering ValueNumeric Data Waveform.lvclassEngineering WaveformBoolean Data.lvclassEngineering ValueBoolean Data Digital Waveform.lvclassDigital WaveformRuntime Channel.lvclassChannel IDTask IndexData Hub ModuleView Model Buildercreatesstores latest valuesreads values

Runtime Task

Runtime Task.lvclassDevice IDTask GroupRuntime Channel[]Start If Required()Stop If Required()Destroy()DAQmx Runtime Task.lvclassDAQmx Task RefDAQmx AI Runtime Task.lvclassRuntime Numeric Channel[]Read Data Channels()DAQmx AO Runtime Task.lvclassRuntime Numeric Channel[]Write DBL()DAQmx DI Runtime Task.lvclassRuntime Boolean Channel[]Read Data Channels()DAQmx DO Runtime Task.lvclassRuntime Boolean Channel[]Write Boolean()DAQmx CI Runtime Task.lvclassRuntime Numeric Channel[]Read Data Channels()

code/commercial/hse-gendaq/architecture.txt · Last modified: 2026/08/25 08:47 by joerg.hampel