element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • 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
Test & Tools
  • Technologies
  • More
Test & Tools
Blog Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt3: a LabVIEW Utility block
  • Blog
  • Forum
  • Documents
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Test & Tools requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 12 Apr 2022 7:16 PM Date Created
  • Views 538 views
  • Likes 4 likes
  • Comments 0 comments
  • RoadTest
  • mcc172
  • labview
Related
Recommended

Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt3: a LabVIEW Utility block

Jan Cumps
Jan Cumps
12 Apr 2022
Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt3: a LabVIEW Utility block

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. In this (short!) post, a LabVIEW Utility block to wait for a status.

image

Most of the components I write for the LabVIEW instrument driver are direct commands. Configure the clock, set sensitivity, ask a status. The simple component in this post is different. It's a helper function that waits until a certain condition is met. In this case: wait until the two ADCs of channels 0 and 1 are in sync. It's an example of reuse. This functionality will be needed in most of the real flows, so the block can be reused. And it reuses the existing Query Clock Sync block. Double whammy. A third advantage is that you save real estate in the final flows. This little block takes significantly less space on the canvas than its implementation.

Wait for Sync

This is a pre-condition for the sampling functionality.
From the documentation:

The scan cannot be started until the ADCs are synchronized, so this function will not return until that has completed. It is best to wait for sync using mcc172_a_in_clock_config_read() before starting the scan.

That's what this block offers. It 'll loop until the two ADCs are synchronising. A later implementation may include a time-out or a number of tries. The advantage of using a Utility block is that all flows will automagically inherit this enhancement. And that you have an already tested piece of flow.

image

The outer rectangle is a WHILE, the inner rectangle a conditional CASE.

The block checks if the ADCs are in sync, via the Query Clock Sync block. If not (output is false), then the flow pauses for 100 ms and tries again. If they are in sync, the output is true, and this flow executes:

image

The block doesn't wait (anymore). The while loop exit condition is met and the block hands the execution over to the downstream flow. In a user process, you can appreciate that the complexity (admittedly simple) and screen space requirements are reduced:

image

Link to all posts.

  • Sign in to reply
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 © 2023 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