LabVIEW Idea Exchange

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

Strict Type Def Text Ring does not auto-update constants. Since NI support says this is expected behavior (http://digital.ni.com/public.nsf/allkb/46CC27C828DB4205862570920062C125) then the right-click pop-up menu item that is checked be default indicating that it will be updated automatically should be hidden, disabled (greyed out), or uncheckable so developers are not mislead to believe they will be updated. This has caused defects and when found requires much work to search for and replace all the constants, if a value is inserted for example. They did not want to create a CAR for this.

Steps to Reproduce:  

Given x.ctl on disk, create new VI, drag x.ctl onto block diagram, right click, Open Type Def. It opens x.ctl in its own window. Right click the control, Edit Items..., change the name, position, or add item. File Save, File Apply Changes, Close. Look at the block diagram constant. It does not contain the change just made. Right click, Auto-Update from Type Def. is checked and Open Type Def. opens the .ctl where the new values can be seen. Replace with and browse to the x.ctl does not update the constant. However, Change to Control or Indicator does update it and then after change back to constant it will reflect the right content.

I´d appreciate an event that is called whenever there is a change of Top cell (row). Several times I needed to "align" visible content of two objects (listboxes, trees, etc.). Value change or mouse scroll event can be used but still I´ve found no way how to catch when the user uses scrollbar arrows or draging scrollbar position indicator. The only solution I found is to keep it aligned by periodically reading out Top row visible property of one object and set it for another one. That requires code in Timeout event that is called very often (otherwise it is noticeable for user) causing performance drop.

I'm developing some software for a colleague, to run on (one of) his machines.  I do my best to follow Good LabVIEW Practices, including using Version Control (SVN) to maintain my code.  Hence my Project "jumps" from computer to computer.

 

I recently noticed an old problem re-appear, namely occasional Front Panel and Block Diagram labels appearing in a different Font Size (18) than I've set as the default on my Office Desktop and home Laptop (15).  This was really irritating (especially having to find those wayward labels and "fix" them), forcing me to re-examine the Where and How of setting Default Fonts in LabVIEW.

 

This still appears to be a Dark Art, one (perhaps) involving LabVIEW.ini (and some undocumented keys, not present in the "vanilla" configuration file).  There appear to be several such INI files, with LabVIEW.ini attuned for development, and an INI file in the Data folder of a built Executable for that Executable.  But still, the values are bereft of documentation (i.e. documentation is conspicuous by its absence) and not everything is explained (like why some values are in quotes, what they mean, and how one sets a specific Font, e.g. Arial).

 

One thing that I, in particular, would like to see would be the ability to set the Font Defaults on a Project basis.  For myself, I "own" the Project, and would want it to have a consistent Font (size) on all my VIs (unless I specifically decide to Emphasize something), no matter on what machine I develop them and when.  If I have to set the Font Default on a machine-wide basis, then every time I develop on my colleague's PC, I'd have to (a) note his settings, (b) change them to mine, and (c) remember to set them back when I finish.  As such sessions are often an hour here, an hour there, this "machine-centric" setting becomes a nuisance fast.

 

I recently had the opportunity to discuss this with an NI Applications Engineer, who assisted me in finding (some of) the obscure references to Font Setting Tricks.  I noted that a lot of what the Community knows seems to come from "Reverse-Engineering" NI's settings, and that some Documentation and Standardization (let's get away from designating Fonts as "1", "2", or "3", which have no intrinsic meaning, please) would be a good idea.  Hence this LabVIEW Idea.

 

Bob Schor

An image explains this best:

 

stripbookmarkname from bookmark text.PNG

Removing the bookmark from the text when it is already displayed as the group name will reduce the level of information noise in the bookmark manager, and make it easier to read the bookmarks.

Languages like 'R', 'Python', and MatLab (yes I use the old name) have these.  They are useful.

 

One of the key ideas in LabVIEW is that the user needs minimal interventions to code a useful result.  As more information is encoded in a data type there is more opportunity to make "hands free" code that "just works".  I think these two data types can do that.

 

Data Frame:

  • Primary data type in R
  • It is Array-like, but NOT an array
    • each column contains one measurement (row) on one variable
    • It acts like a list of vectors, but the vectors have the same number of rows, and indexing allows a return of all or subset from all columns
    • column types are heterogenous - they can be different
    • column types can be set.  A column of 0 vs. 1 can be set as factors/binomial values or as continuous.

There are functions that data analysis folks do every day that are informed by variable type, so the function operating on the inputs doesn't need type specified because it is interior to the table.  This means you can say "plot(mydata)" and if your data is set up well, the graph parameters are already specified and useful.

 

Some references:

 

Data table:

This is from Hadley Wickham, a very famous person in 'R'.  He does great work, and his name has high brand value in data-analysis.

 

It:

  • Uses the "data.table" package
  • is able to be screaming-fast (think roller-coaster) especially when used with the "split-apply-combine" approach to data analysis, and SQL-like operations.
  • is built for handling huge data (100GB tables) quickly and efficiently.

In many applications the same operation is not possible due to memory constraint or viable due to processor overhead can execute adequately (aka wonderfully) by using this data type on the same hardware.

 

References:

 

 

 

 

ThisVI.PNG

The label should be hidden as standard on This VI referrence as it gives no extra information, it only clutters the block diagram.

/Y

I have been recently asked by NI to answer a poll about what feature I would like to see as far as data management and access and at that time, I didn't really think about mentioning something which is dearly missing in LabVIEW: cloud storage access.

The reason for this request is that increasingly, files used by collaborations cannot always be copied locally (for instance due to their size or because of frequent updates), or managing local copies and updating the central cloud repository is getting prohibitively time consuming and cumbersome.

 

There exist a few attempts in this direction (e.g. GDrive for LabVIEW, a third party skeleton of a toolkit to access Google Drive, or LabVIEW Interface for Amazon S3), but there are some glaring absent ones such as Dropbox, OneDrive, Box or iCloud to name the most popular ones.

As I mentioned before, GDrive is a starting point but is missing some basic features such as folder list, comments, etc.

I cannot comment on Amazon S3, as I don't use it.

Obviously, there is no way to predict which cloud storage solution will disappear in a few years from now or which one will pop-up tomorrow and become popular, but most of the work has been done by those vendors, who provide .NET API for their cloud solutions (maybe not Apple) or at the very least a RESTful API. These APIs could of course be made community projects (like GDrive is to some extent), but their importance would seem to justify a minimal investment from NI.

 

 

We've been saying it for years now.  Enums should be typedefs.

 

Why not make EACH and EVERY dropped Enum into a typedef automatically.  Drop a new Enum from a palette, it is a typedef.  Copy it, it's linked to the original.  For my taste, even ask for a save path after dropping the enum but for the sake of our sanity, just make each and every enum a typedef already.

Imagine that you have made lots of code, wiring up several VI etc. all with the same data, a cluster for example, going in and out. Now you regret not having defined that wire as a typedef. Today replacing the data with a typedef will involve a lot of steps; you start by clicking on one of the controls or indicators, and create a typedef...then you need to do the tedious work of replacing all the other controls and indicators up- and downstream. 

 

Would it not be nice if you could just right-click on the wire and select "Define type"/"Create type definition" or "Replace with type def/class"  - and then choose to have the type definition automatically replace everything along the wire ("propagating type def")?

 

This idea was inspired by and first came about as a comment to this idea by cowen71.

When using Typedef's I often have teh control wire passing through a VI. If I need to modify the typedef, I have to either create an instance of the controil/indicator, or got to a VI that uses the typedef control and the righ-click. From here I can open the Typedef.

 

What I would like to do is to be able to right-click on the wire and select directly 'Open Typedef' without having to go to a control.

image.png

It is a minor issue, but if I am in the middle of development in a VI, I don't want to have to click away from the VI under development to find the control. Additionally, creating a constant so that I can right-click on it is also not so convenient. If the Typedef is a large cluster, the block diagram may be distorted when the Typedef appears.

So one shortcut I really like is CTRL+Shift+E.  This shows a VI in the opened project and drills into dependencies, and libraries to show you where the VI is.  The most common reason for me doing this is to find the library or class that a VI is in, and to find the other members within that library.  One issue I have is if I open a VI that isn't in a project.  This isn't very often but some times I want to work on editing a library or class that isn't part of a project yet and is just some reuse code that I intend on cleaning up.  

 

When I open a VI that is in a library, but not in a project, CTRL+Shift+E does nothing, but what I think would be nice is if this same shortcut could be used when not in a project to open the Edit >> Browse Relationship >> This VIs Class and open the class to show where the current VI is in the class or library.  Or alternatively this idea could be to make a new shortcut that does open the library or class a VI belongs to, and select the VI in a similar way to the This VI In Project works.

As we increasingly integrate with HTTP servers the LabVIEW functions appear more and more limited.

 

Authentication is a major concern and in enterprise environments one option is NTLM (or Windows Authentication).

 

I would like to see the HTTP client support this as in this case we had to abandon using LabVIEW for the integration.

Hi,

I had this idea for a while and did not find anyone else suggesting it, so heres the Idea:

 

Usually I have many VIs open at the same time and its annoying to switch between them, because they all have the same symbol in the Taskbar, and all are named "Frontpanel of ..." (rest is cut off)

Why can't Labview show the VIs icon instead? Maybe even with a little label on the icon for frontpanel / block diagramm.

Or is there already a solution for that?

Hope you like the Idea.

 

 

Currently when I build a dll in Labview, the parameter list defaults to generating len, len2, len3 for the length of each string or array output I have in my function. Not only this but these array length are all dumped at the end of the parameter list and it is difficult to see which parameter matches which length. Please can developers consider having each length parameter after the array that they represent the length off, and name them with the name of the array parameter with Len at the end?

e.g. Currently default behavious produces:

functionName(double temperatureArray[], double voltageArray[], char errorString[], int len, int len2,int len3);

Can this be changed to:

functionName(double temperatureArray[], int temperatureArrayLen, double voltageArray[], int voltageArrayLen, char errorString[], errorStringLen);

Have a property node function that can set the aspect ratio of the gridlines in a Graph based on the data. Similar to the 'asp = #' function in r

I'm surprised a search did not turn up anything about this.  NI should create a LabVIEW Amazon Web Services/Azure/Docker Image(s).  The sample case I am thinking of is having a Jenkins CI server running on AWS EC2 with a full LabVIEW environment installed.  This would allow off-loading the long FPGA or full RF suite builds during CI.

 

Apparently NI had this with LabVIEW 2012 on AWS

 

I would suggest to NI the following steps:

  1. Collect underpants
  2. create AWS LabVIEW image for cloud-based compiling - charge per use
  3. Use AWS to work out the kinks to get an efficient, speedy image created
  4. Open an NI data-center that does what AWS/Azure does but for the tech/engineering field and host all of their own software images
  5. Profit (or at least start to pay back that huge CapEx outlay)

Thanks!

Charlie

 

 

 

 

 

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.

If I have a TypeDef cluster in my block diagram, I have the option to display this as an icon. This is how I normally have the clusters on my block diagram.

BeforeClusterUpdate.png

 

Occasionally, I have to replace a cluster with a different cluster. However, the cluster is replaced with a none-oconised version of the cluster. Thus often the block diagram expans in one direction or another accordingly.

AfterClusterUpdate.png

 

I would like the cluster replacing the actual displayed cluster to adopt the same visual setting (i.e. to appear as an icon).

 

This actually feels like a bug to me rather than a feature request.

We can right-click a string object and change the state (control, indicator, constant, array, element) by right-clicking. Unfortunately, the current behavior is (partially) inconsistent in the way the display format (normal, /-codes, pass, hex) is handled. Here are some results (list is incomplete), the symbol <> means in either direction.

 

Control<>indicator: The display format is retained

Array<>array constant: The display format is reset to "normal". *(Also see below)

Control|indicator<>constant: The display format is reset to "normal".

 

(*note that if I drop a string constant into an empty array container, the format and element size is retained. Converting to array using right-click should do the same!)

 

Whenever a conversion involves a diagram constant, the current display format is lost. I think it should be retained!

 

Everyone knows, actual assembly and constructor selection through dropdown and objects is very painful.

Disadvantage: A programmer has exactly to know, what he search for and in which assembly he can find it.

 

.NET Constructor Node actual select dialog

 

Common .NET Editors supports users with dot notation and text recognition. e.g. Visual Studio

.NET Editor.jpg

 

OK that is luxury and not necessary - but what about a simple filter input field like in "Edit Events" dialog?

 

Filter Edit Events

 

To capture this in a nutshell:

    - add a filter input field

    - add a little bit luxury with dot notation and autocomplete

    - maybe there is a way for remanent selection of some default assemblies (cf. Visual Studio) so that filter base is fast and assembly dropdown must not use all time

 

Benefit: Notation to select a constructor (or method or property in other nodes) is that the filter input string is similar to all .NET class documentations, tutorials and examples. Transfer will be much easier.

 

 

NewBrowse.jpg