Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQCard 700 with Excel Visual Basic

Are there any sources for some sample code for using VBA? I'm sure the
following could be done easily with LabVIEW, but that is not an option right
now.

The signal I am looking at runs 500 mV P-P between 0.1 and 2.0 Hz. Signal
is very noisy and when used with our current chart record we enable a 8.0 Hz
Low-pass filter that is internal to the device. I'm not sure if that is a
software or hardware filter. Need simultaneous capture of 7 waveforms for 2
cycles.

Things I need or would like to do with software:
-Trigger Event
-Filtering (8 Hz Low-Pass)
-Simultaneous capture (7 channels)
-Waveform Math (P-P of a single cycle, % signal loss from a previous
capture event, phase shift comparison to a reference signal on on
e of the
channels to the other channels)
-Display

The Waveform Math and Display I should be able to figure out myself but am
open to any suggestions there. I have built a Trigger Event using the AI
functions but I think it could be improved. I have also used the DAQ
functions to capture a single waveform. Plan on used the ISCAN functions
next for simultaneous capture.

I also came across the ActiveX Controls for Visual Basic (daqevent, atrigev,
alarmev). Can these be used with Excel 97? I don't have any experience
with ActiveX so any suggestions here would be useful, but I should be able
to figure it out.

I think I can figure out most of this but the big stumbling block right now
is the 8.0 Hz Low-pass filter. Anybody have any suggestions for doing that
with software and then feeding the resulting information on to everything
else (trigger event, capture, etc.)? I am currently working on a hardware
solution with an active filter, but a software solution would be much more

convenient and less bulky.

Any help will be greatly appreciated.

Mark
0 Kudos
Message 1 of 2
(2,452 Views)
Mark-

There is no hardware triggering available using the DAQCard 700, so you'll need to take a large scan of data, and then analyze it manually to find any type of trigger event.

Sampling multiple channels should work as you stated using the NI-DAQ function calls 'SCAN_Setup' and 'SCAN_Start'.

The software filtering is difficult without the use of an external package. One idea that comes to mind is to 'Over-sample and Average' Essentially what you'll do is take your filter rate, in this case 8Hz and sample the data points over that time interval - in other words take 0.125 sec of data and average it to come up with a single point of data. You can either divide your entire sample up into 0.125 sec chunks or do a running average. For example if 5 sampl
es took 0.125 seconds, you could average samples 1-5, 6-10, 11-15, for 3 filtered sample points, or you could average 1-5, 2-6, 3-7, 4-8, 5-9, 6-10,... to get a larger number of samples. This effectively averages all the noise above the 8Hz, but still leaves the .1 to 2Hz signal intact.

National Instruments provides a series of useful ActiveX controls for use with Visual Basic. These controls are combined in a package called Measurement Studio. They allow you to do everything you're talking about directly from VB or VBA, there are modules for doing more complex filtering (including butterworth and elliptical filtering), and data acquisition. If you are interested in the Measurement Studio package contact NI and an engineer can explain more.

Dustin W.
National Instruments
0 Kudos
Message 2 of 2
(2,452 Views)