Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

ANSI C

I've been given an NI-cDAQ9178 ... and a few modules,
    NI-9215, NI-9227, NI-9481, NI-9485

I've also been given the NI-DAQmx 9.4 driver.
I've found a massive header file 'NIDAQmx.h"
and what appears to be a standard '.lib' file "NIDAQmx.lib"

I too have the req-spec to write a regression test suite to control some hardware using the above, in ANSI-C

Given that I'm C proficient, so understand what to do with those files and hope to be using MinGW 'C' or even OpenWatcom 'C'
... Where do I even start looking on how to control these things?
... I need more than a list of primatives ... I need to know what I'm doing.

0 Kudos
Message 1 of 5
(2,758 Views)

Did you look at any of the examples (C:\Program Files\National Instruments\NI-DAQ\Examples) or open the help (Start>All Programs>National Instruments>NI-DAQ>Text-Based Code Support)?

Message 2 of 5
(2,749 Views)

Hi Dennis,

Yes, I took a look! Through reams and reams of nothing that appears relevent.
Call me thick but it's not transparent or obvious what's going on.

I just want to do something simple to start with ....
have a number of these hardware modules ... but to start with I would just like to flip a couple of relays on my 9481 ...

Nothing too difficult ... I could do it easier by flipping a couple of bits on a parallel port connected to a opto-isolated switch.
But I have to use this NI-cDAQ box.

I just can't find any examples where something that simple is going on.


8^|

0 Kudos
Message 3 of 5
(2,741 Views)

You should perhaps begin with the DAQmx Getting Started to get familiar with the basic concepts. A pretty simple exmple is the Write Digital Chan in \Digital\Generate Values. This writes to multiple lines at once but can be changed to a single line.

Message 4 of 5
(2,739 Views)

And has around a 2ms delay.

Many thanks for your help.
This isn't going to be a 10min job as I'd hoped.

8^)

0 Kudos
Message 5 of 5
(2,727 Views)