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 Pt8: Alpha phase of functionality - Service and LabVIEW Development 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: 21 Apr 2022 5:13 PM Date Created
  • Views 3078 views
  • Likes 4 likes
  • Comments 11 comments
  • RoadTest
  • raspberry
  • daemon
  • mcc172
  • labview
  • scpi
  • systemd
Related
Recommended

Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt8: Alpha phase of functionality - Service and LabVIEW Development done

Jan Cumps
Jan Cumps
21 Apr 2022
Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt8: Alpha phase of functionality - Service and LabVIEW Development 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 this post, software work is complete and in Alpha status.

image

I listed set a set of goals before the start. They are all implemented and working. LabVIEW driver has gone through refinement. Pi software now runs as services.

  • remotely accessible Instrument service
  • remotely accessible SCPI wrapper service
  • runs as daemon service on the Pi
  • LabVIEW driver with example
  • support for all configuration parameters except trigger
  • support for finite and/or continuous data logging from LabVIEW or other remote application
  • LabVIEW blocks in right abstraction level

Alpha release available on github.
1.0.2 release available on github.

Since the Beta, nothing has changed on the Pi code. It behaves decent. I have created systemd service wrappers, and the software now starts automatically. All enhancements are with the LabVIEW driver and example flow. I called it "Beta" when the complete process was able to run constant scans for hours reliably. While the blocks for connectivity and configuration were simple, the scan and data acquisition flow was complex and convoluted. It took time and revisions to structure it to what it is now.

1.0.2 release has proven to be stable under difficult network conditions and when connecting over WiFi.

image

The Scan Start block now also deals with initiating the data queue and the remote data socket. The Producer loop (the thread that retrieves scanning stream) has simplified spectacularly. Closing the data queue and the data socket connection has moved into the Scan Cleanup block. To show the difference between the first functional iteration, and how it turned out after refactoring, see the image below:

image

It's not only structurally better. It's also easier for a user to adapt this flow as desired. For a single channel flow they'll only need to adapt the Consumer loop. Turning it into a dual channel design is also straightforward.

Below is an image of the process dialog. This isn't intended as a real instrument front page. It represents a visualisation of input, output and data acquisition.

image

Why alpha? The design isn't error free yet, there's a known issue with the first VISA commands. They sometimes contain extra data. I don't know yet if that is a dirty buffer, timing/timeout issue, or something else. It's not hampering the functionality because it happens when trying to start the process. Closing the error message and restarting solves. I'll analyse that one later. Other than that, this is a stable, fast and reliable end-to-end solution.

Here's a small action capture of me tapping the table, with the mcc172 set to 128 samples per second, and 128 samples per channel.

image

I'm now switching to the build of the vibration test device. Then I can try to get vibration specs in real world setup.

image

Link to all posts.

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

    Logging is now optimised and can catch up with the sample speed.

    image

    Changes to the flow are minimal:

    • create/open a file that will accept the sample data, and insert the header record
    •  each time the DAQ streams a value, write a record to the data file
    • close the data file

    image

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

    I forgot to add, I think the math is 0.2/100 = 2 mg rms

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

    Thanks for the response, no need to go overboard. If memory serves I believe 100 ug/rtHz was a competitive noise spec for digital output MEMs accelerometers and that would at a +-2g full-scale range. Your system has a much larger dynamic range and many 10's of kHz more bandwidth Slight smile really neat roadtest kit!

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

    Looks cozy lol 

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

    I've added a new example flow that writes the data to a spreadsheet, instead of displaying it on screen.

    Here's 6000 samples of a 20 Hz 500 mVpp sinus:

    image

    I'll need to review this, because the spreadsheet file logger can't keep up with the samples. But as a first try, it's good to see that it works.

    • 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