Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Base properties

I am developing an application in C++ that needs to run on both Windows and Mac OS X. I am using NI-DAQmx on Windows, and will be using NI-DAQmx Base on OS X. I have started development on Windows.

A number of important parts of the code have used the ability to read or set "properties" in NI-DAQmx. The functions are not supported by DAQmx Base.

I got this from Malcolm Borgendale:

You are correct that NI-DAQmx Base lack properties all together. Each of
these properties are available in some form in the driver. Since the
driver is written in LabVIEW it should be pretty easy to extract the
information. In most cases, this information in stored in a device family
specific global variable. Here is an example of how to extract some
properties.
(See attached file: Adjust Task Speed.vi)

But I am developing in C++, not Labview. I can't find any definitions of globals in the headers for DAQmx Base.

I will be very grateful for any guidance!

** I mistakenly posted this to the Labview forum; my apologies. The "search, then post" protocal enforced by the forums makes it really easy to do :}
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 1 of 17
(15,047 Views)
Hi John,

I agree that DAQmxBase lacks property nodes in both the LabVIEW and C APIs. I would be interested in seeing that LabVIEW example that Malcolm send you. Would you mind posting it?

Thanks,
Sal
0 Kudos
Message 2 of 17
(15,028 Views)
Here it is. I don't actually have Labview :} so I haven't tried it and can't look at it...

Hope it comes through intact.

-John Weeks
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 3 of 17
(15,024 Views)
Hi John,

From this example it looks like the DAQmx properties for each task are stored in a LabVIEW global variable. This example program simply calls the global variable and changes some of these properties. This is all done in LabVIEW. I do not think this process will apply when trying to manipulate these properties in text based coding. It is unfortunate, but I would suggest starting out with fresh DAQmxBase example code. This will be much easier and less problematic than tying to convert existing DAQmx code.

-Sal
0 Kudos
Message 4 of 17
(15,007 Views)


@salvador Santolucito wrote:
Hi John,

From this example it looks like the DAQmx properties for each task are stored in a LabVIEW global variable. This example program simply calls the global variable and changes some of these properties. This is all done in LabVIEW. I do not think this process will apply when trying to manipulate these properties in text based coding. It is unfortunate, but I would suggest starting out with fresh DAQmxBase example code. This will be much easier and less problematic than tying to convert existing DAQmx code.

-Sal




That's interesting. I had heard that DAQmx Base was developed using Labview; I guess this proves it! Thank you for looking into it.

I take it that what you're saying is that these globals are part of the basic Labview implementation, but weren't exported to the C code API. What would it take to write Labview code (vi, whatever) to export the globals? Could it be done? Or does it take too much access to internals?

These properties contain some important stuff, for instance:

==> It is the only way (I have found) to set the AI convert rate (the between-channel interval, as opposed to the sample rate)

==> It is the only way to get the actual AI channel range that was selected by the driver from the minV, maxV settings in DAQmxBaseCreateAIVoltageChan().
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 5 of 17
(14,998 Views)
Hi John,

Good point. I will definately look into this with the DAQmxBase developers. I will let you know what I find out.

-Sal
0 Kudos
Message 6 of 17
(14,982 Views)


@salvador Santolucito wrote:
Hi John,

Good point. I will definately look into this with the DAQmxBase developers. I will let you know what I find out.

-Sal




I sure appreciate your help with this. Any luck so far?
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 7 of 17
(14,935 Views)
Hi,

I checked on this and there is no way to modify these properties in C. Your only options are to modify them in the NI-DAQmxBase Configuration Utility. Or you can use LabVIEW to implement the solution that Malcolm had.

-Sal
0 Kudos
Message 8 of 17
(14,924 Views)


@salvador Santolucito wrote:
Hi,

I checked on this and there is no way to modify these properties in C. Your only options are to modify them in the NI-DAQmxBase Configuration Utility. Or you can use LabVIEW to implement the solution that Malcolm had.

-Sal




That's not what I wanted to hear 🙂

Thanks for your efforts.
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 9 of 17
(14,920 Views)


@salvador Santolucito wrote:
Hi,

I checked on this and there is no way to modify these properties in C. Your only options are to modify them in the NI-DAQmxBase Configuration Utility. Or you can use LabVIEW to implement the solution that Malcolm had.

-Sal




is there any way to see these properties in C?
Pat
0 Kudos
Message 10 of 17
(14,894 Views)