Simplifying your Hardware Abstraction Layer (HAL) with LVOOP and DQMH – Part 1

, ,
[et_pb_section fb_built=”1″ _builder_version=”3.22″ custom_padding=”54px|0px|0|0px|false|false”][et_pb_row _builder_version=”4.4.1″][et_pb_column _builder_version=”4.4.1″ type=”4_4″][et_pb_video _builder_version=”4.4.1″ src=”https://youtu.be/8xlA2iDlpbM” hover_enabled=”0″][/et_pb_video][/et_pb_column][/et_pb_row][et_pb_row _builder_version=”3.25″][et_pb_column type=”4_4″ _builder_version=”3.25″ custom_padding=”|||” custom_padding__hover=”|||”][et_pb_text _builder_version=”3.27.4″]Michael Howard is a guest blogger. Michael works as a Principal Automation Test Engineer at Advanced Bionics and has been working with LabVIEW since LabVIEW 6i. The Automated Test Engineering (ATE) and Systems Test groups at Advanced Bionics are responsible for developing tests to verify the performance of the hardware and firmware systems used in AB’s Cochlear Implant systems. Michael is a LabVIEW Certified Associate Developer and one of two acting LabVIEW and TestStand Architects working for Advanced Bionics. He is responsible for introducing and implementing hardware and software engineering best practices for the ATE team. His latest achievements include implementing a Hardware Abstraction Layer and Measurement Abstraction Layer architecture along with Software Engineering best practices that reduced development times, emphasized code reuse, added scalability, simplified the development process and improved code quality.

This blog post contains information relevant to the presentation Fab and I are giving at NIWeek 2019, titled Simplifying your HAL with LVOOP and DQMH®. The bit.ly/NIWeek2019-DQMH-HAL takes you back to this post. You can find the code we used for the demonstrations in a Bitbucket repository.

Have you ever wanted to create a Hardware Abstraction Layer for measurement instrumentation but were unsure where or how to start? With all of the documentation available (White Papers, Blogs, PowerPoint Presentations), you are introduced to terminologies such as OOP, Dynamic Dispatch, and Hardware Abstraction. For some, putting all this together can be a daunting task. Well, there is good news: this post provides an answer to this task. With a simplified process and tools readily at your disposal, you can create decoupled reusable Hardware Abstraction Layer (HAL) components. You can clone the repository or download it as a zip file. The Readme file on the repository includes instructions on how to set up the code on your computer, such as installing DQMH and some additional instrument drivers. The attached document contains the step by step instructions to create the code that you can download from the repository. For the latest version of this document, see the one in the repository. We will walk you through how to create a HAL using a DMM class. When we are done, you will know exactly how to create a reusable DQMH DMM HAL that provides an API that works well in both LabVIEW and TestStand. Ready? Let us dive in.

Version as of May 31st, 2019

[download id=”2478″]

Initial version of the document:

[download id=”2461″] [/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section]

12 responses to “Simplifying your Hardware Abstraction Layer (HAL) with LVOOP and DQMH – Part 1”

  1. Ryan Sheppard Avatar
    Ryan Sheppard

    On page 13 of the pdf, it says to add DMM.lvlibp as the top-level library. But I believe it is supposed to be the HAL Utility Library that was just created

    1. mhoward424 Avatar
      mhoward424

      Thanks for the catch. I have updated the document with the correct images.

  2. HLT Avatar
    HLT

    Great post. Do you know where I can find part 2? Thanks.

    1. mhoward424 Avatar
      mhoward424

      Thank you HLT. I hope the post was helpful and you found it useful for future architectures. As for the part 2, I have not written part 2. The second part will discuss the Measurement Abstraction Layer (MAL) and the DQMH.

  3. yasrof Avatar

    waiting for part 2, thanks for sharing! very informative and useful

  4. MK Avatar
    MK

    Question to the overwrite of NameAndVersionNumber.
    When I pull the packed library HAL Untility.LVLIBP like described in the PDF I’m getting Error 7 when attempting to overwrite it. If I replace the packed library with the unpacked on from the DEV directory it works like expected. What I’m missing here? Thanks, and looking forward to the part 2.

    1. Michael Howard Avatar
      Michael Howard

      I’m not sure how you are getting the Error 7 when overriding a VI. Try rebuilding the HAL class again. Also, I noticed that you wrote “overwrite”. Do you mean override?

  5. xubuli Avatar
    xubuli

    Great tutorial. Thank you for sharing your knowledge. Looking forward to Part II.

  6. Buli Xu Avatar
    Buli Xu

    Q#1: DMM can be controlled through GPIB, USB, LAN or Serial port, etc. It seems DMM_Level0 class is designed for serial communication only? How to incorporate this change?

    Q#2: Serial communication can be modeled as a separate class and DMM “use a” DMM. How will you make the change?

  7. Fil Defer Avatar
    Fil Defer

    excellent post !
    looking forward for next part !

  8. Fil Defer Avatar
    Fil Defer

    Great article, thank you.

    Just a little mistake, page 10, you asked “right click the protected folder”, but it is the class we should use

  9. Marcin Avatar
    Marcin

    Hello,
    great article, thank you!
    It translates not only to labview but to many other tools as well :).

    Any news on part 2? 🙂

Leave a Reply to Marcin Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.