W2000A communication protocol / windows- and LabVIEW library
Filed under: Welec W2000A | Jochen @ 2008-07-11 6:55:24 pmAs I’ve seen that there are a few international visitors here’s an english version of my articles.
With the support from Welec (they’ve provided me the source code of the W2000PC application) I’ve put together an overview of the USB HID-communication protocol used by the Welec W2000A. It’s available as PDF-File and as OpenOffice.Org calc file.
Based on this information I’ve written a small Windows DLL to communicate with the W2000A. Beside the print feature everything supported by the W2000PC application is also possible with this library.
On top of this library I’ve created an LabVIEW-library capable of controlling the scope. This library is still at the beginning so help is really appreciated.
All this information is released as Open Source under the GPLv3 license. If you make any changes to the code or the protocol overview, please send me back these changes so I can integrate them in my code.
Finally here are the links to the files and the mercurial (http://www.selenic.com/mercurial) repository:
Kannst du die windows dll bitte auch als binary zur Verfügung stellen?
Ich würde die DLL gerne in Delphi einbinden, habe aber keinen c/c++ compiler auf dem system. Im Gegenzug würde ich dann eine Delphi unit zum Projekt hinzufügen die deine dll einbindet.
Gruß w.
Dear Sir,
I would like know in whci folder I must install w2000a.dll and msvcr90.dll
Bruno
Hi,
How to install the folder w2000a.dll??
Thanks
Bruno
Hi,
the msvcrt90.dll should be placed in the Windows SYSTEM32 folder. Where to put the w2000a.dll depends on your application. In Labview it should be in the same directory as the VI.
Jochen
Hi,
Many thanks for your answer.
Do you think that this DLL works with the DSO W2014A?
Bruno
Hi,
The DLL works with the W2014A. I cannot import data stored in the MEMORY of the DSO have yoy an idea how to do this?
Thanks
Hi,
the Demo-VI included in the LV-Library should demonstrate how to download the current measurement. As the Welec PC-Application it stops the scope and captures the curve currently displayed. Did you test this sample-VI? Do you get any error code?
Jochen
Hi
The demo file w2000a_test.vi works well. I modified it to get two channels and files. I tried to import in Dev C++ the source code but it failed! I tried also to open it with Visual C++ 2005 Express Edition but it failed.
Which program I can used?
Bruno
Hi,
I’ve used Visual C++ 2008 Express Edition. That’s the latest one available for free from MS (http://www.microsoft.com/Express/).
Jochen
Hi,
I’m trying to do a library for GNU\Linux using libusb. Now, I’m studing your code, and I’ve got a questions.
W2000A_REPORTSIZE is the packet size? Why 66? I’ve retrieved 64 with the libusb from the USB device, same as reported here https://sourceforge.net/apps/trac/welecw2000a/wiki/USB-Protocol
I’ve made some tests with the command to run/stop the oscilloscope. If I send a buffer of 66 byte doesn’t work, but if I use 64 byte it’s ok.
Hi,
that’s a good question. It’s been a while since I worked on this piece of code. If I remember correctly the first two bytes are specific to the HID-protocol (not the W2000A-protocol). Thus only counting the bytes relevant to the Welec protocol I also have 66 bytes.
Jochen
Links Not Working. Showing username and password screen. Can you reupload without password?
Hello,
thanks for the hint. I’ve corrected the links. The download should now work again.
Jochen