LabVIEW Idea Exchange

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

When installing a new version of LabVIEW, I always find myself resetting all of the options I previously changed from the default settings in the Tools -> Options menu. This means I have to spend my time remembering what options I changed and where in the Options menu I need to change them. It would be nice if a newer installation of LabVIEW looked at the older version's Options settings and then applied those settings to the new installation.

 

The same idea applies to how I configure the palettes on the block diagram. It would be nice if newer installations looked at how I configure my palettes and then set them up the same way. 

 

With these changes transitioning to a newer version of LabVIEW might be even more seamless for users that change their settings from the default settings. 

Related to this idea, when you right-click on an array wire, LabVIEW shows the Array Palette.  However, many of the operations for the element type are often polymorphic.  As such, it would be useful to show the palette for the array's element data type as well.  The screenshot, below, shows what I mean:

 

 

2.png

The "right-click...replace" option has few choices, typically the home palette of the current selection if available and "All Palettes".

 

Quite often, I need the entry "Select a VI...", all down at the bottom after selecting "All Palettes".

 

Suggestion 1: Add "Select a VI..." to the first menu, see image.

 

Especially when benchmarking or trying different algoritms, I often like to replace the current VI with another VI that is already in memory. 

 

Suggestion 2: Also add a "VIs in memory", which would allow picking from list of all VIs in memory (except things located in VI.lib or in the standard palettes).

 

Here's an image how it could look like:

 

 

 

Message Edited by altenbach on 07-05-2009 09:35 PM

Inspired by Altenbach's Boolean constant design, I thought of the following....

 

When we have a SGL or a DBL constant on the block diagram, we have to right click, selece "representation" to find out exactly what type it is.  Why not have some indication as to the actual data type which could conveniently act as a menu for changing the data type.

 

BD Constant Data Type.PNG

 

The same thing goes for U8, I8, U16, I16 and so on.

 

Shane.

The Drag and Drop event Drop has an element named "Available Data Names". This is a needleslly very long element name and wastes a lot of BD space (the whole vertical area can't be used for a case structure, for example).

 

Something like simply "Data" would be enough..

Untitled.png

 

This is a simple request.

 

Notice that these 2 property nodes look exactly alike but if you right click each and select Name Format -> Long Names they are actually different. It took me a while to figure out these were actually different.

2 Property Nodes.png

 

This is an example demonstrating the difference

Running Example.png

 

Please change the short names so that they don't look exactly the same.

 How many developers are using a splash screen for their applications ? Shouldn't this be a straightforward task even for beginners ? NI should provide an easier way to implement this technique.

From considering a number of other ideas (see below), I want to suggest that the Block Diagram is the only item initially created when defining a VI, and becomes the place where ALL VI functionality is defined.  The BD is the place where dataflow is specified and the functionality of the VI is determined.  So it makes sense that the con-pane should be linked to the BD rather than the FP -- it defines the data interface between calling VIs to this VI.  Similarly the icon often provides a visual clue to the VI functionality, rather than its FP look.  So both con-pane and icon are natural components of the BD window.

 

From the BD, it should then be possible to define one, or more, Front Panels which provide user interfaces to the data.  These FPs may contain some or all of the variables in the con-pane (why ever show Error In/Out?), along with some or all of any other controls/indicators used in the block diagram.  In fact, the Probe Window is already almost an additional FP - just allow several data indicators to be grouped on a single window, and you essentially have a Debug Panel.  It would be great to be able to save the Probe window (or several of them) with a VI. 

 

Yes, there will be problems, not least that I'm sure some existing code assumes that an FP (and only one) exists if a BD exists.  And that every control/indicator must have a FP representation.

 

Here's a rough mockup (though the Probe points could be "virtual indicators" instead):

BD+FP.png

 

Other related ideas:

Be able to link to the connector pane in Block Diagram

Sub VI without Front Panel

Custom Probe Watch Window

We need to uncouple the "edit mode" FP size from the "run mode" FP size

 

and one trying to address the same concerns, but in a way I don't like:

Add Data layer for VIs... 

The goal of this idea is to make it easy for the LabVIEW ecosystem to create reusable libraries for LabVIEW that would be type independent. Let's think for a second dictionaries, also called as key-value stores. Dictionaries are data structures that allow storing and retrieving values with a specific key. To create a generic reusable strongly typed dictionary is currently impossible with the LabVIEW type system. One can create a dictionary that is type specific but then it's not reusable. Or one can create a reusable dictionary but then it's not strongly typed. Type Parameters and Parametrized Generic Types as explained in this idea would allow creating strongly typed dictionaries that are widely reusable across applications. Specifically type parameters and parametrized generic types would allow LabVIEW ecosystem to develop highly reusable strongly typed components to solve various common programming problems. This would allow National Instruments to put more focus on the core of the language as the LabVIEW ecosystem could solve much wider range of problems that preivously have required National Instruments to contribute.

 

Add a new control type Type Parameter to LabVIEW that augments the current Control, Type Def and Strict Type Def control types. The Type Parameter type would act like a regular Type Def control with one special and important distinction. You could wire anything to an input terminal expecting a specific Type Parameter type and the downstream type would adapt at compile time to the type wired to the type parameter input.

Type Parameter Definition

 

In a single VI type parameter could be used in multiple places but all instances of the type parameter would adapt to the same type.

 

Type Parameters

 

When a VI that uses Type Parameters in the front panel is used on a block diagram, the template VI is replaced by the compiler by a type specific instance that has adapted the type parameters to the type wired to the Type Parameter input. Notice below how in our VI the control and the indicator were of type Type Parameter with a default type of DBL and the instance got adapted to type U32 that was wired to the input.

Calling a VI with Type Parameter Inputs

The same type parameter could be used on multiple inputs of a VI.

Multiple Inputs of The Same Type Parameter

And all of the type parameters would adapt to the same type when the VI is being used.

Calling a VI with Multiple Type Parameter Inputs of the Same Type

Note that in the above example we chose the element of the array to be a specific type specified by a type parameter. However the arrays themselves could as well have been specified by a type parameter.

 

So far we have focused on VI boundary where type parameters adapt the whole VI to specific type or types if multiple different type parameters are being used in the connector pane of the VI. Type parameters can also be used in composite types (e.g. arrays, clusters, classes) and the downstream composite types would adapt to what is wired to the type parameter input.

 

Type Parameters with a Cluster

Note that x and y as instances of the same type parameter have to be of the same or compatible type.

Type Error With Type Parameters

 

Type parameters can also be used in class private data to create parameterized custom types. This is where type parameters become extremely powerful. Let's assume that we have a class 3D Vector.lvclass that has three instances of a "Data Element.ctl" Type Parameters. The default type of the Data Element is set to be DBL. The cluster private data has three instances of the Data Element, one for each of X, Y and Z.

Type Parameters in Class Private DAta

 

Now we could create a Create 3D Vector method VI for this class that allows us to construct type parametrized instance of the class type.

Creating a Type Parametrized Object

Now calling this Create 3D Vector.vi with string as the inputs for type parametrized inputs X, Y and Z will create an instance of class 3D Vector with compile time type 3D Vector[String].

Calling a VI that Creates a Type Parametrized Object

 

And this is where we now start seeing the superpowers of type parameters and parametrized types as well as generic type parameterized VIs that go along with them. Now we have a capability of creating custom VIs and custom types that both can adapt to different parameter types at usage time.

 

Let's get back to the question of dictionaries. We could easily construct a dictionary that allows the key type to be parametrized with one parameter and the value type to be parametrized with another parameter. For example we could use the dictionary with I32s as keys and Strings as values. Or we could use it with Strings as keys and File Paths as values. Constructor for such custom type would be trivial to create.

Type Parametrized Create Method for a Dictionary

 

Once we have constructed the dictionary we would naturally like to use it. We could now use method VIs of the Dictionary class to add and fetch elements from the dictionary. As an example Get Element By Key would look something like this in it's simplest form.

 

Get Element From Dictionary

 

 

Note that Dictionary In is type parametrized with two different type parameters Key Type and Value Type. In the class library there is a Type Parameter control Key Type.ctl and Value Type.ctl. Now type parameter Key Type.ctl is used both inside the private data of the class and on the fron panel as the Key input, the type of these two must be the same. The same is true for the Value Type element of private data and the Value indicator that both derive from Value Type.ctl type parameter. The has function is any function that can convert any LabVIEW types to some strings that we can use as keys for the variant attribute node. We are using variant attributes as the store implementation is this basic example.

 

Calling the Dictionary with integer as the type parameter and string as the value would look something like this.

 

Calling a Type Parametrized Dictionary

 

As you can see the 0 and empty string will define propagate as type parameter types for Key Type and Value Type in the dictionary wire. Now Add Element.vi would have to adapt to these elections for Key Type and Value Type the moment the Dictionary wire is connected. The Key input immediately change to type INT32 and the Value input to type String. Similar would be true if the wires would be connected in reverse order. Connecting University of Texas string to the Value input of Add Element and connecting number 1 of type INT32 to the Key input of the Add Element would immediately adapt the Dictionary in and Dictionary out inputs to be of type Dictionary[Key Type = INT32, Value Type = String]. A type error would occur if Dictionary in would be of different type.

 

Type Parametrized Generic Types are an extremely powerful concept to incldue in a language and this idea describes a feasible way to implement them in a visual dataflow model of LabVIEW. This is and has been for maybe ten years my absolute #1 feature I have wanted to see in LabVIEW. I think the time is right for me to officially make this request. Ideally Type Parameters can be bounded but that's a topic for a whole other idea post.

It makes no sense (from a Software Engineering and Process standpoint) to force (and store) an absolute path for a build destination directory, in the project. What if a group is sharing a project but each developer prefers to have their files located in a different folder?!!

 

I recommend NI consider replacing the line of code in LabView that is checking for the presence of an absolute path for the build folder with on that does: "If user entered an absolute path, use it; otherwise, prepend the current project location to whatever (relative) path the user entered before building."

Feedback nodes can reside entirely inside one case of a case structure. This simplifies coding if feedback operations are limited to one single case. Unfortunately, there is no easy way to retain the output once the loop has finished if the last iteration executes one of the other cases. As a result, we might see local variables or even indicators inside the case containing the feedback node, defeating the "in place" purpose. For a "wired" solution, we need to place the feedback node outside the case and wire across all other cases (image top).

 

I propose an output terminal that sits on the output edge of a loop and contains the contents of the feedback node at the time the loop finishes. Typically that would be the edge of the same loop that contains the initializer terminal (image bottom), but it should also be available for globally initialized feedback nodes and on other loop boundaries surrounding the feedback node (selectable).

 

I am sure this idea needs to be worked out in more detail, so this is just an initial concept. 😄

 

 

 

 

Message Edited by altenbach on 06-16-2009 09:34 AM

I often create maps in a for loop, as shown below.  However, the "Insert Into Map" value input doesn't adapt to the value type, leading to extra hurdles in order to create the correct map constant to feed into the for loop/VI.

_carl_3-1596837062665.png

 

It'd be cool if I didn't have to do the extra work to create this map constant.  Ideally I'd be able to wire any value type into the "Insert into Map" VI, and then just right-click on the output terminal and select "create constant".

 

(It appears that you can now drag and drop a value type into a map constant which does make it easier, previously I would "build map" node in, get the constant it from it, and then delete it. Either way, it's still extra steps.)

 

In a big project I needed to insert a function at several (read "more than hundred") places.

How much would I have appreciated a history which gave me a direct access to this function without the need to go to the specific functions palette again and again !

This would have saved me a lot of time... and made this annoying task a little bit less annoying !

 

LabVIEW should memorize at least the last inserted function/VI but a history of four or ten would be much better.

 

The history could be implemented either with an extra menu (see below image) or by listing the X last inserted functions/VIs right under the All Palettes menu entry.

 

The incompatible functions/VIs for the wire type should be grayed out or, even better, the history should be contextual and list only the compatible functions/VIs.

 

Insert history.jpg 

At my work we often have structures inside structures several to many layers deep. We try to keep the inner most ones small to keep things to a single screen size overall if possible. But this causes a problem when you have to move an item inside a structure that it currently doesn't fit in. you first have to make room somehow for the structure to get bigger then you can drag the item inside and again shrink the surroundings (the last step can get really ugly when you have multiple layered structures or a lot going on around the outside).

So what if instead of moving the item into the structure you could move the structure around the item. If you could CTL+drag an edge, and instead of trying to push everything around the structure out of the way as it grows, it instead envelops the items you drag over (or spitting them out if you decrease the size). Same basic behaviors as dragging an item into or out of a structure but from the reference frame of the structure instead of the item (or the other way around, not sure how to describe it, kind of like plotting the motion the earth from the suns perspective or the motion of the sun from the earths perspective, they are both fundamentally wrong but both very useful for different tasks).  

 

tshurtz_0-1586795430997.png     goes to tshurtz_1-1586795505912.png  or vice versa where the only thing that was moved would have been the right side of the inner case structure while holding CTL (or shift or alt or some other equally suitable special key) 

 

I am guessing that it is not a simple request but would be very helpful to me on at least a daily basis.

As mentioned in this post, and elsewhere, it is very helpful on the forums to (1) post images and (2) post code that is usable by the masses (typically 8.6+).  Snippets are a useful way to post both images and code (for 9+ officially and earlier with a few tricks like the Code Capture Tool).  One downside is that if you are working in LV10 your snippet is not usable in earlier versions.  It would be nice to be able to Create a Snippet for a previous version in one operation.

 

I do this myself, for example:

 

 

Makes life easier for both the posters and the responders on the forums.

One of the quickest (and easiest to forget) methods to improve performance of your VI is to disable debugging.  It requires a trip down the VI properties to get there, however.  I propose adding a button on the BD alongside the other debugging buttons to Disable and Enable Debugging.  

I have a large base of compiled executables. One computer is encountering a "not enough memory to complete this operation" error. I'd like to drop a debug version of the executable on their computer and see if I can monitor which VI is using all the memory similar to DETT's remote monitor abilities.

 

New profile tool2.png

This LV typedef for the Waveform Graph property Cursor List is missing Line Width and Line Style! This is probably a solution to the mystery behind another post Show Attributes Selections I made earlier today. In order to completely define our Cursor List properly with one Property Node, those two elements must be part of this public typedef.

 

CursorListProperty.png

The current implementation of script nodes (formula, mathscript, etc.) is a bit unwieldy. We have to find a delicate balance between node size and content. (too small and we need to constantly scroll the text code. Too big and it is difficult to wire around it and fit it into the rest of the g code.)

 

My suggestion is that script nodes on the diagram look just like e.g. call library nodes (or possibly express VIs). Double-clicking them would open a separate editor window that floats above the code. Near the top we have a growable area where we can define the connector names, inputs and outputs  (variable name, datatype, etc) and below we have a nice code editor window similar to the current mathscript node, just comfortably big (e.g. like notepad)! At the bottom there could even be extra tools, e.g. like import from text file, save to text file, etc.

 

Typically the node would be collapsed into an icon but the script window can be left open during editing and debugging.

 

This is one case where breaking out of the confines of the 2D diagram would be helpful. The current formula nodes just don't really belong directly on a diagram. Nobody want to compose and edit text in an area the size of an old cellphone screen.

 

This is just a very rough Idea. The details would need to be worked out further....

My front panels are typically large tab controls so most of the FP design and editing takes place on tabs.

 

In this scenario we lose significant usability, for example:

 

 

  • We cannot double click on empty space to create a free label
  • We cannot see the alignment grid.
  • ...
Proposal:
  • The background alignment grid should continue across tab controls and other containers (e.g. clusters) in edit mode.
  • double-clicking inside an empty area on a tab should start a free label operation, same as on the plain background. (only clicking near the border should "find" the terminal instead).