Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

VB6 with NI 9237

I am trying to run the VB6 sample program AckIntClk with an NI 9237 Daq module.   I get the following error “Error: -200431 Selected physical channel does not support the measurement type required by the virtual channel you are creating” 

I specify the channel as “cDaq1Mod1/ai0”.  What is the proper syntax or is this program not compatible with this DAQ? 

Any help woudl be appreciated.  Thanks

 

 

0 Kudos
Message 1 of 8
(10,944 Views)

I found this article online and it looks like you're probably using unsupported hardware.

 

http://digital.ni.com/public.nsf/allkb/A815BC29574A8CEA8625777D00571452

 

I'd give that a read and see if it applies to you.

0 Kudos
Message 2 of 8
(10,917 Views)

Thanks for the info.  I looked at the article but not sure how to select a usable channel number.  I am using the DAQ to read the output from a load cell, not a counter.   Does this matter?  Do you have any samples using excel VBA to read in a value from the Ni9237   I am using Excel 2010.  Thanks

0 Kudos
Message 3 of 8
(10,884 Views)

The error is hardware specific, not channel specific.  My guess would be that the AckIntClk program is using the task type "CI Pulse Freq", "CI Pulse Time", or "CI Pulse Ticks" which will not work on the 9237 regardless of which channel you use.  I would check the program itself to see if it sets any of those tasks.

0 Kudos
Message 4 of 8
(10,868 Views)

I do not see any of the function calls you referenced.  The call that the program is failing on is:

    DAQmxErrChk DAQmxCreateAIVoltageChan(taskHandle, physicalChannelTextBox.Text, "", _
                    DAQmx_Val_Cfg_Default, minValueTextBox.Text, maxValueTextBox.Text, _
                    DAQmx_Val_VoltageUnits1_Volts, "")

 

the physical channel I am setting to "cDAQ1Mod1\ai0:1"  and DAQmx_Val_VoltageUnits1_Volts=10348 which seem to be a default the sample program choose.  I am not too familiar with the NI 9237 DAQ interface but if you have any suggested on how to read the voltage from this unit it woudl be helpful. Thanks

 

 

0 Kudos
Message 5 of 8
(10,862 Views)

In the examples it should list the hardware that can run the code.  Is the 9237 listed under there?

0 Kudos
Message 6 of 8
(10,846 Views)

I do not see a list but if it is not supported can you point me to a command that would read back the voltage from the Ni9237?  Thanks

0 Kudos
Message 7 of 8
(10,769 Views)

I would take a look at this page: http://www.ni.com/example/6999/en/#VisualBasic6.0VB6

 

Should show which examples work for VB6. 

0 Kudos
Message 8 of 8
(10,760 Views)