sorry for posting here but unfortunately there is no Delphi subforum.
We're using a PS2000 device and want to utilize the built in signal generator to generate hearable frequencies.
It works so far but unfortunately I do not get the same results as from the PicoScope software signal generator.
I declared the ps2000_set_sig_gen_built_in function as follows
- Code: Select all
function ps2000_set_sig_gen_built_in
(handle : smallint;
offsetVoltage : integer;
pkToPk : cardinal;
waveType : smallint;
startFrequency : double;
stopFrequency : double;
increment : double;
dwellTime : double;
sweepType : smallint;
sweeps : cardinal)
: smallint;
{$IFDEF WIN32} stdcall; external 'ps2000.dll';{$ENDIF}
and call it like this
- Code: Select all
ps2000handle := ps2000_open_unit();
r := ps2000_set_sig_gen_built_in(
ps2000_handle,
0 {No offset},
1000000 {1V},
PS2000_SINE,
200 {StartFreq},
200 {EndFreq},
0, 0, PS2000_UP, 0 {We want no sweeping});
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!
Cart
