An example project showing how to build a continuous measurement and logging app with CSM (Communicable State Machine), focusing on decoupling, replaceable modules, and clear data flow.
- Loose coupling: acquisition, algorithm, logging, and UI communicate by message/status routing, not hardcoded references.
- Hardware replaceability: keep the same public interface and swap data source modules (for example, simulated DAQ ↔ sound card DAQ).
- Scalable design: add new analysis or storage modules without rewriting the existing pipeline.
This repo composes four roles:
- DAQ Source (
AcquisitionorSoundInput-DAQ) - Algorithm (
Algorithm) - Logger (
Logging) - App Orchestrator/UI (
UI)
The key data flow:
stateDiagram-v2
direction LR
DAQ --> Algorithm : Acquired Waveform
DAQ --> Logging : Acquired Waveform -> API: Log
DAQ --> UI : Acquired Waveform
Algorithm --> UI : FFT / Power Spectrum
Detailed APIs are documented per module (template style):
- Logging module doc
- Acquisition module doc
- SoundInput-DAQ module doc
- Algorithm module doc
- Module docs index
This repo provides three UI VIs:
UI (Beginner).vi: easiest to read, explicit wiring and direct teaching-oriented flow.UI (Experienced).vi: balanced readability and abstraction, suitable as daily project baseline.UI (The Advanced).vi: most abstract and modular, optimized for reuse/expansion in larger systems.
All three keep the same CSM composition idea; they mainly differ in abstraction level and engineering style.
A concise comparison note is kept in: