To completely understand the demo programs below for real-time data acquisition, you only need to read A Quick Introduction to NI-DAQ.

Daq.ch

The program daq.ch below illustrates how Ch NIDAQ for NI-NIDAQ is used. This program can be found in the directory CHHOME/package/nidaq/demos after installation of the Ch NIDAQ package for NI-MDAQ, where CHHOME is the home directory in which Ch is installed.

After NI-NIDAQ is installed and configured, the program is readily to run without compilation, which will give you a quick start on programming NI-DAQ in Ch. This program will acquire 500 data points and plot out the results using chplot. The data points are aquired through channel 2.

View Source Online
Download Source
View Example Output

Daq.c

The program daq.c below illustrates how Ch NIDAQ for NI-NIDAQ is used. This program can be found in the directory CHHOME/package/nidaq/demos after installation of the Ch NIDAQ package for NI-MDAQ, where CHHOME is the home directory in which Ch is installed.

After NI-NIDAQ is installed and configured, the program is readily to run without compilation, which will give you a quick start on programming NI-DAQ in Ch. This program will acquire 500 data points and prints out the results to the screen. The data points are aquired through channel 2.

View Source Online
Download Source

Daqop.c

The program daqop.c below illustrates how Ch NIDAQ for NI-NIDAQ is used. This program can be found in the directory CHHOME/package/nidaq/demos after installation of the Ch NIDAQ package for NI-MDAQ, where CHHOME is the home directory in which Ch is installed.

After NI-NIDAQ is installed and configured, the program is readily to run without compilation, which will give you a quick start on programming NI-DAQ in Ch. This program will acquire 500 data points and prints out the results to the screen. The data points are aquired through channel 2. The difference between daqop.c and daq.c is that daqop.c utilizes the error handle function.

View Source Online
Download Source