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 Pt2: Pilot phase of functionality - Instrument Configuration done
  • 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: 10 Apr 2022 7:06 PM Date Created
  • Views 1525 views
  • Likes 5 likes
  • Comments 3 comments
  • RoadTest
  • raspberry
  • mcc172
  • labview
  • scpi
Related
Recommended

Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt2: Pilot phase of functionality - Instrument Configuration done

Jan Cumps
Jan Cumps
10 Apr 2022
Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt2: Pilot phase of functionality - Instrument Configuration done

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 second post, I have the pilot ready. The instrument service, SCPI service and LabVIEW client driver that support the DAQ board configuration. 
This is in working state, not a mock. All 3 components have the pilot functionality implemented.

image

All images and screenshots in this blog are from the actual designs. They reflect the status at the time of writing

Pilot Goals

In the first incarnation of the custom software, I had set these goals:

  • make the DAQ hat remote programmable, via network
  • Basic instrument service on the Pi
  • SCPI wrapper service on the Pi
  • LabVIEW driver, Virtual Instrument (VI) style
  • All configuration areas controllable and status feedback: IEPE supply, Clock and Sensitivity
  • Working: 2 binaries should run on the Pi, an example flow should be able to control the instrument, via the VI driver.

This means that I should be able to make a control panel in LabVIEW that can set all of the configurations, execute it, and show the results.

image

Stack

The software is layered. All of the layers are publicly available, so you can choose where to (re)use the APIs.

image

local Linux APIs:

These are libraries, and can be used in applications that run locally on the Raspberry Pi.

image

  • suppliers MCC C API. This is the library that's supplied by Measurement Computing Corporation.
  • DaqHatsInstrument  C++ API: a wrapper for the vendor's C API I wrote for this road test. It's a part of the Instrument Service listed below, but can be used by itself.

TCP/IP socket APIs:

These are Linux services that run on the Raspberry Pi. They expose a TCP/IP Socket interface that can be used locally or over the network. 

image

  • Instrument Service: a 1-to-1 translation from the C++ API to datagrams. Written in C++ for this road test. It uses the C++ API.
  • SCPI Service: parses SCPI commands, translates them into datagrams and forwards the requests to the Instrument Service. In C, for this road test.

LabVIEW Driver API:

This is a Virtual Instrument (VI) driver written for this road test with LabVIEW 2021 Community Edition. Its API is a set of reusable blocks that know how to connect and interact with the instrument. The driver sends SCPI commands to the Raspberry Pi.

image

Example LabVIEW flow:

Proof of concept flow, also in LabVIEW 2021 CE. It's available in the driver project, in a separate Examples folder. It connects, tests every configuration option, queries each setting, then disconnects.

image

To Do

See the backlog.

Link to all posts.

  • Sign in to reply
  • Jan Cumps
    Jan Cumps over 3 years ago

    First successful data stream from the Pi to LabVIEW: 20 samples of a 50 Hz, 0.5 mVpp signal.
    You can see the waveform in the spreadsheet on the left side below, the data stream buffer (it's received over tcp/ip) at the right bottom.

    image

    • 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

    In action (no voice):

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

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

    I have everything ready now for the scheduled functionality, except the hard part: streaming data over the network to LabVIEW.
    That's a process that I have to learn first. It 'll involve multi-threading on the Pi and (possibly) in LabVIEW.

    What I have now is:

    • all configurations: configure and query 
    • scan: config and start, stop, cleanup.
    • utility to wait for clock sync of the ADCs

    The device is sampling in my flows, but the data isn't retrievable yet.

    image

    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