Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx .NET API Utilization by Devices

I've been working heavily with a PXIe-6535 for the past few months, and one of the reoccurring headaches that I have been consistently finding is getting a Not Supported exception from the .NET DAQmx API when trying newing things.

 

So, just for giggles, I wrote a program that creates a new DAQmx Task and configures a line to be input.  Then, using reflection, it recursively iterates over each property exposed by the Task, and attempts to read from that property.  For example, all of the Task.Timing properties were accessed, along with Task.Trigger.ArmStartTrigger.DigitalEdge properties.

 

In total, there are 416 properties exposed by Task class that are part of the DAQmx API.  Types located in other assemblies were excluded.

 

Of those 416 properties, 232 threw a Not Supported exception when attempting to get their value.  That's 55%.  

 

This seems really high to me, but then again, I've only ever worked with the 6535, and I'm not familiar with other DAQ cards.  Are there any cards out there that can make 100% use of the .NET DAQmx API?  What cards can utilize the most of .NET DAQmx?

0 Kudos
Message 1 of 4
(3,804 Views)

There is no piece of hardware that I'm aware of that can make all of the 416 function calls you are talking about. This would require that the hardware be configurable for any analog, digital, or counter task and even all the specialty plug-and-play type tasks.

 

The reason you can't use very many with your HSDIO card is that it is a card for a specific function. Different cards are made for different functionality so that they can be purchased individually rather than having to buy a whole system that does everything. I don't believe there is anything that can perform everything. It's just about figuring out what your needs are from the hardware and finding the right piece of equipment.

Mathew H.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,768 Views)

Are there device-specific API's that expose just the device's functionality?  I'm envisioning something like a namespace called "NationalInstruments.DAQmx.PXIe6535", that would just expose the functionality of the 6535.

 

The current API feels like you just plunked into a 747's cockpit, only it's not a 747 you're flying.  You might actually be flying a Cessna 172.  Or driving a Honda Civic.  Or a helicopter.  But you don't know that because all you can see is the 747's cockpit.  So you try to lower flaps to take off, and the whole airplane explodes because your Honda Civic doesn't have flaps.

0 Kudos
Message 3 of 4
(3,753 Views)

Your analogy is hilariously accurate, but there is no hardware specific API sadly. It's mostly just being aware of your hardware's capabilities and exceptions that might be listed in any manuals.

Mathew H.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,726 Views)