LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

traditional daq AI hardware config.vi to daqmx

 KB article you shared does not give any information for AI hardware config.

 

I have one solution like in my previous program lvdaq.dll used in call library function which include all functions like AI hardware config and many others as shown in attached file.

 

I am able to get compatible daqmx.dll and used in same way, but not able to get function list from drop down list.

Pl see the attached files for better understanding.

 

 

Download All
0 Kudos
Message 11 of 18
(1,557 Views)

Hi shilpawalia,

 


@shilpawalia wrote:

I am able to get compatible daqmx.dll and used in same way, but not able to get function list from drop down list.


I hate to repeat myself:

Don't try to access the DAQmx DLL directly, use the functions provided by the DAQmx driver in your functions palette!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 18
(1,548 Views)

You're approaching this wrong.  You might *think* there would be simple 1-for-1 replacement functions that re-implement traditional NI-DAQ functionality but with a new DAQmx name and underlying low-level driver code.  It *seems* logical, but you need to accept that it's *WRONG*.

 

In the original code, what things were being configured in the call to AI Hardware Config.vi?   There *will* be a way to configure things in DAQmx, but it *won't* be a single function call to an equivalent hardware config function.  There is no equivalent function, it doesn't exist.

 

At the lower level of the DAQmx API, there's a myriad of properties that can be navigated, set, and queried with various DAQmx property nodes.   Tell us what your code needs to accomplish and we'll be able to steer you toward how to do it with DAQmx.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 13 of 18
(1,538 Views)

I went back and took another look at your original screenshot where it *appears* that you're looking for scaling information.  Not sure of all your needs around scaling, but attached is a simple example (use it as a starting point) showing how to use DAQmx to:

 

1. define a custom scale, which is often used to convert raw volts to some engineering units

2. configure a task such that the scale is automatically applied to a channel (or set of channels)

3. query the task to retrieve that same custom scale info

 

Also, the single thing that looks *most* similar to your screenshot:

4. query the task to retrieve raw scaling info.  These are the 4 coefficients of the cubic polynomial used to convert raw I16 A/D counts to volts.  In many devices, this scaling includes the embedded results from the latest successful calibration.

 

It's relatively uncommon to really *need* to get raw I16 A/D counts and then apply this kind of scaling after the fact.  It may not be worth bothering unless you're pushing limits -- either live bandwidth or storage space.  As you move on from old hardware, the factor of 4 increase in bytes from I16 to simply dealing in the default DBLs is unlikely to be a problem (if it even really used to be back in the old program.)

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 14 of 18
(1,523 Views)

I am not able to get a replacement for some functions.

 

Things are being configured in the call to AI Hardware Config are attached below.

0 Kudos
Message 15 of 18
(1,505 Views)

Most of those hardware settings are available through "DAQmx Create Virtual Channel".  Some require a little digging into DAQmx property nodes.

 

'channel list' - use "DAQmx Create Virtual Channel"

 

'input limits' - use "DAQmx Create Virtual Channel"

 

'alternate input limits' - maybe not all available directly but not needed either.  When used, they accomplish the same thing as 'input limits.  They only differ in terms of which params are specified *explicitly*, but both end up defining all the same things 

 

'channel input configuration' - use "DAQmx Create Virtual Channel" for 'input mode' and a DAQmx Channel property node to define 'coupling'

 

 

-Kevin P

 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 16 of 18
(1,498 Views)

I have tried to do so, but still, there is an issue with configuring.

Sharing the hardware config vi developed for nidaq.dll for reference.

 

0 Kudos
Message 17 of 18
(1,468 Views)

Details?  What did you try?  What did you want to happen?  What happened instead?   Your post doesn't give us any new information...

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 18 of 18
(1,457 Views)