Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

visual Basic: fixed interval sampling rate

Hi,
 
I have a DIO-32HS and I am trying to build a oscilloscope application on VB5 using this card. I can write a piece of code to do it using  the "Timer Control" and MSChart but this has a 1 ms maximum sample period. I would like to be able to sample the data at a higher rate. At least 10 MHz (my board can be used to a maximum of 20 MHz). All I do is call:
 
status = DIG_In_Port(deviceNumber, PortNum, Iresult)
At a regular interval and later (after some samples are accumulated) I shift the vector and write it to the chart. Is there any other native code in VB5 that would let me use a higher sampling frequency? If not, what components should I use from Measurement Studio?
 
Thanks,
0 Kudos
Message 1 of 3
(2,831 Views)
Hello leosgb,

Unfortunately, our support for VB5 is quite limited. Does your application require using this older version? If not, I would definetely recommend upgrading. You can download the Visual Basic 2005 Express edition for free at Microsoft's site. With the newer VB you can take advantage of the full functionality of the DAQmx driver. This means that you will be able to sample at 20MHz and also use Measurement Studio to implement pre-built charts and graphs. Here's some potentially helpful documents for you:

NI-DAQmx Support in Visual Basic 6.0
NI-DAQmx Examples for Visual Basic 6.0
Transition from Traditional DAQ to DAQmx in VB.NET

You may be able to get some of the same functionality out of the DAQmx driver in VB5 as you can in VB6 (using the type library); however, we haven't tested this and consequently can't support it. Hopefully upgrading will be a feasible solution for you Smiley Happy

Garrett H
National Instruments
0 Kudos
Message 2 of 3
(2,815 Views)
Thanks Garret, I will look into that and see if I can have a sw upgrade for this project.
0 Kudos
Message 3 of 3
(2,812 Views)