W2000A communication protocol / windows- and LabVIEW library

Filed under: Welec W2000A | Jochen @ 2008-07-11 6:55:24 pm

    As 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:

    Comments (11)

    11 Kommentare


    1. 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.


    2. Dear Sir,

      I would like know in whci folder I must install w2000a.dll and msvcr90.dll

      Bruno


    3. Hi,

      How to install the folder w2000a.dll??

      Thanks

      Bruno


    4. 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


    5. Hi,

      Many thanks for your answer.

      Do you think that this DLL works with the DSO W2014A?

      Bruno


    6. 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


    7. 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


    8. 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


    9. 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


    10. 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.


    11. 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

    Hinterlasse einen Kommentar

    Hinweis: Kommentare werden moderiert.