LabVIEW Idea Exchange

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

The Duplicate Frame method of the DisableStructure class in scripting currently returns error 1072 ("This property or method is not yet implemented"):

 

dupframe.png

 

If we could programmatically duplicate frames in Diagram Disable Structures or Conditional Disable Structures, Quick Drop and other G-based editor features could benefit.

To be able to use 3rd party version control tools such as Git effectively, you need to be able to have a program that merges files and can compare files. Unfortunately LVdiff and LVmerge are only available in the professional labview version, but being able to use a VC system of your choice is such a basic need that it should be available for everyone. That way  you would be able to use the basic VC features, better integration with labview could still be integrated in the professional package.

I am happy that LabVIEW supports Python code with the Python Nodes. But it is difficult to debug errors. A console showing the output of the Python Scripts would be handy.

Enthought's Python Integration Toolkit had this function so I guess it shouldn't be a big thing to add?

 

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.

The LabVIEW Icon Editor plays a central role in creating graphical icons for VIs.

Yet, it has some quirks that would be great to address, such as fixing a few issues affecting users on Linux.

 

Because the Icon Editor is written in LabVIEW, many LabVIEW users could actually help fix issues and suggest improvements more directly, if the Icon Editor source code were hosted on GitHub. This would allow people to submit issues and feature requests (even in the form of Pull Requests with the fixed/improved code).

By transitioning the Icon Editor to GitHub, NI could establish a process that allows for the incorporation of community improvements into the official LabVIEW releases.  This would improve quality and allow for more and better feedback from the community.

Note that NI has historically shared the Icon Editor code with each new LabVIEW release (here in the NI’s LabVIEW discussion forums).  However, there hasn’t ever been an effective mechanism for the community to contribute back their fixes and feature suggestions.  So, hopefully this would only take incremental effort for exponential gains!

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.

Hi,

 

building a large project consisting of several executables and an installer is no problem when using the AppBuilder API.

But a quite time-consuming task is to open all build specifications to update the build path or the file  versions.

E.g. opening the build specification of an installer containing several executables can take up to a minute even on an up-to-date pc.

 

So I suggest to enhance the AppBuilder API with property/method nodes to manipulate the "often-to-be-changed" properties. An example is attached below.

 

Regards,

 

Bastian

 

AdvancedAPI_lvie.png

It would be great if LabVIEW supported the Python language, including any of its various packages such as numpy. Such computations would be much more transparent and easier to support than calling code in DLLs. They would also be much more open and flexible than the existing built-in computational solutions in LabVIEW, e.g., expression/formula nodes. Currently, I have to call Python scripts via System Exec.vi, which complicates data exchange. (NOTE: I am using an older version of LabVIEW: 2009 SP1.)

In Visual Studio you have XML Schema tools etc. It is a breeze to e.g. populate a drop down menu based on XML from a web service, and my first thought when I see it in action is - why do we not have this at our fingertips in LabVIEW already? LabVIEW could have made it simple to create schemas, generate flexible XML etc. You could have wizards that helped you, and cluster to xml conversion like in EasyXML from JKI - and it should all feel fully integrated (toolkits are OK, but this really needs to have native support).

 

I am currently developing a web service in LabVIEW and the first thing I had to do was to abandon the few in-built XML functions and write my own serialization code (using terminal mode for the web service gave you XML without proper headers, and the in-built flatten to XML outputs XML is impractical in use). Once I have serialized a text table e.g. and published it - using that table feels incredibly easy in Visual Studio (add data source-> input web address etc.) , it would be much more difficult to do the same in LV.

 

I think NI should make a big leap in the use of web technology. The RESTful web service functionality was a great addition, but the doumentation is non-existing, and we should have come much further by now. I know there are some cool experiments going on with web based GUI editors, but LabVIEW 2010 was just released with very little news on this front so forgive me if I rant a bit...Smiley Sad

This may not technically be a standard LabVIEW Idea, but it is an idea nonetheless and there is no where else to post this idea in the Idea Exchange Forum and I want get other peoples feedback.

 

I would like to suggest that sending packages (.ogp, .vip, .vipc files) to NI Support is an acceptable way to submit code for reasons relating to code (support, issues, review help, CARs).

 

I have had problems sending code and then sending all dependencies as well, along with instructions on where to install etc... (for example here) that was solved once I was able to convince my support AE to install VIPM. It also saved me a lot of time (other I had to rebuild code in order to send it as well etc...)

 

(IMHO) I think this Idea would compliment NI moves towards establishing it's LabVIEW Compatibility Program (which I am assuming VIPM and OpenG will be covered under)

Additionally there seems to be great acceptance by NI to packages already whereby I have seen NI code in documents/white-papers posted as packages.

Thanks to Christian L and Laura F these files types are now compatible with the new NI Forums.

 

Here are some of my notes on this Idea:

 

  • VIPM Community Edition would have to be installed internally (but it is free so there would be no cost)
  • I am not looking for NI to support VIPM itself (unless it is covered under the Product Partner Program?) only that I can send a package to NI Support and they will know what to do with it and be able to install it
  • OpenG would also be required to be installed as well (after all it is the LabVIEW main/only? Open Source movement) (this is free too).
  • That way I would not have to send large dependencies files (only include my internal package), and then email size would not normally be an issue (although I have used NIs FTP successfully in the past due to large files) but email is nicer.
  • All this would lead to a more streamlined approach to Support for those developers who rely on packages
Please post your feedback.
Cheers
-JG

 

Currently, the version of the packed project library (PPL, extension .lvlibp) is defined by the build script which creates the lvlibp.

It would be nice to have an option there to "hook" the version of the lvlibp to the version of the lvlib, which is used for the PPL.

 

Build Settings Version.PNG

 

The advantage is to match the developement version of the lvlib to the deployed version, the PPL.

One upon a time there was LabVIEW 5.x and MS Excel...

 

At that time MS Excel (97 or 2000) could be controlled through ActiveX and some examples in LabVIEW 5.x where showing how to do that.

Each NI partner or LabVIEW user who wanted to control Excel by LabVIEW had to imagine how to save the necessary ActiveX references like Excel_Application or Excel_Worksheet.

 

Then LabVIEW Report Generation Toolkit 1.0 for MS Office was born. Let's call him RGT

It was wonderful !

LabVIEW 6.x and RGT gave us a lot of functions and a new framework (template) for building our own functions.

The GOOP approach in RGT was including the access of many ActiveX references and parameters through one single reference : the magical "Report Refnum".

Instead of maintaining our old functions, we used RGT and transfered our custom functions to this new environment.

 

Example of Excel Save As function :

 Excel SaveAs.PNG

 

As you can see, it was very easy to get the ActiveX reference and modify them (unbundle / bundle).

 

Until LabVIEW 8.5.1 and RGT 1.1.2, the weather was nice is this area...

 

-----

 

Then came the Objet programming in LabVIEW 8.0 and NI decided to rewrite RGT with this technology in RGT 1.1.3.

RGT 1.1.3 which came with LabVIEW 8.6 was catastrophic in terms of compatibility.

You get a big headhache when trying to build an executable which used RGT.

Some of our custom functions where broken. There was no way to repair them.

 

RGT 1.1.4 soon replaced RGT 1.1.3 and gave the possibility to get the ActiveX references from the Excel class by adding the "Get ActiveX Reference" to the class.

Most of our custom functions could be repaired but not all of them since the "Set ActiveX Reference" function was not added.

 

Until now, some of our projets are locked in RGT 1.1.2 and cannot upgrade to LabVIEW 8.6. (or above) because of this missing function.

 

Mr Eagle Man,

Please add the "Set ActiveX Reference" in LabVIEW RGT 2011. 

 

 

 

Currently, any VIs including .NET code are shown as broken in Labview for OSX.

This is particularly annoying for people working in a cross-platform environment, specially considering that the Mono framework covers a lot of Microsoft's .NET implementation with the added bonus that it works in Linux, Windows and OSX.

 

Please allow users to choose which .NET implementation to use.

Currently when binding a .Net Constructor node to a private assembly the vi saves the absolute path to the assembly.  This behavior causes a lot of pain when multiple developers working on the same project have the source code repository mapped to different local directories.  Every time I load a project I go through several iterations of Labview/.Net searching for the "missing" assemblies.  Depending on what I have on my disk at the moment, oftentimes it will bind to a dll that's in a completely different project.** Trying to find a workaround for those vendors who refuse to put their assemblies in the GAC has been problematic.

 

Note I'm not asking for a path input to the .Net Constructor node.  I just want the option for the path to be stored internally as a relative path rather than an absolute path.

 

 

**This is a little odd given private assemblies aren't supposed to be loadable outside of the given .Net AppDomain.  I guess there's not a 1:1 correlation between Labview app domain and .Net AppDomain?

 

Swagger/OpenAPI  has become the default go to way to document and interact with rest API's.  It would be great that when you publish a LabVIEW webservice it generates the OpenAPI yml or json file (being able to generate both would be great).

 

Also having a right click in the lvproj webservice view that brings you to the swagger page for debugging would be helpful. 

This idea is about a new LabVIEW feature, the Packed Project Library.

 

To statically use a packed library as a dependency, you need to add the library to the LabVIEW project.  After that's done, all the callers link to the packed library.  If you're strictly a library user, then whenever you need a library update you simply ask the developer for one.

 

But what happens if you're a packed library user and developer of the same library.  You can't use a packed library as a static dependency until you build it and replace the lvlib with the lvlibp...but you can't develop the packed library after it's been built and replaced in the project.

 

If you're a user and developer, it makes sense (to me) to maintain two separate projects.  One manages the packed library resource, one manages the application.

 

What if there were a way to revert the packed library to the LabVIEW library from the same project?  You could use the spiral development model and simply switch between the two types of libraries during development.  You could also (and this IMHO is the most important part) incrementally deploy and test the project.  If you're strictly a packed library developer, hopefully you're incrementally testing anyway.

 

My final pain point with the packed library is with respect to upgrading the application.  Similar to above, if you're strictly a user, you pray the developer is still in business and ask nicely for an upgrade.  If you're a user and developer, and you didn't maintain two projects, you might think to replace each static packed library subVI in the application with the original source and then rebuild the lvlibp.  Or you might think to create a new project that includes the lvlib and rebuild the lvlibp yourself.  I haven't tried it, but I hope that you can replace the original lvlibp with the lvlibp from a new project (not the one that created the original lvlibp).

 

This leads me to a best-practice for lvlibp: always use them as dynamic dependencies.  That way, you can maintain and develop the packed library in the same project that uses the packed library.  You'll simply reference the resources differently.

 

Even if you don't kudo this idea, I'm very interested to hear your feedback and experiences with the lvlibp.

 

Thanks!

 

Steve

In LabVIEW 2009 one could right-click on a VI, for instance, in the project Files view and select a Delete from Files option.  (It didn't work perfectly--in particular, LabVIEW didn't always delete folders from disk, but it usually did work for individual VIs.)  NI removed this option in 2010, leaving the developer with the task of deleting files manually through the OS files view.  (This isn't the end of the world, of course, if a developer doesn't use integrated version control--and we don't currently but only because LabVIEW does not properly support integration with Subversion--but it is a significant inconvenience.)  This option ought to be present once more.

 

In particular, this function is absolutely required if LabVIEW makes a claim to provide integrated support of version control.  On that note, the current client (Pusk Ok SVN) LabVIEW supports for what is probably the most popular version control provider (Subversion) among its customers does not even claim to support file renaming or deletion (http://www.pushok.com/soft_svn.php), while a third party plug-in (http://jkisoft.com/tortoisesvn-tool/docs/) claims to support this behavior only for VIs and Controls (not, for example, LabVIEW class files).

A native Icon Editor API seems a natural evolution for interacting with the new icon layers that appeared in LabVIEW 2009.

The current API is the only way (I know of) to interact programmatically with the Icon Layers.

This is a very handy API that should be polished up and included with LabVIEW. 

 

You can download the current version here:http://decibel.ni.com/content/docs/DOC-8647 

 

 

This should work!! I know there are workarounds and I have used them but it would be much easier.  

atsrefdsfads.png

 

On Windows, you can define environment variables that auto expand to known directories. There are some variables that are already defined by the system. For example, %TEMP% automatically expands to c:\Users\<username>\AppData\Local\Temp OR WHEREVER THE USER MOVED TEMP DURING INSTALLATION. That's the important part .That makes it possible to write %TEMP%\abc as a symbolic path that works regardless of how the system gets reconfigured.

 

Users can define their own environment variables, and those get expanded when used in a path in the command line or Windows Explorer (the text entry region at the top of an Explorer window). On Linux and Mac, it is the equivalent of using $VARIABLENAME/abc, where VARIABLENAME is some user-chosen name.

 

[admin edit] Added background information on environment variables, and updated title to use the word "Environment" instead of "Environmental".

The output from flatten from XML is not as elegant as it could be. A big advantage of XML is that it is both human and machine readable, but flatten to XML seems to really neglect the human aspect, and can be a bit akward to process. 

 

Here is the output from a simple structure using .net serialization:

 

 

<?xml version="1.0"?>
<TestConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<VISAaddr>GPIB::07</VISAaddr>
<DBServer>localhost</DBServer>
<CalFolder>C:\Calfiles\</CalFolder>
</TestConfig>

 

It is nice, short, and human readable. 

 

Now here is the output of an equivilent structure from flatten from XML:

 

<?xml version='1.0' standalone='yes' ?>
<LVData xmlns="http://www.ni.com/LVData">
<Version>12.0.1</Version>
<Cluster>
<Name>TestConfig</Name>
<NumElts>3</NumElts>
<Refnum>
<Name>VISAaddr</Name>
<RefKind>VISA</RefKind>
<Val>GPIB::07</Val>
</Refnum>
<String>
<Name>DBServer</Name>
<Val>localhost</Val>
</String>
<Path>
<Name>CalFolder</Name>
<Val>C:\Calfiles</Val>
</Path>
</Cluster>
</LVData>

 

Its overly long, 21 lines versus 6 from .net. A better way to represent the same information would be something along the lines of:

 


<?xml version='1.0' standalone='yes' ?>
<LVData xmlns="http://www.ni.com/LVData" version="12.0.1">
<Cluster name="TestConfig" NumElts="3">
<Refnum name="VISAaddr" kind="VISA">GPIB::07</Refnum>
<String name="DBServer">localhost</String>
<Path name="CalFolder">C:\Calfiles</Path>
</Cluster>
</LVData>

 

Its still not as elegant as the .net result, but I think it looks better than the original. This may seem like a trivial issue with the small XML files I presented, but when you are storing much larger data structures in XML it starts to become a big mess.