![]() |
|
|
An XControl of String data type that displays its string as a scrolling 2D array of booleans, like an LED sign. Demonstrates how to have an XControl that continuously updates in the background, how to make an XControl that always drops as an indicator and how to add a custom popup item to the XControl.
Given a string, display the text of that string in a 2D array of booleans and animate the array so it looks like a scrolling LED sign.
The interesting aspects of this XControl are:
It shows how to make an XControl that updates continuously, even though the XControl's Facade VI cannot be left running without hanging LV's user interface. It uses a background task VI that is started/stopped dynamically.
It shows how to create an XControl that drops as an indicator by default. This involves a small trick in the Init.vi that is a bit non-intuitive.
It shows how to add a custom popup menu item to the XControl.
The XControl can display all printalble ASCII characters from 0 to 127. Any non-printable characters in this range and any characters outside this range are displayed as spaces.
Other requirements:
This XControl may be used in LV Base Package, but to edit it you will need LV Professional.
Generating EXE bug has been CAR'd
I did not know when I posted this example that it does not work when made into a Built Application. That has now been filed as a bug. (CAR 4EI8KCJ1). The bug exists in both 8.2 and 8.5. & nbsp;
No bug in building EXE -- you just need the right build spec
When you build an EXE, the front panels of VIs are not included in the EXE by default. If you want the panel to be include, you have to tell the build specification to include it explicitly. In the case of this XControl, the front panel of "LED-ctrl ref scroll.vi" needs to be included so that the control references to its front panel work. If you made a build spec that explicitly said to include that VI's front panel, everything worked fine.
That's an annoying thing to have to remember, so I've put a new version of the XControl up. In this new version, the "LED-ctrl ref scroll.vi" has been edited to turn off the scrollbars. That's right -- no scrollbars. When you make any customization to the front panel of a VI, then AppBuilder defaults to "include front panel" since if you took the time to customize it, you probably want to display it. In this case, we don't want to display it, but the effect is the same. Now when you build this XControl into an EXE, it works as expected.
Thanks for the feedback! &nbs p;
Answer regarding LEDXControl in Built App
I posted a reply, but did not reply to you directly, so you may not have gotten notification. Please read the posts I made below and let me know if that helps you. &nb sp;
Generating Exe
What is to consider that this XControl also works in an exe-Version? & nbsp;