Example Code

Parsing a Karnaugh Map

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview
Reads a Karnaugh Map and returns an array of 1s and don't cares.


Description
Select the value of the Karnaugh Maps. This uses an enum with three options: 0, 1 or x.

Careful ordering of the elements in the cluster (right click - reorder controls in cluster) means that when we convert to an array, we can very easily find where the ones and don't cares are using conditional array outputs.

The output arrays are set to display in binary format with 4 minimum chars (pad with zeros on the left) 

 

Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Open " Karnaugh 2012 NIVerified.vi"
  2. Input the desired values into the Karnaugh map.
  3. Run the program

 

Additional Information or References
VI Block Diagram

 5-147.png

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

Ian S
Applications Engineer CLA
National Instruments UK&Ireland

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