08-17-2009 02:21 PM
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
Solved! Go to Solution.
08-19-2009 03:49 AM
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ł
08-19-2009 01:00 PM
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
08-19-2009 01:45 PM
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.
08-19-2009 03:52 PM
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
08-19-2009 04:18 PM
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,
08-20-2009 07:19 AM
Hello Seth,
Thanks. Now I see.
Pros