This repository contains NI-DAQmx example programs. Each example contains C source code, and many examples are designed with new users in mind. The examples that have been refactored for new users (using constants and comments) can be found in the list below.
- Analog_In:
- Measure_Acceleration: ContAccelSamps-IntClk-AnlgStart
- Measure_Current: Cont0-20mASamps-IntClk
- Measure_Slow_Varying_Signal: ContAcqSamp-IntClk
- Measure_Strain: ContStrainSamples
- Measure_Temperature: ContThrmcplSamples-IntClk
- Measure_Voltage: All examples
- Analog_Out:
- Generate_Current: All examples
- Generate_Voltage: All examples
- Digital:
- Generate_Values: All examples
- Read_Values: ContReadDigChan-ExtClk, ReadDigChan, and ReadDigPort
To compile the source code on your host machine, you must install the GNU C/C++ Compile Tools for x64 Linux or ARMv7 Linux. Make sure to include the CMakeLists.txt file and .vscode directory when building the binary (included in "samplebuildfiles").
It is recommended you first learn how to cross-compile code and deploy to the NI Linux RTOS using Microsoft VSCode by visiting this NI Forum Post. Then, refer to this NI KnowledgeBase Article the included guide for extra tips.
Note: to build for non-real-time, Windows based applications, it is recommended you use LabWindows/CVI.