Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6009 Visual Studio 2005: Change from diff to RSE Mode

Hi, I'm really trying to learn the ends and outs of the USB-6009. Everything technically works, but now I would like to mend the example programs to do things that I actually need. For starters the Visual Basic programs initialize the USB-6009 in differential mode instead of RSE mode which is what i need. Any help on what code I need to add to change this would be greatly appreciated. I'm running AcqVoltageSamples_IntClk example program. If you need more information from me, please ask.
0 Kudos
Message 1 of 4
(3,891 Views)
I think this is in the wrong forum, I'm placing an identical one in the Measurement Studio for .NET Languages forum.

0 Kudos
Message 2 of 4
(3,887 Views)
Hi Mitch,

The particular example that you are referring to makes a call to the following method for creating the virtual channel:
myTask.AIChannels.CreateVoltageChannel(physicalChannelComboBox.Text, "", CType(-1, AITerminalConfiguration), rangeMin, rangeMax, AIVoltageUnits.Volts)

The CreateVoltageChannel method is where the terminal configuration is set for the analog input channel that you intend to use.  The example program passes CType(-1, AITerminalConfiguration) as the parameter for the terminal configuration.  What this does is casts a value of -1 to the AITerminalConfiguration enumeration.  By doing this, the default terminal configuration (differential) for the physical channel is used.  The USB-6009 only supports differential and RSE modes, so to use RSE mode you would simply pass AITerminalConfiguration.Rse as the parameter instead of CType(-1, AITerminalConfiguration)

Information about this method and all other methods used for programming DAQmx in .NET can be found in the DAQmx .NET Framework Help (Start>>Programs>>National Instruments>>NI-DAQ).

Regards,
Andrew W
National Instruments
0 Kudos
Message 3 of 4
(3,873 Views)
Thanks! It was a bit difficult to translate the help file into what you said in your post, but it all makes sense now, thanks again!
0 Kudos
Message 4 of 4
(3,862 Views)