Test and Measurement Forum

Successful Frequency measurement with what languages ?

Post general discussions on using our drivers to write your own software here

Successful Frequency measurement with what languages ?

Postby BentRods » Thu Apr 05, 2007 4:37 pm

I'd be glad to hear if anyone has been successful with any of the included example files when it comes to measuring frequency using any of the supported programming languages in this forum, I'd appreciate some insight into the Functions that were called and how you went about it.

btw I'm calling the ADC1132.dll and looking for clues as to how this works.

Any ideas and thoughts.

TIA
Thomas
BentRods
Super User
Super User
 
Posts: 20
Joined: Wed Dec 01, 2004 3:35 am

Postby markB » Tue Apr 10, 2007 7:09 am

The frequency spectrum in PicoScope is not generated in the ADC11 DLL but in PicoScope itself. It uses a fast fourier transform (FFT) to generate the frequency graph. Googling FFT should give you plenty of links to FFT algorithms.

Alternatively, you can take the volts versus time data and count the number of times the signal 'crosses' the mean value in a given time period. This should give a reasonable estimate of frequency.

A hardware solution would be to get a frequency to volts converter and hook the output to the ADC11. The input volts could then be scaled to frequency.
t volts could then be scaled to frequency.
Regards

Mark
markB
Site Admin
Site Admin
 
Posts: 83
Joined: Tue Mar 27, 2007 9:43 am
Location: Cambridgeshire,UK

Postby BentRods » Fri Apr 13, 2007 3:24 pm

sorry I never mentioned this but I was thinking of Freq measurement in PLW.
how is this handled ?
Regards
Thomas
BentRods
Super User
Super User
 
Posts: 20
Joined: Wed Dec 01, 2004 3:35 am

Frequency w/ ADC-11

Postby gruntman » Fri Apr 13, 2007 8:47 pm

Thomas,

You can easily measure frequency with the ADC-11 with PicoLog. As you go to select your channels simply chose frequency from the drop down list as seen below.
Attachments
asas.JPG
asas.JPG (15.66 KiB) Viewed 4691 times
gruntman
Guru
Guru
 
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm

Postby BentRods » Sat Apr 14, 2007 2:01 am

In my 1st post I said I'm calling the adc1132.dll, the big picture is I'm trying to figure out how Freq measurements are done as there is no support for this topic in the LabView examples and help files that I can see nor much in the way of a juicy answer's in my other posts about what functions to call in this dll ...... its all about measuring voltage ! seems like a bit of a handicap if thats all it can do.
Anyway the idea was to see if anyone else has had success and look for the common ground and what Functions to call.

So has anyone here in these forums used any other programming language to successfully achieve freq measurement whether it be VB, C, C++ etc to do this, I'd like to hear some replies.

Mark is it possible to ask the people who wrote the software how I should go about this, I'd appreciate the help.

Thanks
Thomas
BentRods
Super User
Super User
 
Posts: 20
Joined: Wed Dec 01, 2004 3:35 am

Postby markB » Mon Apr 16, 2007 8:13 am

PicoLog uses the second method that I mention for approximating frequency. It takes volts vs time data and counts the crossing points across the mean value to infer frequency.

The much better solution would be the third method; a hardware converter that outputs a voltage proportional to the input frequency. You can simply scale the output voltage to give you the frequecy.
Regards

Mark
markB
Site Admin
Site Admin
 
Posts: 83
Joined: Tue Mar 27, 2007 9:43 am
Location: Cambridgeshire,UK

Postby BentRods » Mon Apr 16, 2007 9:27 am

Mark wrote
"you can take the volts versus time data and count the number of times the signal 'crosses' the mean value in a given time period. This should give a reasonable estimate of frequency"

here your telling me how its done, but not how to do it by calling the appropriate Functions from the ADC1132.dll .... how about some example code ?

as for the third solution, to be honest I'm not looking for any more Hardware when code would do the same job ... I've had some good results with PLW measuring Freq with open collector sensors.

thanks
Thomas
BentRods
Super User
Super User
 
Posts: 20
Joined: Wed Dec 01, 2004 3:35 am

Postby ziko » Fri Apr 20, 2007 10:14 am

Hi and thank you for your post.

As much as we would like to keep our customers happy, we do not have the resources to tell you how to write your programmes. What we do is give you the tools to achieve this, the programming examples are a stepping stone into writing code and the manual gives a description of the function calls.

Kind regards
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Postby BentRods » Fri Apr 20, 2007 3:56 pm

Geee... I thought this was where I should come for support and ask my silly questions. oh btw I am a Happy customer with the products and software I have....

I've not asked for anyone to write code for me just a snippit of code showing what Functions have been called from anyone who had any success with this, after all what ever language is used its the same dll being used.

Where in the examples are the tools and stepping stones to measure Frequency you speak of ??? there is no mention of this in detail that I can see if so point me towards it please if its so obvious as to what functions I should be using to count the number of times a voltage is crossing the mean value.

adc11_apply_fix
adc11_close_unit
adc11_get_driver_version
adc11_get_times_and_values
adc11_get_type
adc11_get_unit_info
adc11_get_value
adc11_get_value_and_time
adc11_get_values
adc11_is_streaming
adc11_labview_single
adc11_max_value
adc11_open_unit
adc11_open_usb_unit_async
adc11_open_usb_unit_progress
adc11_ready
adc11_run
adc11_set_do
adc11_set_do2
adc11_set_interval
adc11_set_trigger
adc11_set_unit
adc11_stop
BentRods
Super User
Super User
 
Posts: 20
Joined: Wed Dec 01, 2004 3:35 am

Postby ziko » Tue Apr 24, 2007 9:36 am

If you have a look at the ADC11CON.C file this will show you what you need to do to collect the data. After that it would be up to you to decide how to measure the frequency, there is no function call that does this.

Kind regards
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Postby BentRods » Wed Apr 25, 2007 8:07 am

Thanks
ok I'm no Guru of C, could you tell me what heading of the 5 is the one in question here, obviously not the USB ones

my guess is... * Collect a block of samples when a trigger event occurs ???
but something doesn't seem correct here, I'm thinking this is for the Trigger for when an Event occurs.

* There are five examples:
* Collect a block of samples immediately
* Collect a block of samples when a trigger event occurs
* Use windowing to collect a sequence of overlapped blocks (USB)
* Write a continuous stream of data to a disk file (USB)
* Take individual readings

Thomas
BentRods
Super User
Super User
 
Posts: 20
Joined: Wed Dec 01, 2004 3:35 am

Postby markspencer » Thu Apr 26, 2007 7:39 am

Hi,

The example that I believe that you need is the collect a block of samples immediately, this is just a basic collection without triggering. The device will collect the number of samples requested, once this is completed the ready will become true and you can then get the reading with one of the get values function calls.


Best regards,
Mark S.
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests