Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

NI DAQmx vs traditional

I apologize if all this has been covered before. I have been using NI DAQ traditional and VB6 for many years now. I have just started looking at mx with VB6 and I have to say I'm baffled. Are there any easy ways to read 1 analog reading on a single channel software triggered analogous to:
 
er=AI_Vread (board, chan, gain, result)?
 
or to set a single digital output bit such as
 
er=Dig_Out_Line(board, port, bit,state)
 
Any pointers greatly appreciated!
 
 
0 Kudos
Message 1 of 4
(7,217 Views)
Hi diacon,

I hope you're doing well.  No problem about the questions, we are here to help!  If you have enabled support for VB6 in the DAQmx installation, you should have a couple of shipping examples installed on your PC that should be of help.  One thing I should point out before we get into the examples is that to take a single reading, software timed, you will need more than just one DAQmx API call.  This includes creating the task, reading the value, and then clearing the task.  The example contained in C:\Program Files\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\Analog In\Measure Slow Varying Signal\One Sample should give you a good idea of how to do this for an analog sample, while the example in C:\Program Files\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\Digital\Read Values\Read Dig Chan is the digital equivalent.  Since our VB6 examples use our DAQmx C API, you may want to check out the NI-DAQmx C API Visual Basic 6.0 Help found under Start»Programs»National Instruments»NI-DAQ, as this has a lot of information on all the DAQmx function calls you can use in VB6.  Let us know if this helps!

Thaison V
Applications Engineer
National Instruments

0 Kudos
Message 2 of 4
(7,191 Views)

Also check out this document. It talks about using the Traditional DAQ CWDAQ activex controls and transitioning to DAQmx with VB.NET

Hope it helps

Bilal Durrani
NI
0 Kudos
Message 3 of 4
(7,181 Views)
Thanks for the clarificationss. I was afraid I would need to make multiple calls, but we'll give it a try and see how it works!
0 Kudos
Message 4 of 4
(7,162 Views)