Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

usb-6009 (USB-6008) with different AI voltage ranges

Solved!
Go to solution

Hi friends,

 

Is that possible to set up USB-6009 with DAQmx to use diffrent voltage ranging on the analog input channels?

I am using differential input configuration.

"DAQmxCreateAIVoltageChan" function with "physical channel"="Dev1/ai0:4" sets up the same range for all four inputs

Thanks for the answer.

 

Pros

 

0 Kudos
Message 1 of 7
(4,146 Views)
Solution
Accepted by topic author proskit

Hi,

 

Please find attached an example that configures Analog Input channels for different gains.

 

Generally you should use for loop with DAQmx Create Channel and pass as parameters different gains for different loop iterations.

 

Best regards,

Michał

0 Kudos
Message 2 of 7
(4,113 Views)

Hi Michal,

 

Thanks for the answer.

Unfortunately I do not use LabView, therefore I cannot open your attachment.

I use my own Delphi application that calls DAQmx API functions.

I will try your idea, however, as I remember, DAQmx allows only one virtual channel per task.

One virtual channel can contain several physical channels, but only with one range.

Defining an own task for each physical line should be an idea , but this solution needs

more processsing and communication resources, and I am not sure if these tasks

are synchronized to each other.

 

Pros

0 Kudos
Message 3 of 7
(4,092 Views)

DAQmx allows for multiple channels per task and it does not allow for multiple tasks on the same hardware.

 

I don't know Delphi but the principle is the same as the LabVIEW example. You have to call DAQmxCreateAIVoltageChan multiple times. Each time, you must use the same task. If each of 4 channels are configured differently, you would have 4 calls to the function.

0 Kudos
Message 4 of 7
(4,085 Views)

Hi ,

 

I have tested Michal's proposal. It works fine.

I have misunderstood a post in another topic, that is the reason why I thought

it was not allowed to call "DAQmxCreateAIVoltageChan" several times for the same task.

I have tested with signals, higher gain settings clip fine, so the proposal works.

However the "DAQmxGetAIGain" function always gives a result of Gain=1.00,

regardless of the concrete  settings.

 

Anyway, Michal and Dennis, thanks for the competence.

 

Best regards

 

Pros

0 Kudos
Message 5 of 7
(4,069 Views)

Hello Pros,

 

The "DAQmxGetAIGain" properties is intended for use with certain SCXI modules where you control the gain setting directly.  Since DAQmx automatically chooses the gain setting based on your rate, there isn't a property to directly query this value on DAQ devices, just the SCXI modules connected to them.  Hope this clarifies!

 

Regards,

 

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 6 of 7
(4,062 Views)

Hello Seth,

 

Thanks. Now I see.

 

Pros

0 Kudos
Message 7 of 7
(4,038 Views)