Example Code

2048 Game ( with Voice & Keyboard Control ) using LabVIEW

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
This is example code that takes two inputs in LabVIEW and adds them together. The VI is then called and controlled using Python.


Description
The LabVIEW code is called in Python and the front panel is controlled using ActiveX calls from Python. The output is then displayed using Python code. This code uses VI Methods and the VI Server with ActiveX enabled to control a LabVIEW VI from Python.

 

  1. Install an ActiveX Client Module for Python
  2. Enable ActiveX on the VI Server
  3. Run Python script


Requirements

Software:

LabVIEW 2012(or compatible)

 

Steps to Implement or Execute Code

  1. Download the .zip file
  2. Set your desired configuration (a, x1, x2, degrees, etc)
  3. Run the VI

 

Additional Information or References
VI Block Diagram

1.png

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

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