Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency Measure Sample

I am running Componentworks v1.1 & an AT MIO-16X under NT 4. I would
like to measure velocity by measuring frequency. I need to measure
frequency up to 80 kHz over a short period of time (1-2 seconds). I am
familiar with Componentworks Analog & Digital I/O controls but have
little experience with the counters/timers. When I select the counter
and a measurement type of frequency, the sample graphic that is
displayed updates to show two timers being required for a frequency
measurement. I don't understand why.

Can someone explain to me how to accomplish my frequency measurement.
A sample program would be excellent!

As an aside, is anyone using V2 of componentworks? I would like to
upgrade from the full development suite of
v1.1 but for $1000.00 I'd
like to know what the big improvements are, other than I could use NI-
DAQ v6 and still keep the digital I/O working properly. I need some
justification for my boss.


Thank You!


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
0 Kudos
Message 1 of 4
(5,408 Views)
Hello there...

For true frequency measurement of a periodic signal, you need two
counters:

1) the first counter will have a sourced signal that has a known
internal timebase (e.g. 100Hz). If you configure this counter to toggle
its output every 100 events, the output of counter 1 will toggle every
second.

2) the second counter will take the output of the first counter as its
input to the gate line. Thus, a one second "window of time" will be
opened for the second counter (we know that this window of time is exact
b/c all the signals from the first counter are internal). The second
counter will now source the signal of interest to measure, and will
count the number of events (rising edges, falling edges, etc.) it sees
for that one second period of time.

If, for example, you counted 200 events during that one second window
of time, you know that the signal of interest has a frequency of 200
Hz. Alternatively, if your window of time was set up to only be 0.5
seconds, and you counted 200 events, you would know that your signal
would have to be of 400Hz frequency.

The reason that you use two counters is (1) signal/window of time
reliability, and (2) all the numbers are internal, so you can do the
software calculations without any user input. You can measure frequency
with only one counter, but you'll have to provide your own
high-integrity "window of time" signal, and you'll have to input the
period of this signal into your program.

I'm not familiar with CWorks, but that's what I know w/ respect to DAQ.

Regards,
Rich

wpilgri@my-deja.com wrote:
>
> I am running Componentworks v1.1 & an AT MIO-16X under NT 4. I would
> like to measure velocity by measuring frequency. I need to measure
> frequency up to 80 kHz over a short period of time (1-2 seconds). I am
> familiar with Componentworks Analog & Digital I/O controls but have
> little experience with the counters/timers. When I select the counter
> and a measurement type of frequency, the sample graphic that is
> displayed updates to show two timers being required for a frequency
> measurement. I don't understand why.
>
> Can someone explain to me how to accomplish my frequency measurement.
> A sample program would be excellent!
>
> As an aside, is anyone using V2 of componentworks? I would like to
> upgrade from the full development suite of v1.1 but for $1000.00 I'd
> like to know what the big improvements are, other than I could use NI-
> DAQ v6 and still keep the digital I/O working properly. I need some
> justification for my boss.
>
> Thank You!
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
0 Kudos
Message 2 of 4
(5,408 Views)
I think that Rich did a good job of explaining the setup for a
frequency measurement. There is also a ComponentWorks/Visual Basic
example in the Example Programs Database on the NI web site. To
download this example, check out www.natinst.com/support. Select
"Example Programs Database" from the Support Databases list and search
for "frequency and componentworks".

ComponentWorks 2.0 includes many new controls such as the DataSocket
control, which can be used for live data transfer, and the GPIB and
Serial controls for instrumentation. The 2.0 Development System also
makes you eligible for a free update that includes a new 3D Graph
control. The ComponentWorks web site www.natinst.com/cworks, contains
information on the new features in 2.0.

BTW, you can update your ComponentWorks DAQ controls to version 2.0 by
installing NI-DAQ 6.5 or later and choosing to install support and
examples for Visual Basic.

Denise
In article <37AF1F3E.710069EB@natinst.dot.com>,
Rich Yavorsky wrote:
> Hello there...
>
> For true frequency measurement of a periodic signal, you need
two
> counters:
>
> 1) the first counter will have a sourced signal that has a known
> internal timebase (e.g. 100Hz). If you configure this counter to
toggle
> its output every 100 events, the output of counter 1 will toggle every
> second.
>
> 2) the second counter will take the output of the first counter
as its
> input to the gate line. Thus, a one second "window of time" will be
> opened for the second counter (we know that this window of time is
exact
> b/c all the signals from the first counter are internal). The second
> counter will now source the signal of interest to measure, and will
> count the number of events (rising edges, falling edges, etc.) it sees
> for that one second period of time.
>
> If, for example, you counted 200 events during that one second
window
> of time, you know that the signal of interest has a frequency of 200
> Hz. Alternatively, if your window of time was set up to only be 0.5
> seconds, and you counted 200 events, you would know that your signal
> would have to be of 400Hz frequency.
>
> The reason that you use two counters is (1) signal/window of
time
> reliability, and (2) all the numbers are internal, so you can do the
> software calculations without any user input. You can measure
frequency
> with only one counter, but you'll have to provide your own
> high-integrity "window of time" signal, and you'll have to input the
> period of this signal into your program.
>
> I'm not familiar with CWorks, but that's what I know w/ respect
to DAQ.
>
> Regards,
> Rich
>
> wpilgri@my-deja.com wrote:
> >
> > I am running Componentworks v1.1 & an AT MIO-16X under NT 4. I
would
> > like to measure velocity by measuring frequency. I need to measure
> > frequency up to 80 kHz over a short period of time (1-2 seconds).
I am
> > familiar with Componentworks Analog & Digital I/O controls but have
> > little experience with the counters/timers. When I select the
counter
> > and a measurement type of frequency, the sample graphic that is
> > displayed updates to show two timers being required for a frequency
> > measurement. I don't understand why.
> >
> > Can someone explain to me how to accomplish my frequency
measurement.
> > A sample program would be excellent!
> >
> > As an aside, is anyone using V2 of componentworks? I would like to
> > upgrade from the full development suite of v1.1 but for $1000.00 I'd
> > like to know what the big improvements are, other than I could use
NI-
> > DAQ v6 and still keep the digital I/O working properly. I need some
> > justification for my boss.
> >
> > Thank You!
> >
> > Sent via Deja.com http://www.deja.com/
> > Share what you know. Learn what you don't.
>


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
0 Kudos
Message 4 of 4
(5,408 Views)
Hello there...

For true frequency measurement of a periodic signal, you need two
counters:

1) the first counter will have a sourced signal that has a known
internal timebase (e.g. 100Hz). If you configure this counter to toggle
its output every 100 events, the output of counter 1 will toggle every
second.

2) the second counter will take the output of the first counter as its
input to the gate line. Thus, a one second "window of time" will be
opened for the second counter (we know that this window of time is exact
b/c all the signals from the first counter are internal). The second
counter will now source the signal of interest to measure, and will
count the number of events (rising edges, falling edges, etc.) it sees
for that one second period of time.

If, for example, you counted 200 events during that one second window
of time, you know that the signal of interest has a frequency of 200
Hz. Alternatively, if your window of time was set up to only be 0.5
seconds, and you counted 200 events, you would know that your signal
would have to be of 400Hz frequency.

The reason that you use two counters is (1) signal/window of time
reliability, and (2) all the numbers are internal, so you can do the
software calculations without any user input. You can measure frequency
with only one counter, but you'll have to provide your own
high-integrity "window of time" signal, and you'll have to input the
period of this signal into your program.

I'm not familiar with CWorks, but that's what I know w/ respect to DAQ.

Regards,
Rich

wpilgri@my-deja.com wrote:
>
> I am running Componentworks v1.1 & an AT MIO-16X under NT 4. I would
> like to measure velocity by measuring frequency. I need to measure
> frequency up to 80 kHz over a short period of time (1-2 seconds). I am
> familiar with Componentworks Analog & Digital I/O controls but have
> little experience with the counters/timers. When I select the counter
> and a measurement type of frequency, the sample graphic that is
> displayed updates to show two timers being required for a frequency
> measurement. I don't understand why.
>
> Can someone explain to me how to accomplish my frequency measurement.
> A sample program would be excellent!
>
> As an aside, is anyone using V2 of componentworks? I would like to
> upgrade from the full development suite of v1.1 but for $1000.00 I'd
> like to know what the big improvements are, other than I could use NI-
> DAQ v6 and still keep the digital I/O working properly. I need some
> justification for my boss.
>
> Thank You!
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Message 3 of 4
(5,408 Views)