Successful Frequency measurement with what languages ?

Post general discussions on using our drivers to write your own software here
Post Reply
BentRods
Active User
Active User
Posts: 20
Joined: Wed Dec 01, 2004 3:35 am

Successful Frequency measurement with what languages ?

Post by BentRods »

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

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

Post by markB »

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

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

Post by BentRods »

sorry I never mentioned this but I was thinking of Freq measurement in PLW.
how is this handled ?
Regards
Thomas

gruntman
Advanced User
Advanced User
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm

Frequency w/ ADC-11

Post by gruntman »

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 15326 times

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

Post by BentRods »

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

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

Post by markB »

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

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

Post by BentRods »

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

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Post by ziko »

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

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

Post by BentRods »

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

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Post by ziko »

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

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

Post by BentRods »

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

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

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.

Post Reply