Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6008 Channel Config with VB6

Hi Forum
 
I'm a newbe and would like to have some advice:
 
Is it correct that die channel conficuration is made by the following function call?
 
DAQmxCreateAIVoltageChan
 
How and what constant must I use the set the channel for RSE "mode"? Example please.
 
M
0 Kudos
Message 1 of 5
(3,391 Views)

I'm getting the following error when I replace  DAQmx_Val_Cfg_Default with DAQmx_Val_RSE

Run-time error '-200077 (fffcf273)':
Requested value is not a supported value for this property

in

DAQmxCreateAIVoltageChan(taskHandle, sChannelText, "", DAQmx_Val_Cfg_Default, CDbl(sMinValue), CDbl(sMaxValue),                     DAQmx_Val_VoltageUnits1_Volts, "")

Is DAQmx_Val_RSE a wrong constant for the USB-6008?

Mauritz

 

 

 

 

0 Kudos
Message 2 of 5
(3,387 Views)
Hey Mauritz,

You are using the correct constant for setting the mode to RSE. I am guessing that the issue may be that your Minimum and Maximum values are out of range. The default range for the USB-6008 is +/- 20 Volts. This is for Differential mode. However, when you switch to RSE mode you need to change that range to +/- 10 Volts. Let me know if that resolves this issue.
Garrett H
National Instruments
0 Kudos
Message 3 of 5
(3,369 Views)

Thanks Garret.

I managed to get it woking by retyping the function call and using this constant DAQmx_Val_InputTermCfg_RSE. Is this different from DAMmx_Val_RSE?

 

Mauritz

 

0 Kudos
Message 4 of 5
(3,367 Views)

Hi Mauritz-

The DAQmx configuration constants differ slightly in the VB6 .tlb from those that are documented in the NI-DAQmx C Reference Manual.  The functionality is the same for the two constants you mentioned.  The easiest way to select the correct constants in the VB6 interface is to use the field autocompletion functionality in VB6.

Hopefully this helps-

Tom W
National Instruments
0 Kudos
Message 5 of 5
(3,362 Views)