Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I change PGIA settings after starting a multichannel analog in task?

In DAQmx, I can't see a way to change one gain setting in one channel of a multiple channel analog in task without clearing the task and starting over.  I used to be able to do something like this in traditional DAQ with the ai configure.vi.  Are there any ways to do this in DAQmx?
0 Kudos
Message 1 of 4
(3,243 Views)

Hi deserio,

 

To do this programmatically in LabVIEW you can call DAQmx Create Channel.vi multiple times (one call for each different set of channel properties needed).  You would specify which channels you want to use for each Create Channel.  Here is a simple example:

 

 Multiple Channel Configuration

 

If you need to do this for a large number of channels you could put this function inside a for loop and input an array of channel properties with auto-indexing enabled.  You would need to use shift registers to pass the task handle and error wires to the next iteration of the loop.  Alternatively, you could create a Task in MAX and call this in LabVIEW.  Let me know if you have any questions or need help making the switch from Traditional DAQ to DAQmx.  Thanks for posting and have a Happy Thanksgiving!

 

-John 

Message Edited by John P on 11-26-2008 09:02 PM
John Passiak
0 Kudos
Message 2 of 4
(3,229 Views)

Hi John,

 

Thanks for responding.  I found the solution to this issue in the DAQmx Channel property node.  I could have sworn I looked for it there before, but just now found the Active Channels property that let's me change the gain of a single channel rather than all channels in the task.  I don't think there is any other way to change a single channel's gain in an already configured task.

 

Regards,

Bob

0 Kudos
Message 3 of 4
(3,220 Views)

Hi Bob,

 

You are correct in that you can also use the DAQmx Channel Property Node to set the value (use Active Channel to select which channels to change then Analog Input >> Maximum/Minimum Value). 

 

Depending on what you need to do, the property node may be the way to go.  The method I suggested before would be a way to set the gain for each channel when you create the task and could not be used to modify an existing channel.  Of course, you can only change the configuration before starting the task regardless of which method you choose.

 

-John 

John Passiak
0 Kudos
Message 4 of 4
(3,188 Views)