element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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
NI LabVIEW Community
  • Products
  • Dev Tools
  • NI LabVIEW Community
  • More
  • Cancel
NI LabVIEW Community
Labview Blogs LabVIEW polymorphic blocks (version)
  • Blog
  • LabVIEW Challenge Blogs
  • Forum
  • Documents
  • Quiz
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join NI LabVIEW Community to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 12 Mar 2023 9:00 PM Date Created
  • Views 607 views
  • Likes 6 likes
  • Comments 0 comments
  • labview
Related
Recommended

LabVIEW polymorphic blocks (version)

Jan Cumps
Jan Cumps
12 Mar 2023
LabVIEW polymorphic blocks (version)

LabVIEW has a mechanism called Polymorphic VI. It's a block that can assume several predefined behaviours. Showing it is easier than explaining. In this post, I explain a polymorphic block that can configure 3 very different temperature probes.

image
example polymorphic block from Keithley's DMM6500 driver

Example from the DMM6500 driver: Configure temperature settings

The driver has configuration blocks to define the parameters for measurement modes. Example: voltage, current, resistance, temperature, capacitance, … . Most require a straightforward configuration. But temperature is a configuration that has different ways of working, dependent on the probe used. The settings for a thermocouple are very different than those for a RDC or thermistor. In that case, it makes sense to create a polymorphic block:

image

The driver developer (Keithley) creates a block for each of the 3 specific cases: thermocouple, rdc and thermistor. They also create a polymorphic bock for generic temperature configuration.

The driver user (me and you) use the polymorphic block, and at design time*, check for what input probe type we want to configure it. Based on the selected instance, the block will present different parameters.

The image below shows the different parameters for a thermocouple vs an RTD:

image

When you drop a Temperature block on your workflow, you'll be presented with the parameter connectors for the implementation that you select after placing the block. If you select Thermocouple, you don't see (or have to deal with) RTD parameters such as RTD type, … (or thermistor settings). When you select RTD, you don't have to deal with all the thermocouple and thermistor settings. 

Also for the driver implementor (Keithley), it's easier, because the flows behind the polymorphic instances are simpler and only have to deal with one scenario at a time.

In this example flow, you'll find two different places where a Temperature polymorphic VI is used:

image

The first temperature VI is set to RTD. It's used in this flow to define the parameters of a cold junction reference placed on a scanner card. The second temperature VI is set to Thermocouple. This one configures the other channels of that scanner card, as thermocouple inputs.

* this is design time polymorphism. LabVIEW also has a mechanism to define the implementation based on the type of parameters passed. It 'll then decide the correct instance at run time.

  • 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 © 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