Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI DAQmx app in C for NI PCI 6534 to read data and sample at real time

Hi,

 

Need help in setting up an  NI DAQmx application in C on NI PCI 6534,

1. which could sample 16 bit data on an external clock in real time and save it to a file

2. which has to wait on the trigger of an external event/clock before begin to sample data and repeat the same repeatedely.

3. Basically I want to interpret a frame of data with Header and footer which comes as a 16 bit data on the Digital I/O's and decode the frame to extract the payload out of it. 

0 Kudos
Message 1 of 2
(3,129 Views)

Hello,

 

Thank you for coming to NI Forums.

 

Q: Need help in setting up an  NI DAQmx application in C on NI PCI 6534,

A: There are a great number of examples in C for DAQmx. You can find them at: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\National Instruments\NI-DAQ\Text-Based Code Support. Or Start>> All Programs>> National Instruments >> NI-DAQmx >> Text-Based Code Support. 

 

There are ANSI C examples as well as the NI-DAQmx C Reference Help. Also you can check out the www.ni.com and search for C examples.

 

Q: which could sample 16 bit data on an external clock in real time.

A: The example you will want to start of with will be Read Dig Port-Ext Clk. This example is located iin DAQmx ANSI C>> Digital>> Read Values.

 

This example will allow you to read a port using an external clock. You will probably have to change the channel count. 

 

Q: ... and save it to a file

A: Check this example out: http://zone.ni.com/devzone/cda/epd/p/id/3498. You will have to use incherent C functions to write to file.

 

Q: which has to wait on the trigger of an external event/clock before begin to sample data and repeat the same repeatedely.

A: There isn't a specific Digtal I/O example for ANSI C that will be retriggerable. However, you can edit an Analog Input example, Cont Acq-Int Clk-Dig Start-Retriggerable. This can be found in Analog in>> Measure Voltage. 

 

Thank you,

VimalF

 

 


Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,108 Views)