|
1 | | -# NIDAQmx |
| 1 | +# NIDAQmx.jl |
2 | 2 |
|
3 | 3 | [](https://LidkeLab.github.io/NIDAQmx.jl/stable/) |
4 | 4 | [](https://LidkeLab.github.io/NIDAQmx.jl/dev/) |
5 | 5 | [](https://github.com/LidkeLab/NIDAQmx.jl/actions/workflows/CI.yml?query=branch%3Amain) |
6 | 6 | [](https://codecov.io/gh/LidkeLab/NIDAQmx.jl) |
| 7 | + |
| 8 | +A Julia wrapper for National Instruments NI-DAQmx driver, providing type-safe access to NI data acquisition hardware. |
| 9 | + |
| 10 | +## Installation |
| 11 | + |
| 12 | +```julia |
| 13 | +using Pkg |
| 14 | +Pkg.add(url="https://github.com/LidkeLab/NIDAQmx.jl") |
| 15 | +``` |
| 16 | + |
| 17 | +Requires NI-DAQmx driver to be installed on your system. |
| 18 | + |
| 19 | +## Quick Start |
| 20 | + |
| 21 | +```julia |
| 22 | +using NIDAQmx |
| 23 | + |
| 24 | +# List available devices |
| 25 | +devs = devices() |
| 26 | + |
| 27 | +# Analog input: read 100 samples at 1 kHz |
| 28 | +task = AITask("Dev1/ai0") |
| 29 | +configure_timing!(task; rate=1000.0, samples_per_channel=100) |
| 30 | +start!(task) |
| 31 | +data = read(task) |
| 32 | +stop!(task) |
| 33 | + |
| 34 | +# Analog output: write a sine wave |
| 35 | +task = AOTask("Dev1/ao0") |
| 36 | +write(task, sin.(2π .* (0:99) ./ 100)) |
| 37 | +``` |
| 38 | + |
| 39 | +## Features |
| 40 | + |
| 41 | +- Parametric task types (`AITask`, `AOTask`, `DITask`, `DOTask`, `CITask`, `COTask`) for type-safe dispatch |
| 42 | +- Julia enums for terminal configuration, edge detection, sample modes |
| 43 | +- Automatic task handle cleanup via finalizers |
| 44 | +- Support for analog, digital, and counter I/O |
| 45 | +- Timing configuration: sample clock, implicit, change detection |
| 46 | +- Trigger support: digital edge, analog edge, analog window |
| 47 | + |
| 48 | +## Documentation |
| 49 | + |
| 50 | +- [API Reference](api_overview.md) - Complete function and type documentation |
| 51 | +- [Full Documentation](https://LidkeLab.github.io/NIDAQmx.jl/dev/) - Guides and examples |
| 52 | + |
| 53 | +## License |
| 54 | + |
| 55 | +MIT License - see [LICENSE](LICENSE) file. |
0 commit comments