Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

where to put complaints of hardware support

As mentioned Signal Express is datalogging software not a programming language.  You will need to use Visual C++, Visual C#, Visual Basic .NET, or LabVIEW for the advanced functionality of property access.
Regards,


h_baker
National Instruments
Applications Engineer
0 Kudos
Message 11 of 26
(3,255 Views)

Hi

H_baker 

 

Again we talk here about   NI-DAQmx  and not signal express

The comment i got to day from head sales office     "NI-DAQmx  those option does not work  ,wich the software offers it selve           those options  are not included in the sale"

You have to  buy labview to get the options in NI-DAQmx  to get it  working        in measurement and automation"

 

I find this  ......................  

 

Again there is no desire at this moment to program anything just to check the function of counter  or it does it work like it should   at clock rate   80 MHz .20 MHz , 100 KHz

and its precision 

0 Kudos
Message 12 of 26
(3,251 Views)

Hi cees10,

 

DAQmx is a driver that includes API support for LabVIEW, C, and .NET programming languages.  It also includes the DAQ Assistant in SignalExpress but this does not offer all of the functions that would be available in a full programming environment (as mentioned before).

 

If you want to verify the lower level functionality of the DAQmx driver then you will need to write a program in one of the supported development environments (you can start out with one of the numerous shipping examples written for them).  DAQmx itself is not a programming language but it does have an API to be used with a full programming language.  To re-iterate what was already stated:

Functions and VIs provide the core functionality of the NI-DAQmx API. For instance, NI-DAQmx includes functions for timing, triggering, reading, and writing samples. However, for advanced functionality, Visual C++, Visual C#, Visual Basic .NET, and LabVIEW require properties. ANSI C and LabWindows/CVI employ the Get and Set Attribute functions. For more information, refer to the programming reference help for your ADE.

 

 

If you are just trying to verify the presence of the timebases, this can be done through a test panel in Measurement and Automation Explorer with no programming required (you may count edges of the 20 and 80 MHz timebases through the test panel):

 

2010-03-23_180207.png

 

 

 

Having said all of this... I'm not really sure what the problem is since by default the driver will choose a timebase for you based on the maximum and minimum values specified.  What is your application?

 

 

Best Regards,

John Passiak
0 Kudos
Message 13 of 26
(3,239 Views)

 If you are just trying to verify the presence of the timebases, this can be done through a test panel in Measurement and Automation Explorer with no programming required (you may count edges of the 20 and 80 MHz timebases through the test panel):

  

original.png

 

 

Great at least some understands   that just what i want to do i have no screen shot's at this moment but i will try to get them to show you whats not working and as you also say     with no programming should work

It is this what i try to get to work

 

 

Aplication are several

But first of all we want to make sure the delay time of the sensor and its devation to the measurement

In this first case measure the speed of a arrow through a laser beam sensor.

 

( this to determine the aerodynamics of the aero) 

 

 

 

0 Kudos
Message 14 of 26
(3,235 Views)

as you can see i have a edge count on right channel and conection

but cannot get the  2 counters to work

Download All
0 Kudos
Message 15 of 26
(3,232 Views)

Hi cees,

 

The High Frequency 2 counter method actually uses the internal timebase to generate a known pulse-width (measurement time).  It then counts the edges of the input signal during this time and uses this to determine the period of the signal (in a sense it averages the period of many consecutive pulses):

 

2010-03-24_103001.png

You should connect the input signal to the Source of the counter if using this method.  The method is only beneficial if your input signal is continuous and is of a high frequency (there is a page in the manual to help you determine).

 

 

I mentioned the Count Edges test panel could be used to count the edges of the timebases to verify their presence, but you can't use this to measure the duration of a pulse.

 

 

If you are measuring the speed of an arrow through a laser beam sensor, then I would imagine that you are trying to measure the width of a single pulse (when the arrow breaks the laser beam).  If this is the case, then you shouldn't be using the High Frequency 2 Counter Period Measurement method, but rather a single counter Pulse Width measurement.

 

The DAQ Assistant for both Pulse Width Measurements and for Period Measurements allows you to read the value back in in terms of ticks if you so desire.  If you select this option, the 80 MHz timebase will be used (if the pulse width is 53 seconds or less then you will not receive an overflow when using the 80 MHz timebase so this will give the most accurate measurement under most circumstances:  2^32 / 80M ≈ 53.687 seconds):

 

2010-03-24_104529.png

 

Alternatively, you could allow the driver to handle the conversion to seconds for you (1 tick is equal to 12.5 ns when using the 80 MHz timebase).  To use a slower timebase in the DAQ Assistant, you would need to read the value back in terms of seconds, then specify a maximum input greater than 53.687 seconds (for the 20 MHz timebase) or greater than 214.748 seconds (for the 100 kHz timebase).  In the lower-level API you may choose which timebase to use directly, but there is typically no reason to go with a slower timebase unless absolutely necessary.

 

 

Best Regards,

Message Edited by John P on 03-24-2010 10:55 AM
John Passiak
0 Kudos
Message 16 of 26
(3,194 Views)

Thanks John

Well i also have a app  wich see  continuous  high frequency 

a disc  with 2000 pulses  1 rev  ,25 rev a sec 

1 sensor  1000 pluses              i have 2 sensors

 

and 1sensor  to deterimine it zero postion 

 

 

 

And i need to know its posisition   accel , speed of  ,ervy pulse

 

 

 

Message Edited by cees10 on 03-24-2010 11:32 AM
Message Edited by cees10 on 03-24-2010 11:34 AM
0 Kudos
Message 17 of 26
(3,191 Views)

Is that 25 rev per second, or .25 (1/4) rev per second?  I'll assume 25 rev:

 

 

Using the 1 Counter method:

Your input frequency is 25 kHz (period of 40 us). During this time, you would expect 3200 ticks of the 80 MHz timebase (which has a period of 12.5 ns).  The jitter of the measurement would be ±1 tick of the timebase, so your measured frequency would be one of the three:

 

24.9921 kHz (3201 ticks)

25.0000 kHz (3200 ticks)

25.0078 kHz (3199 ticks)

 

If you need more accuracy than this, you may use one of the two counter methods:

 

High Frequency 2 Counter:

This method counts the input signal over a set period of time.  The jitter of your measurement is now ±1 tick of the signal itself.  The accuracy of your measurement in Hz is simply the inverse of the duration of the measurement (1 second of measurement should give 1 Hz accuracy, 10 seconds would give .1 Hz, etc.).

 

Large Range 2 Counter:

This method divides down your input signal, so the ±1 tick of timebase  jitter is spread out over several periods of your input signal.  In the case of a 25 kHz input signal, to get the same 1 Hz accuracy mentioned above, you would only need to acquire for about 8 periods of your input signal (given that the jitter for the single counter method is slightly less than 8 Hz).  This would only take 320 microseconds!

 

If you wanted to acquire for a full 1 second, you would set a divisor of 25000 periods of your input signal. Since the ±1 tick jitter of the 80 MHz timebase is now spread out over 25000 periods of your input, the expected error would be only .00032 Hz (compared to the 1 Hz error of the High Frequency method).

 

 

So at 25 kHz using the 80 MHz timebase, you will get a much better measurement using the Large Range 2 Counter method, but the single counter method should also give fairly good results at if you want to stick with a single counter.   Keep in mind that these numbers don't take into account the 50 ppm accuracy spec of the timebases of the 621x (which is going to be present no matter which measurement you use).  If the frequency is actually .25 rev/sec (250 Hz) then the Large Range method would be even better relative to the High Frequency method.

 

 

Best Regards,

John Passiak
0 Kudos
Message 18 of 26
(3,186 Views)

Thanks John 

At least some who understand ,what we talk about 

In a program i must have about 10 min    ,to do all kinds of  calc

 

rev is 25 per second

 

now about MAX again the   measurement      continuous and N samples    does not work!  also not the option HIGH Frequency      and 1 counter

but large range works        but only at 1 sample 

0 Kudos
Message 19 of 26
(3,182 Views)

Hi cees,

 

What is the Samples to Read and the Divisor (for Large Range) or Measurement Time (for High Frequency)?

 

If using the High Frequency method, a sample will be returned every Measurement Time seconds.  So, if you set a Measurement Time of 1 second but a Number of Samples to 1000, the operation would take 1000 seconds to complete (not desirable).

 

The amount of time it takes the Large Range method to return data is going to be based on the frequency of your input signal and the Divisor chosen.

 

 

 

Are you getting a timeout error?

 

 

Best Regards,

John Passiak
0 Kudos
Message 20 of 26
(3,176 Views)