Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting individual channel gains on synchronized PXI-4224s??

I am using two PXI-4224 Isolated DAQs (DAQ1 & DAQ2) in a test system (PXI-1036DC) and need to program the channel gains separately. These two DAQs are being used in a syncoronized mode utilizing a LabView NI example.....Example Finder > Hardware Input and Output > DAQmx > Synchronization > Multi-Device > Multi-Device Synch-Analog Input - Finite Acquisition.vi
 
I am using this example because it works great except that I need to individually program some DAQ2 channel gains. All of DAQ1 channels are programmed at 5v max input...which is OK. DAQ2 channels need: AI0=5V; AI1=10V; AI2-AI4=50mV; AI5=100mV; AI6&7=5V. I tried using the DAQmx Channel nodes (x8) for each channel. I even connected them up exaxtly as shown in an on line example relative to property nodes.  All this did was give me is errors. So I tried other locations to install them. Same thing...more errors but of different types. If I install them after a DAQmx start, I get an error saying I must install property nodes BEFORE starting a task. If I install them before a DAQmx start, I get an error saying I must either START a task or commit a task before changing property nodes. ???? This does not make sense!!! How can it be wrong both ways?
 
In the example, I use theDAQmx Create Virtual Channel with both a physical channel assignment (DAQ2/ai0:7) and a task in of (DAQ2 Ind Chan) which I set up earlier with a Task Constant. Regardless if I use both of these or not.....the example program still bombs out via the two previously mentioned errors. If I don't use the property nodes.....the synchronization example runs fine.
 
Bottom line is that I would like to use the above example with the 2 synchronized DAQs, but I must have the ability to individually set each channel gain (max V in).  I have LabView 8.2 and DAQmx 8.3.0f0.  I could also use DAQ assist to set up the individual gains.......assuming that there is a way to synchronize two DAQ assists. Regardless of how I synchronize.....my issue is still with setting individual channel gains.  Any suggestions on any methodology for my problem???
0 Kudos
Message 1 of 3
(3,378 Views)
Hello,

There are two ways of setting up the gain for different channels like you are trying to do :

1. I am not sure if you are already doing this but you can just use a DAQmx Task property node and get all the channels that you are acquiring from.  After you do this, for every DAQmx Channel Property node that you use to set the minimum and the maximum value, you need to set the active channel and then use the minimum and maximum.  As the Channels output is just an array you can index through it to set the gains for the correct channel.  Attached is an image where I modified the example that you are using for one of the Analog Input tasks to set the gains for two channels.  You can do it similarly for all the channels that you want to.

2. You can also achieve this by creating different virtual channels for each of the channel that you want to input on and setting the max and the min values on each of the DAQmx Create Channels.

NOTE : The attached image is for the first method.

Hope that helps.

Raajit L
Applications Engineering
National Instrumens
Raajit L
National Instruments
Message 2 of 3
(3,352 Views)
Tnx for input Raajit. I found another way....obviously with some help from Stephanie at N.I.  I created a DAQmx task with all the different channel requirements,  then deleted the "Create Virtual Channel" and substituted this new task constant on the input of the DAQmx timing icon. Worked great. Tnx again for your input. 
0 Kudos
Message 3 of 3
(3,331 Views)