Skip to content

edavis0/nidaqmx-c-examples

Repository files navigation

nidaqmx-c-examples

Overview

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.

Refactored Examples

  • 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

Building for NI Linux Real-Time OS

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.

Reference Material

  • To review NI-DAQmx C Reference Help, visit this link.
  • To learn more about NI's driver software portfolio, visit this link.
  • To learn more about the NI Linux Real-Time OS, visit this link.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published