Welcome to the Forum, rpcope.
I've been writing a Python front-end for the API Hantek provides...
Good luck with that. From their (poor) SDK documentation, it's not even clear what some of the parameters are for, or how the functions actually behave. I looked at it, and there were a few things I couldn't figure out. It only took 3 emails to Hantek "Tech Support"
over about a month, to net the response that "
it's an inexpensive device", and "
please read the SDK document" (which is what I was asking about in the 1st place).
And yes, I'm stating publicly that Hantek tech support is a joke.
(I'm not huge on the provided scope software),
In that regard, you're now a member of the
100% 99.9% Club, since
100% 99.9% of owners/users find the software to be a piece of crap.
[post-edit: modified for fairness, since Rick says, "
It's not that bad".]
My big issue with the scope right now is the noise level. In reading this, I thought I read that a DC/DC converter was causing the roughly 10 mV noise seen in the channels? Do you all think it's possible to clean up the noise...
Sure. Though how much reduction you can achieve, for effort expended, remains to be seen. You could be very successful, since no one AFAIK has taken the time to try. You'd be exploring new territory. Which is always fun.
The first step would be to localize the source of the current internal noise (which would most easily be accomplished with a high sensitivity, low noise scope... though simple trial & error would work too!).
and get slightly better resolution as far as the signal goes, or is that asking too much from this scope?
I'm less certain on the resolution. I vaguely recall someone reporting that both the 20 mS and 50 mV/div ranges were "fake" (zoomed), and the highest real sensitivity was only 100 mV/div(?). I'm not sure you could increase that, and until you rectify the noise issue, there's no reason to try.
I'd encourage you to continue with your project. Let us know what you come up with, and any questions you run into along the way.
Here are some of the DisplayDll undocumented functions:
//Unducumented Functions
DLL_API int WINAPI HTDrawAcquireMode(HDC hdc, int x, int y, COLORREF h, __int16);
DLL_API int WINAPI HTDrawBottomPentagon(HDC hdc, int, int, COLORREF color);
DLL_API int WINAPI HTDrawCouplingImage(HDC hdc, int, int, COLORREF color, __int16);
DLL_API int WINAPI HTDrawCursorLine(HDC hdc, int, int y, int x, int, int, int, HGDIOBJ ho, int, int);
DLL_API int WINAPI HTDrawCursorTraceLine(HDC h, int x, int, int, int, int, int);
DLL_API int WINAPI HTDrawDefineText(HDC hdc, int, LPCWSTR pszFaceName, int mode, LPCWSTR lpString, int c, int x, int y);
DLL_API int WINAPI HTDrawEdgeSlope(HDC h, int, int, COLORREF hbr, __int16);
DLL_API int WINAPI HTDrawGeneratorRect(HDC hdc, int, int, int, int);
DLL_API int WINAPI HTDrawGridARB(HDC hdc, int, int, int, int, int, int, int, __int16);
DLL_API int WINAPI HTDrawGridBorder(HDC hdc, int, int, int, int);
DLL_API int WINAPI HTDrawGridLA(HDC hdc, int, int, int, int, int, int, int, int);
DLL_API int WINAPI HTDrawGridNew(HDC hdc, int, int, int, int, int, int, int, __int16);
DLL_API int WINAPI HTDrawGroupGridLA(HDC h, int, int, int, int, int, int, int, int);
DLL_API int WINAPI HTDrawKnob(HDC h, int, COLORREF color, int);
DLL_API int WINAPI HTDrawLABusSignal(HDC hdc, int, int Memory, int, int, int x, double, int, __int16, __int16);
DLL_API int WINAPI HTDrawLASquareSignal(HDC h, int, COLORREF color, int, int, int, double, int);
DLL_API int WINAPI HTDrawLATrigLine(HDC hdc, HGDIOBJ h, int, int, HGDIOBJ ho, COLORREF color);
DLL_API int WINAPI HTDrawLeftPentagon(HDC hdc, int, int, COLORREF color);
DLL_API int WINAPI HTDrawLevel(HDC hdc, int, int, COLORREF h, int y);
DLL_API int WINAPI HTDrawMeasLine(HDC h, int, int, int, int, int x, int y, HBRUSH ho);
DLL_API int WINAPI HTDrawPrintGrid(HDC hdc, HGDIOBJ h, HGDIOBJ ho, int, int, int, int, int, __int16);
DLL_API int WINAPI HTDrawPrintGridBorder(HDC hdc, HGDIOBJ ho, int, int, int, HGDIOBJ h);
DLL_API int WINAPI HTDrawPulseWidth(HDC hdc, int, int, COLORREF h, __int16);
DLL_API int WINAPI HTDrawRightPentagon(HDC hdc, int, int, COLORREF color);
DLL_API int WINAPI HTDrawSquareWaveInYT(HDC hdc, int, int, int, int, COLORREF ho, HGDIOBJ h, int, int, int, int, int, double, double, int, int);
DLL_API int WINAPI HTDrawTopPentagon(HDC hdc, int, int, COLORREF color);
DLL_API int WINAPI HTDrawWaveInXY(HDC hdc, void *Memory, int, int, int, int, int, int, int, int, COLORREF color);
DLL_API int WINAPI HTDrawWaveInXYNew(HDC hdc, void *Memory, int, int, int, int, int, int, int, int, COLORREF color);
DLL_API int WINAPI HTDrawWaveInYTNew(HDC hdc, int, int, int, int, COLORREF color, int, int, int, int, __int64, int, double, double, int, int);
DLL_API int WINAPI UserRound(double);
and some for HTMarch.dll that I have not got arguments for yet:
HTMARCH_API short WINAPI _dsoCloseFlashLight();
HTMARCH_API DWORD WINAPI _dsoGetPackageSize();
HTMARCH_API short WINAPI _dsoOpenFlashLight();
HTMARCH_API short WINAPI _dsoReadPackageData();
HTMARCH_API short WINAPI dsoSetSquareFreq();
HTMARCH_API short WINAPI _dsoStartDeviceCollect();
The rest of the documented functions are in the PDFs in the "Manual" directory that comes with the "SDK", with some chinglish but decipherable.
The comments in there mostly told me what arguments for the documented functions are and the integer range for some as well as the different options and modes. I turned most of them into enums for easier reading in the code and made a wrapper class for the DLL functions and it's still boiler plate at this point but when I get some more time after the holidays I'll try and get something more functional and put the code up here for anyone who wants to tinker with it.