LabVIEW Idea Exchange

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 
Post an idea

The Match Regular Expression is worth it's weight in gold, once you get used to it. There is some functionality missing though:

 

1) The begin\end positions of the capturing groups are not available. These positions can be more useful than the matching strings.

2) It's unnecessary slow when the string results are not needed.

3) The results are output terminals, making it hard to adapt to dynamic inputs. A results array is sometimes more convenient. For example a pattern is entered in a GUI.

 

I use the attached VI (based on the same API) a lot, to bypass these limitations. I think it would be useful in the LabVIEW palette, under String>Advanced String Functions.

Match Regular Expression (VI Version).png

My forum question asked here: http://forums.ni.com/t5/LabVIEW/Determine-and-Minimize-LabVIEW-Build-Dependencies/m-p/1441734 has prompted me to post a New Idea on this exchange.

 

    To summarize:  LabVIEW executables tend to be on the LARGE side especially when driver packages like DAQmx, VISA amd IMAQ are required.  I'm asking if NI could add some enhanced functionality to the Application/Executable Builder that assist the user in determining and minimizing the size of the final distribution package.  Ideally this would be a completely automatic function that would simply minimize the build parameters to the smallest possible set after analyzing the active project.  Additionally, it would be great if this would be smart enough to pare down the driver package itself to the bare minimum.  (I.E. It shouldn't require a 150MB DAQmx package size to read a few thermocouples with a 9211 module.)

    At the very least, the Additional Installers tab should show the size of the packages you're checking off and the resulting installer's total size.

 

An example of the size increases of required installer packages for a simple DAQmx application:

Build Size (MB)
Program Itself
8
Run-time Engine Added
104
DAQmx Core Drivers Added
258
DAQmx Core Drivers + MAX Added
712

 

The "Coerce dots" are handled by LabVIEW as Visual warnings ... but a bad type coercion could have very bad issues ! Smiley Mad

 

It should be nice to be able to find all "Coerce dots" in all the VI's of a project, in order to check if they are critical or not.

 

[admin edit] This functionality is currently available with the VI Analyzer Toolkit (included with a LabVIEW Professional license or available for separate purchase). Specifically, you can run the Block Diagram > Performance > Coercion Dots test with the 'Block Diagram' option turned off, and the 'Single Wire' option turned on with a 'Maximum Number' of 0:
coerc.png

If you run the test with this configuration, it will return a failure for every coercion dot in the analyzed code.

Note: The idea will remain open, but we're mentioning the workaround here for the benefit of users who need this functionality today and find this Idea Exchange post via search.

 

If I "create constant" from a path input, and start typing into the path, the control grows to the left, away from the function that accepts it as an input.

 

But for VISA and IVI, the name controls grow to the right as you type into them, covering up the icon of the function that accepts the input, along with the wire connecting them.  Let's make VISA and IVI behave better.

 

23852i492819D58059CA42

structure_merger.PNGEvery now and then I (or others) have two case or event structures that I would like to merge, either completely or just copy some cases from one to the other. If we are talking about one or a couple of cases, doing it by creating empty cases and copying the code from one structure to the other as is the option today is fine. If the number is much higher this gets quickly tedious, and we have to come up with alternative solutions.

 

(Making a subVI of the two and add another case structure around them, as described in the discussion linked to above, is one -  but that changes the layout and adds another selection to the logic).

 

So how could it be handled by the IDE instead and made much easier?
A case merger function.

Here are a few quickideas on how to implement it (but any similar solution would be better than none);

 

  1.  Copy-Paste-Merger: Selecting the frame of structure 1, copying it, selecting frame of structure 2 and pasting will bring up a merge dialog with the following options:

    a) Replace structure?
    b) Merge structures (all cases)?
    c) Merge selected case only into structure?

    Now if the user selects to merge the whole or just the top/selected part of the structures (b or c) the function has to handle overlapping cases (just like the OS does when copying into a folder with existing content) by asking the user whether to keep the old ones, replace with the new ones or leave them as non-unique values (or add an index to the value) for the user to tidy up manually afterwards.

  2. Drag and drop merger; identical to the previous suggestion - but instead of copy/paste the transaction is initiated by dragging structure 2 over structure 1 and e.g. holding it with an edge aligned when dropping to indicate that it is not intended to go *into* the other structure.

  3. A merge option that can be called from the menu or contextual menus on case/event structures. The advantage of this would be the ability to add more complex mergers where you would want to pick frames x, y and z from structure 1 to merge with structure(s) 2 etc... This option could alternatively be combined with the other two and used as the dialog when those are initiated.

I think it is very difficult to make a UI that runs on Windows and interacts with targets. Here are two suggestions to improve this:

 

1. We currently can't have \c\ format style in a file path control on windows. It would be nice to allow user to specify the OS syntax to use instead of assuming it should always be the local sytax.

2. The icing on the cake would be to have the File Path Control support a property node for an IP Address so when the user clicks on the browse button, it automatically browses the target (this is already an idea mentioned in the link below) and uses the syntax of the target. This becomes especially useful as we start to have targets that may have an alternative way of browsing files besides FTP. It would be a pain to figure out which SW is installed on the target and use the correct method to enumerate files/folders.

 

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Path-control-of-VI-under-real-time-target-should-browse-target-s/idi-p/1776212

 

These two features could be implemented by having an enum property node for the File Path Control called Syntax which include options like: Local, Various OSes (Windows, Linux, Mac, etc), or IP Address. If IP Address is specified, another property Node called IP Address will be used to determine what target's OS to use (if it's not specified or invalid, we default to Local).

For the moment, the XControls can only be used one by one, on a front panel ...

 

It should be nice to be able to create XControls arrays ... in order to create "funky" listviews ...

 

=> Would give the ability to edit/view a collection of clusters, using an appropriate editor.

 

Manu.

As we look at the Comparison Palette, there are three functions that offer negative logic, but fail to offer the positive logic alternative:

 

NotLogic.png

 

I commonly find myself placing a Boolean "not" right after these functions (e.g., if I want to know if there are elements in an array I must test if it is "not not empty", or if I want to know if a ref is valid I must test if it is "not not valid". Take a look at my other idea which illustrates not not logic.).

 

I have two proposed solutions: 1. offer a single function that has an "Invert?" option on the output, or 2. offer both the positive and negative logic primitives on the palette.

Message Edited by Laura F. on 11-16-2009 08:51 AM

I think it would be very nice to add these. A common task is to get object position/sizing pixel perfect. Adding these buttons would help tremendously with that, there is plenty of space for them, and I feel like it would be a minor developmental effort. Upvote if you like it, thanks for reading 😀

 

FireFistRedhawk_0-1638369163977.png

 

Create a Panel Open event.

 

PanelOpenEvent.png

 

Among other things, it would provide a clean entry point for guaranteeing Control References have been created, allowing for their dynamic event registration to prevent errors such as the following:

 

PanelOpenError.png

The ability to define anonymous methods to be called multiple times within a block diagram.Capture.PNG

 

 

It would be nice to have a right-click option to remove all unused inputs.  It could even work on broken wires!.

 

 

I recently found out that LabVIEW uses the Wichmann-Hill (1984) random number generator.

http://digital.ni.com/public.nsf/allkb/9D0878A2A596A3DE86256C29007A6B4A

 

...which in some fields is completely unacceptable for not being random enough (cycle length of 6.9536e12?)

A much better (and arguably a much more currently standard one) would be Mersenne Twister (cycle length of 2e199371).

http://www.mathworks.com/help/matlab/ref/randstream.list.html

Text, formatted into a control as shown below, is handy, but can be confusing to a user since it is selectable. A user may try to change it - for instance from "mA" to "A". Further, they may triple-click (selecting all) then think that they have to enter the "mA" after the number. Further, there is a bug (in my opinion), where the number can actually change if you try certain entries into the uneditable text. Whether it is a bug or not, if LabVIEW didn't allow you select the text, all would be well.

 

 

text in numerics.png

I cannot tell you how much time I spend changing the appearance, properties, connector pane, etc, etc. every time I "create a SubVI".  I try to always use the same connector pattern, error in and error out, error case structure on BD, and even a common icon appearance within a project.  It would save hours over the course of a project if I could set up a template that would be used BY DEFAULT for "create SubVI".  Also, allow me to set that template as the default for "New VI".  Save me the step of File - New - From Template - choose it.  If I go File - New VI, I want to see my default template.  Anyone who has used AutoCAD (2D) in the past will be familiar with this.  One could create a blank drawing and save it as 'acad.dwg' in the AutoCAD program directory and AutoCAD used this as the default drawing template.

Panel Actors provide a very extensible UI tool.  There is simply nothing better than panel actors to build composite UIs, but we are still limited in that we can only insert UI elements into existing sub-panels or new windows.  What if there was a simple function called Create SubPanel.vi with inputs of size and position, and an output of the reference to the created subpanel?  What if closing the subpanel reference removed it from the front panel.  Now we could create an infinitely complex UI at runtime.  It should be a simple matter to build special support for this into the runtime environment. (I actually have no idea how hard it would be)

 

Use case: an acquisition UI with pre-defined display elements (graphs, gauges, numeric boxes, etc, etc), all created as individual panel actors.  The user asks for a new graph element display during runtime.  We programmatically drop a subpanel and then spawn the requested graph actor into it.  User wants it moved, and we can do that with mouse events.  Same for resize.  User wants it gone and we can do that too.  User wants 10 elements or 10,000.  We can do that with no problem.  Give us this and we can create literally any UI of any complexity, fully configurable by the user. 

The LabVIEW IDE may coerce diagram constants when the enumerated typedef changes.  The problem is: the constants may occur in many places, and the coerced value is not necessarily helpful.

In the pictures below, the "Idle" element is removed from the typedef and the IDE coerces the diagram constant to a neighboring value "triggered".

Before.png

Now the program behaves as if triggered. 

AfterEdit.png

 

When a diagram constant becomes invalid, wouldn't it be better to flag it as broken, so that the programmer is forced to handle the problem?

OpMode.Better.png

In LabVIEW we can dynamically run a VI in a few ways:

a) If it's not running Top Level VI or if the VI re-entrant with the Run method.

b) Already running as sub VI, with Call By Reference.

c) Make a new VI and drop the (running) sub VI on the diagram.

 

Downside of a) is we can't always make sub VI's re-entrant, but still want to call it by reference. Downside of b) is we need to know the strict type (connector pane). Downside of c) is we might end up with a lot of VI's just to function as Top Level VI for the sub VI's and it doesn't work in executables.

 

I like to propose a method, so we can dynamically call a sub VI without knowing the strict type.

This is all I want.png

Using it, we enable LV to dynamically run sub VI's while setting\getting it's parameters by name.

 

For sub VI's (already running) this method will act as Top Level VI. For Top Level VI's it will fail unless it's idle.

 

 

 

(Please ignore my first confusing attempt)

We're witnessing more and more requests to stop LV hiding important information from us.  In One direction we want to be able to know (and some want to break code) if structures are hiding code.

 

Others want LV primitives to give visual feedback as to how they are configured, especially if that configuration can have an effect on what's being executed or how it's executed.

 

Examples include (Please please feel free to add more in the comments below)

 

Array to cluster (Cluster size hidden)

Boolean array to number (Sign mode hidden)

FXP simple Math (Rounding, saturation and output type hidden)

SubVI node setup (When right lcicking the subVI on the BD and changing it's properties - show FP when run, suspend and so on)

Sub VI settings in general (Subroutine, debugging)

 

I know there are already ideas out there for most of these (and I simply chose examples to link to here - I don't mean to leave anyone's ideas out on purpose) but I feel that instead of targetting the individual neurangic points where we have problems, I would like to acknowledge for NI R&D that the idea behind most of these problems (Some of them go much further than simply not hiding the information, and I have given most kudos for that) is that hiding information from us regarding important differences in code execution is a bad thing.  I don't mean to claim anyone's thunder.  I only decided to post this because of the apparent large number of ideas which have this basic idea at heart.  While many of those go further and want additional action taken (Most of which are good and should be implemented) I feel the underlying idea should not be ignored, even if all of the otherwise proposed changes are deemed unsuitable.

 

My idea can be boiled down to the fact that ALL execution relevant information which is directly applicable to the BD on view should be also VISIBLE on the BD.

 

As a disclaimer, I deem factors such as FIFO size and Queue size to be extraneous factors which can be externally influenced and thus does not belong under this idea.

 

Example: I have some Oscilliscope code running on FPGA and had the weirdest of problems where communications worked fine up to (but not including 524288 - 2^19) data points.  As it turns out, a single "Boolean array to number" was set to convert the sign of the input number which turned out to be completely wrong.  Don't know where that came from, maybe I copied the primitive when writing the code and forgot to set it correctly.  My point is that it took me upwards of half a day to track down this problem due to the sheer number of possible error sources I have in my code (It's really complicated stuff in total) and having NO VISUAL CLUE as to what was wrong.  Had there been SOME kind of visual clue as to the configuration of this node I would have found the problem much earlier and would be a more productive programmer.  Should I have set the properties when writing the code initially, sure but as LV projects grow in complexity these kinds of things are getting to be very burdensome.

(There are much more comprehensive ideas related to the run-time engine install mechnism posted and they would solve all this too. Still, if the above idea will take al long time, the following mini-idea could hopefully be implemented earlier :))

 

A wrinke I run across with my users is that I clearly specify that they need to install the standard run time engine, however they go ahead and install the mimimum version for whatever reason.

 

Then, when they launch the application, they get all these warnings that are complete gibberish to a non-LabVIEW user. Warnings about missing VIs, ctls, etc. So I get phone calls and e-mails that things don't work.

 

My suggestion: The minimum run-time engine should be aware of the things included with the full run-time engine and give a single meaningful warning message that the standard runtime engine is required and only the minimum is installed.