element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Test & Tools
  • Technologies
  • More
Test & Tools
Blog Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt1: Software Components
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Test & Tools to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 6 Apr 2022 6:56 PM Date Created
  • Views 3558 views
  • Likes 5 likes
  • Comments 10 comments
  • RoadTest
  • raspberry
  • mcc172
  • daq
  • labview
  • scpi
  • c++
  • service
  • linux
Related
Recommended

Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt1: Software Components

Jan Cumps
Jan Cumps
6 Apr 2022
Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt1: Software Components

For the Sound and Vibration Measurement Hat for Raspberry Pi road test, I'm reviewing Measurement Computing's IEPE Measurement DAQ HAT for Raspberry Pi.
The next series of posts are going to be a subplot. I'll make software to remotely control the DAQ, via LabVIEW.
In the first post, I'm laying out the software components. 

image

I'm not 100% new to this. I wrote a SCPI service for a Pi before, a two channel Lab Switch:  SCPI on a Linux Board. That design is simpler, but there's a significant part of infrastructure and groundwork that I can reuse.

Software Components

There will be 3 modules.

  • an instrument service in c++, on the Pi, that uses low level commands  to control the DAQ over TCP/IP. Can be used in its raw form.
  • a SCPI service in c, also running on the Pi, that allows to talk SCPI to the instrument. It 'll be a bridge between LabVIEW and the instrument service.
  • a LabVIEW instrument driver that knows how to automate the DAQ. Runs on the test PC and sends the commands to the Pi over TCP/IP. 

Then, there 'll be some support work:

  • service wrappers and setup instructions, so that the instrument runs as daemon and is available upon boot.
  • example LabVIEW flows as training material
  • a real showcase with the vibration test gizmo I'm making for this road test.

Borrowed components:

  • the daqhat vendor library
  • a SCPI parser library from Jan Breuer that I use often
  • the BOOST Socket API.

For most of this, I know how to do it. One aspect that I'm not familiar with, is how to stream big data results to a LabVIEW client. I will try to learn and implement that, but no promises.

image
image: preview snippet from the custom LabVIEW driver for this instrument: the comms initialisation.

Repository

The code is available, in a very premature form, on my github. I'll keep updating it as I go. You can take a peek.
Currently, there are two subfolders for the Pi service projects. I don't know yet if I'll use github for the LabVIEW driver.
Because this is an extensive task, I will not take feature requests :). I'll take help and advice (and contributions) though.

image

Preview (April 7, 22)

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Minimal functionality works for both services. The system knows how to enable the auxiliary power supplies and query their status: 

image

image: active debug session, with the DAQ:IEPe#? and DAQ:IEPe# commands working

Link to all posts.

  • Sign in to reply

Top Comments

  • Andrew J
    Andrew J over 3 years ago +1
    May be worth checking this out: https://uk.farnell.com/how-to-setup-labview-on-your-raspberry-pi?CMP=e-email-fix-Promo-GLB-070422-Rasp-4282&mkt_tok=MDU5LUpYSS01OTcAAAGDodvGuvbrg7i741KnqDIyQRjoRnhp_3…
  • Jan Cumps
    Jan Cumps over 3 years ago

    Fast (x8) and silent preview of the video that shows current status:

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

    I'll do the talk-over in the coming week.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 3 years ago

    If you are familiar with the National Instruments / LabVIEW Virtual Instruments paradigm: I'm trying to stay as close as possible to that.
    I've been doing that for all SCPI compatible instruments I made on element14. It allows that the average skilled LabVIEW designer can use it.

    image

    All blocks that control or poll the instrument have a familiar representation. And there is a tree view that lists the available blocks. You could see this as a one page API overview.

    I've used it to build flows with Tektronic, Keithley and Rigol instruments. Scopes and power supplies.
    When I designed the e14 DC Load I used the same approach. Similar for the driver I made for the MultiComp PRO waveform generator.
    I haven't seen a better form of abstraction for instrument control yet. An abstraction that doesn't block you from any lower level.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 3 years ago in reply to Jan Cumps

    (and if you just need to start the application without debug - you can double click the entry.  It's the same as selecting Run. This will also build, upload and execute the binary, but it will not stop in the debugger and wait for you)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 3 years ago

    A little trick for efficient start of a debug session:

    In Eclipse, you can show all Launch Configurations in a window, via Window -> Show View. This allows you fast access to start your particular config.
    If you right-click it and select debug, it 'll build the binary, deploy it on the target and start it with remote GDB Server.
    This saves a few memory and dialog navigations and immediately gets you in a debug session.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 3 years ago

    First instrument query completed: Get sensitivity of a channel.

    image

    In action: 

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube