Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Implementing User Interface Support (Microprocessor SDK)

LabVIEW 8.6 Microprocessor SDK Help
June 2008

NI Part Number:
372197B-01

»View Product Info

If your target has an LCD, you can implement user interface support. The Unix UI and Unicon example targets implement user interface support. The Unix UI example target is similar to the Unix Console example target.

The example user interface support uses FLTK, which is an open source C++ graphical user interface toolkit. You must develop your own video driver if you want to port user interface support and use something other than FLTK.

To implement user interface support, you must do the following:

  1. Port the following three open source libraries to your target:
    • Nano-X (version 0.91)—low-level screen drawing functions

      You might have to develop a screen driver to work with your target. Also, Nano-X assumes you have a mouse, so if your target uses a touchscreen for input, you also have to develop a touchscreen driver that looks like a mouse to Nano-X. Refer to the Nano-X Web site at www.microwindows.org for more information about and documentation for Nano-X.
    • nxLib (version 0.46)—interface between FLTK and Nano-X
    • FLTK (version 2.0.x-r5940)—C++ graphics library

      FLTK assumes you have certain header files with certain functions. If these functions do not exist for your target, you must find a workaround. Refer to the FLTK Web site at www.fltk.org for more information about FLTK.


    The source code for these libraries are located in the following directory:
labview\CCodeGen\external
  1. After building the libraries, run and debug the libraries using your toolchain.
  2. Build the LabVIEW C Code Run-Time Library and the fltkapi library, which is the interface between FLTK and the LabVIEW C Code Run-Time Library. The source code for the fltkapi library also is located in the labview\CCodeGen\external directory.

    You must define the following flags when you build the LabVIEW C Code Run-Time Library:
    • GUISupport—Enables user interface support.
    • FltkGUI—Enables support for the FLTK widget library.
    • Supports3DControls—Enables support for 3D controls.
    • SupportsColorBG—Enables support for background color.
    • FP_SIZE_HORIZ—Specifies the horizontal size in pixels of the target user interface.
    • FP_SIZE_VERT—Specifies the vertical size in pixels of the target user interface.
  3. Implement user interface settings in your Build Specification Properties dialog box.

Designing user interfaces for embedded targets is different than designing user interfaces for Windows targets.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit