Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use NI USB 6210 with Visual Basic 6.0

Hello
I've just bought NI USB 6210 data acquisition card from NI. I have one PCI 6503 DIO card which is programmed in Visual Basic 6.0 (I have labview but as i'm controlling another instrument, i need to use Visual basic anyway).  Could you please tell me, how could i include the USB 6210 operation in my existing Visual basic program.  With the 6210, I'm acquiring two analog signal at certain frequency and that's all. I'm pretty new at visual basic, so a little more detail explanation could be of great help. Thanks for all the help!
 
Mohammad
0 Kudos
Message 1 of 4
(3,561 Views)
Hello Mohamad,

Your PCI 6503 can be used with both our older Traditional DAQ driver as well as our newer DAQmx driver.  If you are using the new driver, then your USB 6210 uses the exact same programming flow (as well as the same driver).  This should make it relatively easy to add the new device to your program.

If you are trying to do different timing/configuration or a different type of task (e.g. analog input like you state), then you need a second task running at the same time as your first (your PCI 6503).  I would take a look at the example programs (located at C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\Visual Basic 6.0)  They give examples of how to program many different applications, including analog input. You can then combine your program with the example.

I hope this is what you are looking for, please post back if this is not the case.
Neal M.
Applications Engineering       National Instruments        www.ni.com/support
0 Kudos
Message 2 of 4
(3,544 Views)

Thanks Neal. Could you please tell me, which Visual Basic 6.0 program example works for single channel continuous acquisition and draw or save the data in the disk. I'm little confused to find this specific example in the set of examples of VB 6.0 programs for DAQ in the example folder.  Are these examples stand alone and can be used directly? I haven't seen any option for the configuration for my USB device in these program. Could you please also tell me, what i have to do in terms of configuration of the device so that can be used in VB 6.0? Thanks for all your help!!

 

Mohammad

0 Kudos
Message 3 of 4
(3,516 Views)
Hello Mohammad,

The shipping examples (the ones that are automatically installed on your computer) do not include a continuous analog acquire.  There is a finite acquisition example (located at C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\Analog In\Measure Voltage\Acq-Int Clk) which you could easily modify to do a continuous acquire. 

How do I modify this you ask?  It has already been done for you on our website (found here). I found this by searching "VB6 continuous analog input" from our homepage.

Both of these examples are completely stand alone (as are most of our examples).  They can be used with any of our products that do analog input, so as long as Measurement and Automation Explorer (MAX) recognizes your device (i.e. it was installed correctly), then you should be able to just run the program.  You do not have to do anything special to use the device in multiple languages. To test if your device is showing up in MAX, follow this KnowledgeBase article.  You will give the program the device name (also found in MAX) and channels in the UI of the program.

I hope this leads you in the right direction.  Please post back if you have any more questions.
Neal M.
Applications Engineering       National Instruments        www.ni.com/support
0 Kudos
Message 4 of 4
(3,493 Views)