LabVIEW Idea Exchange

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

I often would like to define a Type Def, then define multiple Strict Type Defs (i.e., multiple views) based on the one (not strict) Type Def.

 

Type Definitions can only include other type definitions if the sub is put into a container, such as a cluster.

Another suggestion, which would be nice.

 

When you have a tab control and create an enum from it to use in the BD, it is not dynamically linked to the original tab control. In other words if you add or remove a page the enum on the BD is not valid anymore, but is not actually broken as its just a plain vanilla enum.

 

If the enum created from a tab control was a typedef then it would automatically update if the tab pages are modified.

A work around is to have the tab control as a typedef itself (actually I have just thought of this, don't know why it never occurred to me before!) but I would still like the modified behaviour as its one less typedef I have to manage myself!

 

<INSERT FANCY PICTURE HERE TO GET EVERYONE'S ATTENTION>

 

 

I'd like to be able to right-click array functions like Replace Array Subset, Insert into Array, etc. and select add or remove input just like you can with the Build Array function. It would allow you to remove a wire and input from the beginning or middle of the function without having to rewire all the inputs after the one you want to add/remove.

NOTE: This is blatently stolen from a thread I started on LAVA here.

 

I would like to be able to specify a VI or VIs in my project that would run when some keyboard shortcut (ctrl-shift-R was suggested) was pressed.

Since in most cases a project is used to create a single application, it makes sense that when you open the project, you would want ot run the top level (main) VI in that project most of the time.

 

Check out the below image.

 

Step 1: Two BD objects were created with labels shown at 120px wide, then the label was dragged to the center of the object.

Step 2: The object was resized from 120px down to 60px

Step 3: The object was resized back to 120px.

 

Notice, the labels do not stay in the center (they need to). Also, notice the snapping behavior of these two objects differs as object is resized. Similar scenario occurs on FP objects.

 

MessedUpLabels.png

 

This post is partially a bugfix/partially related to my own experimentation of this post.

The clean-up feature that was introduced in LV 8.6 can sometimes do wonders, but very often it fails miserably on parts of the code...

 

It would be nice if it was made possible to select just an area of the diagram - or a structure (one particular case in a case structure e.g.) - and apply the clean-up algorithm only to that part.

The radio button control acts like a cluster container for booleans with some fancy logic behind it. Refactoring old code, we might have a bunch of customized booleans that we want to stick in a radiobutton control during refactoring.

 

For some unknown reason, we have to first drop at least one of the desired booleans into the control before we can delete the last one of the default controls that were already in there. I think we could get better work flow when doing these edits if we remove this random barrier that forces us to operate in a certain order. It would be nice if we could first empty out the radio button control and then drop all our desired customized controls in it. Of course a VI with an empty radio button control should probably be broken.

 

In summary, an empty radio button control should be allowed at edit time. We should be able to temporarily remove all existing content. Currently, LabVIEW won't let us remove the last remaining element if we try to do so.

 

(Hopefully, this is a trivial change and not something that would require lots of changes to the existing code) 😉

 

 

Big clusters that go beyond the limit of the FP are annoying, especially to resize them automatically and reorder the controls.

 

Here are a couple of improvements that could be made:

  • "Reorder controls in cluster..."
    • Allow user to scroll while re-ordering the controls to have access to all elements instead of having to do it in multiple time.
    • Shortcuts like Escape and Enter should respectively cancel-exit and validate-exit the reordering phase
      These are pretty standard shortcuts and already widely used within the Labview environment
  • "Autosizing"
    • Autosize to "Compact". Where instead of aligning all element vertically or horizontally only, they would be in the "most compact" (to be defined) possible configuration to simplify the access to all info in the cluster.
      For instance compacted in a square way, sorted by class (Booleans/numerics/strings etc.)
      I understand that this one might be more complex, but it would be really helpful in my opinion
      VinnyAstro_3-1705680190345.png
    • Less important (to me): In Edit Mode, in case a cluster is autosized to "none" and some items are hidden outside for whatever reason, the developer should be notified somehow. For instance the same way than for strings 
      VinnyAstro_1-1705678727875.png
    • (In the same case than above, allowing scroll bars could be interesting in some situations.)

 

-Vincent.

By default, overrides of interface methods with the default dynamic dispatch connector pane (object in/out and error in/out) look like this:

 

Current.png

This means that the default override of interface methods do nothing EXCEPT DROP INCOMING ERRORS, which is bug territory imo.  Ideally, they would be scripted to look something like this:

 

Ideal.png

Yes, I know I probably can mess with the project provider to get this.  No, I don't want to have to do that! 🙂

Navigating long lists in LabVIEW can get painful, e.g. for producer consumer design patterns and message handlers. 

This idea is to add submenu parsing for dot notation items.

NickNZ_0-1637183178741.png

NickNZ_3-1637185590012.png

 

Now your case structure can do this:

NickNZ_6-1637185740149.png

I don't think it will effect ranges in the case selector as it requires two dots... e.g. "Init.Step1".."Init.Step4"

 

Credit: This thread for inspiration: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Case-structure-easier-selection-for-structures-with-a-large/idc-p/4192417?profile.language=en#M43910

 

Suggestions required on how to handle a list in this situation where its a lot of numbered messages. 

 

Also I just learned from a colleague that by grouping controls carefully (& some caveats) with the dot notation on FPGA it allows for a submenu. (And clusters on a FPGA can take up a lot of gates).  So LabVIEW already has some code for this feature. Can it be leveraged? See below:

 

https://forums.ni.com/t5/LabVIEW/Group-FPGA-Controls-With-Dot-Naming/td-p/2767678?profile.language=e...

This post generated this idea which is the same problem in the FPGA space... grouping long lists to make them easier to use.

https://forums.ni.com/t5/LabVIEW-FPGA-Idea-Exchange/Better-FPGA-FP-Control-Selection/idi-p/3074718

 

 

 

 

Let's say I have a ring control filled with lots of of items, but I decide that it would be better for the user if he could see all the options without having to pull down the ring. I right-click on the ring control, choose replace and select a Listbox. Now I have an empty listbox though, and I have to recreate the list. Most of the times when I do this I want the items I had in the ring control to transfer to the new control, like this:


replace with content carried over.png

 

The transfer of items should work both ways, and apply to similar replacements, like a change from ring to enum e.g.

It would be nice to have a way to choose whether to keep the items or not of course (key control while doing the replacement or a dialog asking if you want to keep the items), instead of having to delete the items afterwards if you did not want them, but I am not sure it would be needed that often. I would be perfectly happy for the default to just keep the items.

PS. Writing a quick drop shortcut plugin is one existing way of getting this functionality without having to wait for NI to implement it in the IDE...Perhaps someone has already done that (?). This request is for it to become (or be a part of) the default behavior though.

There's a lot you can do with LabVIEW to improve the appearance of the UI.  The community has really helped move the LabVIEW UI frontier forward with many wonderful UI palettes and tools to improve UI creation and customization.  One key limitation to all of this though is that LabVIEW controls are comprised of parts that are NOT programmatically accessible.

 

This is a large drawback since it prevents developers from creating dynamic UIs.  For example, you cannot really add a good "Dark Mode" feature without designing specifically for dark mode because Frames and other control components are not customizable at runtime.

 
 

Control Parts.png

So I'm going through a bunch of VIs and relinking them.  So I go to a folder and select say 100 VIs and drop them into a new blank VI.  A bunch of dialogs come up telling me VIs are missing and I ignore them all at the moment.  Then I go to the block diagram to find which ones are broken to review them one at a time.  The only problem is the error list window displays over 100 errors that aren't "SubVI is not Executable".  I have all kinds of errors about required inputs not being wired, and for "This VI cannot access the referenced item in private scope".  Well I don't really care I'm not trying to run these I'm just trying to find all broken VIs and fix them.

 

Which got me thinking, can we have a category view of some kind in the Error List Window?

 

Required input not wired.pngSubVI not executable.png

The mother of all diagrams, the Block Diagram, does not have a subdiagram label...

 

 

subdiagram label.png

 

DVRs are references, and are automatically released when the VI hierarchy that created and "owns" it goes idle (stops executing).  Commonly, the DVR just contains by-value objects, or LabVIEW references that are also automatically released, but an important use case of DVRs is wrapping a non-labview reference that must be properly cleaned-up.   An example is an SQLite Connection pointer that must have a dll method called on it in order to release the database file it is holding open.  Many dlls have similar pointers/handles that need to be properly closed.  This is a headache for Programmers, who cannot rely on a stopped VI releasing its resources, often requiring restarts of LabVIEW to unload the dll.

 

A clean and easy solution to this problem would be to allow a "DVR Cleanup Callback VI" to be registered with the system when the DVR is created.   That VI would be called if and only if the DVR is release because its calling VI hierarchy goes idle.   This VI would contain the code to cleanup/close the contained non-LabVIEW references.  Could have other uses, such as debugging. 

 

I have developed multiple APIs that wrap non-LabVIEW dlls, and this feature would be a very significant help.   Please consider it.

The ctrl+drag and ctrl+alt+drag shortcuts for adding and removing space on the BD are super awesome. But I think they would be even *more* awesome with the following tweak:

Limit space addition/removal to the visible diagram; i.e. don't make any changes to other cases in a case structure.

 

I have had many situations where I was doing cosmetic tweaks in one case of a case structure, only to find I have overlapping items in another case that I wasn't looking at.

 

auto_size_issues.gif

 

Hopefully this simple animated gif demonstrates what I'm talking about.

 

(And yes, I know we could enable "auto-grow" on the case structure to eliminate the shrink-case-smaller-than-contents problem, but that still doesn't address all the potential issues here.)

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.

Several users of XNET miss an important function from the driver: to read signals' logical value from the database.

For example, the value of 1 means 'Initialized', 0 means 'not initialized'. We would like to read those strings.

 

See this thread.

The updated diagram expansion  (Ctrl+Drag) and its new counterpart (Ctrl+Alt+Drag) is a definite improvement in 2015.

However, they still both act globally on the diagram:

 

Screen Shot 2016-06-28 at 14.19.02.png

 

Shrink and obtain this:

 

Screen Shot 2016-06-28 at 14.19.12.png

 

All the objects outside of the case structure have been moved around because the shrinking action acted on the whole diagram, whereas my intent was to only compactify things inside the structure.

It would seem that the next step to improve the functionality of these tools is to allow the user to define their scope:

- define a region of interest meaning: DO NOT CHANGE ANYTHING OUTSIDE THIS ROI

- perform the action (expansion or shrinking)

 

In this particular case, this would work like this:

 

Screen Shot 2016-06-28 at 14.23.33.png

Screen Shot 2016-06-28 at 14.24.12.png

 

There is still some cleanup to do, but this is much less of a pain that fixing the carpet bomb effect of the current approach.

Arguably, this is easier to grasp with the "shrink" tool, but just think of the exact inverse series of steps to get an idea of the difference between the image at the top and this (the result of the current expand):

 

Screen Shot 2016-06-28 at 14.28.42.png

Simple thing:
It will be nice to have context help with monospaced font. The functionality of this help currently is very poor but with monospace font we will be able to add e.g. simple "arrays" and probably many more others descriptive things that can be usually found in e.g. .h files.

 

Below simple character based array in notepad++ and in LV context help.

 

notepad.JPG

 

context.jpg

 

Regards,

Michał Bieńkowski