@torch (bug fix):
The count often differs from the generated frequency slightly. EG: 1.00000kHz produced 1.00016khz with the occasional flicker to 1.00017kHz. The Rigol displays 1.000kHz, but flickers betweeen .992 to 1.004. 3MHz produces 3.03030MHz. (Rigol displays 3.030MHz) But 4MHz produces 4.00000MHz and the Rigol agrees.
As mentioned previously, the Hantek can't hit every frequency precisely, because of the way the hardware works. The DAC clock is adjustable from 200MHz to 2kHz, but it does some binary-division tricks to get below this frequency. For example, what's the closest number to 1000 (Hz) you can get by trying to divide 200000000 with a multiple of a number between 2000 - 4096? 1000.160026 - which is 200MHz / (2083 * 96).
The Rigol does not agree with the voltage setting. EG: 3.5v p-p is measured as 3.6v p-p.
I think this is either your Rigol's measurement - or the output of your Hantek is greater than normal. My scope measures 3.44Vp-p for 3.5Vp-p output. But there is an adjustment built into the software for this. Double-click 'Current Settings'label, and set the Fine Tuning (multiplier): Amplitude to 0.972 (3.5 / 3.6 - or whatever the precise voltage measured is). This will correct the offset between my software and measured values elsewhere.
There is an error in setting the RMS amplitude function: Parameter input of 1.72 produced a "Human Error" message informing me that "RMS amplitude must be between 0.035355V and 3.5355V"
That's a mistake in my message - the RMS setting must actually be between 0.035355V and 1.237425V. This is now fixed in the new version. Well found!
I think a digit gets lost when setting the sweep step. Set to 100.0Hz, it seems to climb by 1000.0Hz instead, according to the Sweep Data log.
I couldn't replicate this bug. For example, if I set freq1 = 1kHz, freq2 = 10Khz, step = 100Hz, it sweeps with 100Hz steps correctly. Do you know what your freq1, freq2 settings were? BTW, if you have log sweep set to ON, it sweeps at 10 ^ x multiples of any given frequency.
"Reset All" cause an error message then program crash. Couldn't catch the error message -- something not found, I think.
Hmm... I couldn't replicate this either. If I try to "Reset All" without a config file (the software looks for a folder in it's folder called "cfg" [where you can save different setting configuration files; e.g. "logsweep_10Hz_40kHz.cfg"] for a file called "default.cfg"). If it doesn't find that file, I get the message "Configuration file not found", but no crash. But I've now changed the code to use the default start-up settings as an alternative - so maybe that will prevent your crash. Please give it another try when you can.
I tried entering "48828.125" for frequency 1, but it displayed 97.6562 kHz and output 48.8400kHz.
Wow! Nicely spotted bug! I've now changed the formula to my latest - to correctly display the actual output frequency for all entered frequencies.
BTW, since I didn't post any help file with the software, some of the features are a little hard to understand. For example, if you'd like to trigger single shot waveforms from the software:
1 ) Decide what digital output you want to use for the external trigger. I tend to use DO11, because it's closest to the edge.
2 ) Make a jumper wire between that and the trigger input. It's very easy - I've included a photo below of how I do it on mine.
3 ) In the software, turn off 'Repeat Wave"
4 ) Make sure 'Digital Out' is set to the option: 'PROG[gramable]' (not 'PAT[tern]G[enerator]')
5 ) Set the last bit on the left (below Digital Out 7-segment display) or the bit for whichever output pin you're using; MSB...LSB [11...0] - so that it displays '1'
6 ) Make sure all LSBs are off (e.g. with DO11, make sure all other bits are Reset to '0'). The Trigger Bit logic will use the lowest Set bit.
7 ) Click 'Trigger Bit'
8 ) Confirm you want to change the Trigger Bit to what you've Set with 'OK'
9 ) Set 'Trigger' to 'External'
10) Set your scope for triggered single sweep.
11) Click 'Trigger Wave' for each desired single shot and have fun.
Note: Because of the way the Hantek creates frequencies > 100kHz (it adds multiple cycles), a single shot with those frequencies will actually produce the number of cycles in the point length. This is caused by the Hantek firmware, not the software. For example, try a single wave output with 100.050kHz ('Sync Stable' OFF); you will actually get 2 cycles of the wave. You can get around this by keeping 'Sync Stable' ON, which will only create waveform point tables with single cycles - but it won't be able to do every possible frequency. In a later version of this software, you'll be able use your own edited waveform as the single shot one, which will get around this problem.
Shortcut keys:
S = Sine wave
Q = Square wave
T = Triangle wave
W,R = Sawtooth/Ramp wave
Numpad = Entry for input box
*,e,E = Exponent in input box
/ = Backspace in input box
Delete = Clear input box
Enter = [F1] Set output frequency
F1 = Set output frequency (or sweep start frequency)
F3 = Set output voltage peak-to-peak
F4 = Set output voltage RMS
F5 = Set output voltage offset
F6 = Set output phase
F2 = Set sweep end frequency
F7 = Set sweep interval
F8 = Set sweep step
F9 = Set digital outputs (when in 'Prog' mode)
F10 = Copy digital inputs as decimal number to input box
F11 = Trigger (Single Shot) Wave - parameters must be set as mentioned above
F12 = Repeat Wave ON/OFF
Thanks again for your debugging efforts, torch! I've attached a bug-fix version below, and will post an improved version with my glitch-free sweeping developments, as well as other stuff, next weekend or so.
DDS3X25Ctl_0_9_2.zip (87.03 kB - downloaded 14 times.)Edit: Bug fix to v0.9.3 - deleted ActiveX reference. Sorry everyone (and thanks to Mecha)!