From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

LabVIEW Periodic Table

Code and Documents

Attachment

Download All

Overview
This is a LabVIEW periodic table, it pulls data from a spreadsheet and formats it appropriately. You can click on a particular element to bring up information for it, or select a classification to get information about those. There is also functionality to copy data to the clipboard or open an elements wikipedia page.

 
Description
This app uses a producer consumer architecture to ensure it runs properly and everything executes in the correct order. It also makes use of customized controls that have multiple sizes of text at different positions, without interfering with the button. The data is stored in a csv file.

 
Requirements

  • LabVIEW 2013 (or compatible)

Steps to Implement or Execute Code

  1. Open the project file
  2. Open Periodic Table.VI
  3. Run the VI
  4. Click on an element to display its information loaded from the spreadsheet
  5. Click on a classification colour at the top to display information about the classification
  6. Open an elements wikipedia page by clicking the button with an element selected
  7. Copy the data to clipboard for use elsewhere with the appropriate button

Additional Information or References

 

Capture.PNG

 

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Matt H
Applications Engineer
National Instruments UK

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Shane_Cravens
Member Member
Member
on

This is a great user interface. Very cool utility!

MHutch
NI Employee (retired)
on

Thank you Shane!

Matt H
Applications Engineer
National Instruments UK
LGviolet
Member
Member
on

Could anyone please convert it to a 2012 version ?  Many thanks!

alexderjuengere
Active Participant
Active Participant
on

unfortunately, on this machine using LabView 2015.02f  this is happening:

scatter.PNG

 

so I re-built this GUI using an array of strings and a table indicator

heavily using the "Element Data.csv" found in Periodic Table.zip ‏1026 KB

 

looks like I can't attach files to this post, so here's a snippet:

pse 2015.png

 

and a preview:

3_cell-picked.png

 

the color ramp can only be choosen once, when the .vi is first run

cells (chemical elemnts) can be choosen at run-time and the corresponding indicators are refreshed by polling.

 

I admit, this can be done better, e.g. using an event-structure and possibly more sub-vis

 

 

 

alexderjuengere
Active Participant
Active Participant
on

ups, I had some typ-defs in my previous snippet, here's a typ-def free version:

2017-03-01_121258_pse_no-typdefs.png