The return value of ps2000_set_sig_gen_built_in is 1 and I hear sound from the connected headphones. But ... When I set the same values in the PicoScope software sig gen I hear a constant 200Hz sound, as it should be. Also the sound is very loud and powerfull.
Using my test software I hear a little almost silent sweeping sound which vibrates quite fast, allthough start and end frequencies are the same.
Even if I change some values the vibrating sound remains the same. Only when I increase or decrease the voltage the sound volume changes or when I change the start frequency the heard tone changes too. But when I change the end frequency nothing changes.
It is like there is a constant sweeping active allthough it shouldn't be because the parameters shouldn't allow it.
I took a look with a friend today for about a hour and we were unable to figure it out. :/
Anybody an idea how to solve the above problems so the generated tones from my software are equal to the tones coming from the PicoScope software's sig gen?
Thanks alot!
Last edited by nuclearping on Thu Mar 03, 2011 10:09 am, edited 1 time in total.
I have also major problems with the api-functions of the generator (but ps4227).
For the built-in waveforms like sine, the generator produces a sine but with a frequency which does not correlate to the value i set for startfrequency=stopfrequency. For every call of the function i get different frequencies, but i am not changing the frequency!! Its really weird.
The arbitrary-waveform generator is also ununderstandable. I can't set the offset voltage and i don't understand the relation between the deltaphase and the actual frequency. Too less information in the manual...
These problems I already stated in another thread in this forum.
Very good!
I am using Matlab and did define also singles as you did now.
The offsetVoltage-problem is solved: If you measure the AWG-signal with a different oscilloscope, then you can measure the offset you set.
I measured always with the PS4227 itself and then the offsetvoltage dissapears somehow...
So the Built-in-waveform-Signal-Generator is working fine
But I have still problems with the arbitrary-waveform generator.
Here the manual says i have to define ulongs/ (uint32 for Matlab) for the deltaphase.
I dont understand this deltaphase-stuff...
I understood this:
Every 50ns the generator steps through the waveform buffer. If the startindex si=1 then after 50ns the current index cs=si+deltaphase. Is this right???
If my buffer contains 1000 sample points and delta=1 then the generator should produce a signal with a period of 1000*50ns.
If deltaphase=100 then the period should be 1000*50ns/100 and so on. Is this right?
Obvisously i am wrong because when I set deltaphase=10, i measure a signal with 0,382Hz instead of 10/(1000*50ns)=200kHz.
Also why can i set deltaphase greater than the buffersize? What should this be good for?