LabVIEW Idea Exchange

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

Since I'm working with LV-DLLs there is a very very annoying Bug. I just made my first tries in LV 2012 (up to now I'm using LV 2009) and I recognized that the bug is still there but an information/warning dialog opens now when it takes effect. With other words: The bug became a feature ;-( So it's time to make a suggestion for changing in the LV behaviour.

 

Here are the steps you have to take to reproduce the problem:

1) create a new, empty LV project

 

2) first create a cluster, store it as type def and add the type def to the project

typedef.jpg 

 

3) create a new VI (called test) that uses this cluster as output (input will work, too). Add the VI to the project, too.

 2.jpg

 

4. Create a DLL-Spec with this VI as exported function (sorry, I’m using a German LV):

 3.jpg

 

5. Usually the default prototype is not the best. So we re-configure it like this.

4.jpg

Click to ok and store the project and all files.

 

 

6. Ok, last step: Building the DLL 🙂
 – Ups, we forgot to change the element “n” inside of the typedef-cluster to U16 (it’s still set to double).
But no problem – changing the typedef will correct the bug everywhere where the ctl is used.
Open the typedef, change and store it. Now re-build the bug-free DLL - finished! .. or not? No, you're not. Because you changed the type def LabView has reset the hard configured prototype to default *grmpfl* Smiley Mad

 

Now you might say: “Hey, where is the problem, just re-configure it.”

Currently I have a single project which uses up to 25 DLLs created in LV. All are using the same data cluster typedef. Each DLL has approximately 10 exported VIs. This makes 250 prototypes I have to re-configure if there is just one little change within my cluster!!!

LV resets the prototype even if a VI-IO changes from “required” to “recommended” – a change that does not have any effect to the behaviour of the exported VI.

 

So NI, please change this “feature” to a real feature as soon as possible!

 

Meanwhile I have to go on using variant elements to send data to my DLLs and back.

 

 

Appended you'll find a very similar example. Don't forget to save the VI after you've changed the type def.

 

Now that scripting is "legal" we need to be able to do more with it, when it comes to the event structure scripting is weak.

 

Here are a couple of discussions where people wish for more scripting functions around the event structure :

Triggering an event on a picture created with LV Scripting

- Remove Frame Not Implemented

How do I get the cases in an event structure

- Event Structure Selector Labels

 

We need to be able to add and edit event!

The concept of fluent interfaces using method chaining applied to a LabVIEW block diagram would be awesome!

 

When calling .NET libraries from LabVIEW, block diagrams explode horizontally - the aspect ratio of the diagram can easily push 5:1 or worse (it's 10:1 in the example below). Some Method Chaining syntactical sugar would yield a more space-efficient-and-readable 4:3 to 16:9 or so.

 

Property Chaining is already well-established in LabVIEW - let's get us some Method Chaining!

 

LabVIEW-Idex-Proposed-Fluent-Interface-with-Method-Chaining.png

 

See the first comment for footnotes...

Many times when wanting to share a VI Snippet on a discussion forum to quickly demonstrate a suggestion, I find it tedious to save the snippet to a temporary location, then go to the webpage, navigate to the location and upload the image to add it to my reply.  I think it would be very helpful to have the ability to configure the VI Snippet to automatically upload to an online image host (imgur.com for example or even an NI solution) and put the link on the clipboard.  Then it's ready to paste into the reply.  Other desktop screenshot applications already have this functionality (see ShareX (formerly ZScreen) ).  The purpose of VI Snippets is largely to facilitate this exchange of small portions of code and this would simplify the process greatly.

One of the many attractive things about LabVIEW, is the fact that if you can think logically, most likely, you could write LabVIEW code. However, there are lots of coding opportunities in the world, that require code that is developed in C or C++, especially products that use embedded SW.

 

Since "G" is based upon "C", I was wondering if it would be feasible to create a development tool that would allow the user to develop in LabVIEW, but also convert or create equivalent "C" or "C++" code that could could literally be inserted into a program. I've used the .dll creation utility for C developers to use in various "test" type applications, but have yet to find a way to use that method constructively for embedded projects.

I wouldn't call it common knowledge, but it's certainly not unknown that there are LabVIEW callback VIs that are invoked if present when certain development environment events happen. With the growing prominance of scripting and the increasing ability to develop custom tools to inhance development, I suggest a more flexible approach to these callbacks. Right now, if you want to use these VIs you have to be careful that you don't overwrite the existing VI (if there is one), or you have to manually go into the VI and drop your subVI that you want to run, within the specific callback VI. It would be nice if there was some tool within LabVIEW that allowed you to select the VIs you would like to run on certain LV Development Environment events, and then the paths to those VIs would be fed into the callback function VI to be called dynamically. While us developers could create something like this on our own, a standardized template for a more flexible callback would be nice. This would ensure the developer could create VIs to, say, run on LabVIEW startup but never have to muck with the actual lv_init.vi VI, worry about what's already in the VI and overwriting it, etc. They would just have to configure another path to a VI for the lv_init VI to call. If anyone has a more flexible idea, please feel free to add to this.

Currently the lvsound2 library -- the Sound Input and Sound Output VIs supported by lvsound2.llb and lvsound2.dll -- updates the audio device list from the operating system only when first being loaded into memory. If you change the device list (e.g.., pair/unpair a Bluetooth headset) the device IDs will not reflect the new configuration until all the lvsound2-dependent VIs have been unloaded from memory. After adding or removing a device, the VIs will generate error 4803 ("The sound driver or card does not support the desired operation.") for device IDs related to the new/removed device,  even if the ID is still actually valid and points to something else. This is extraordinarily inconvenient for test systems focused on audio device testing, but understandably a niche issue, which may be why it hasn't been caught before now.

 

In the interim, the workaround is to dynamically call any of the VIs you're interested in to force them to load/unload as necessary. There are two appropriate solutions I can think of:

 

1) Update the Sound X VIs to implement the dynamic call workaround (preferably directly around lvsound2.dll calls so we can still borrow other VIs in the LLB).

2) Update the DLL to support on-the-fly changes.

 

The latter solution is ideal, particularly for performance. This reads both as a suggestion and a bug report so that anyone else who has this problem can find a public forum documenting the issue.

The State Diagram Editor was a very cool tool and lots of LabVIEW users (not only beginners, far from!) are missing it!

 

And no, the state chart module is not a replacement for the State Diagram Editor!

 

Discussion here.

 

Image borowed from Ben

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.

Every time when the new Developer Suite arrives, we have to setup our development system from ground up.

This could be simplified by installing OpenG right from the Platform-DVD's.

Also, the risk of missing dependencies between systems will be dramatically decreased.

 

The detailed help link in the LabVIEW Context Help window is a great way to add extra documentation to your LabVIEW code.  However it currently only supports .hlp, .chm, .htm, and .html files types.  This should support many more documentation types such as pdf, txt, doc, .xls, png, .etc, etc.

 

pdf.png

Being able the Dialog "Search Results" from custom tools would be nice.

 

This could be done by providing an API to the real search dialog or by placing a VI for showing a similar looking dialog into vi.lib.

 

The Idea has been mentioned here: https://decibel.ni.com/content/message/15984

I miss the ability to use the results shown in "Search Results" in scripting code. Programatically selecting some results is desirable.

 

This would allow to do some custom filtering, searching in results, do advanced replacement, ... with some custom tools.

 

Greetings,

shb

A .NET assembly can mark some of its items as deprecated to alert users of those items to not use them for future applications. This is part of the .NET standard. It looks like this:

[Obsolete("This is the message you get!")]

 

In other development environments the developer will see this message when using a deprecated item.

 

This is an example of what it looks like in the Visual Studio editor. The item is underlined and when you hover over, the message is shown:

vseditor.png

 

This is an example from Visual Studio builds:

vs builds.png

 

However LabVIEW does not. If you're developing a LabVIEW application using .NET interfaces... You might use deprecated functionality by accident. To avoid this... LabVIEW users like myself generally have to have intimate knowledge of the assembly or the documentation up on another screen just to make sure they are not using deprecated items.

 

I propose we mark items in a special color to indicate they are deprecated. I chose pink here for no reason. Any color is fine:

lv nodes.png

 

Also, we should indicate the item is deprecated in the class browser in some manner. Again, I just drew some stuff, doesn't have to be exactly this:

lv browse.png

 

My customer is using LabVIEW 2009 with SIT, MATLAB R2007B and he was able to transfer more than 97 elements of array data with his Simulink .mdl file with the following configuration:

- Configuration parameter of MATLAB model: solve complete time: inf, type: fixed step, solver: discrete, fixed step sample time: 0.01
- Default LabVIEW array reading rate defined by auto generated VI: 50ms >> changed to 5ms
- Executed in Windows local host

However, when the .mdl file is converted to DLL, it seems as though that an array size of over 97 cannot be transferred.

The issue seems to be able to be produced even with multiple arrays or multiple scalar controls so I believe it seems to be an issue of how much data it can handle and not a data type issue. As I mentioned previously, data is able to be passed up till a certain amount but after this "threshold", data does not seem to be passed and the default value of 0 is displayed on the indicator. (In an array, the specific array size is initialized but after the threshold, 0s are shown)

 

I was also able to reproduce the issue on my end with the attached files.

Download All

When we open and not making any changes we close the code refering to the API of components which version differs from the version was used to write the code we are getting the standard message do we want ro save or deffer the changes or cancel the operation.

 

When we hit the buton/link 'Explain the changes' as the result we are getting the 'not explaining a lot' message: 'External component has been changed'.

 

It would be very practical to have the information what exacly has been changed.

I suggest NI include a native feature to serialize LabVIEW objects in an interchangeable form.  (Alternatively, NI can at least provide enough access to allow a third party to develop such a framework.)

 

By "interchangeable" I mean in a manner that allows sharing object data between platforms (e.g., between LabVIEW and Java).  (Hence having "default data" without specifying the values of the default data is not allowed.)  Moreover, using a more common format (such as "Simple XML") is appropriate.

 

Of course, including the object version number is only meaningful within LabVIEW, but this is useful within LabVIEW thanks to the capability of LabVIEW objects to translate between versions.  (Note: I recognize the versioning can't avoid all possible issues, but in practice I think that is rarely a practical issue.)

 

I understand that for security reasons a developer may want to turn off the ability to serialize an object.  To support that, I envision a checkbox to allow serialization (default = True) in the class properties dialog.

 

I think XML is the best option for this for several reasons:

1) It is a common way to serialize objects in different environments.  This means that I can exchange serialized data with Java applications, for example.

2) It is readable, albeit not easily readable, by human beings.  (I actually don't want humans to read serialized data very often--and really never the operator, but it is good that they can on the rare occasion when they need to do so.)


Why I think NI should implement this:

1) This is relatively straightforward for NI to do since NI can already serialize a class to the current (noninterchangeable) LabVIEW XML format.

2) Having this capability could greatly expand the application space of LabVIEW, since it would make it orders of magnitude easier to interface with nonLabVIEW applications.  This is especially important in large systems, in which it may be advantageous to implement some system components in one environment and other components in another environment.  This is, I think, by far the most compelling reason to include this feature.

3) That there is a need for this seems obvious, given the number of lengthy discussions just on LAVA about this topic.

4) The current situation, in which each class must contain specific code for serialization, is patently inefficient and nonsensical.

5) In other major languages meaningful object serialization is a given, and LabVIEW should include (indeed, must include) this functionality to be competitive.


For the record, to serialize LabVIEW object data for communication within LabVIEW we use either the methods to flatten to string or to XML, and this works fine.  I realize it's not theoretically 100% fool-proof, because of potential issues across different object versions, but in practice we use version control, so that we build applications using the same versions of interface code (usually), and we only have one large system, so we can pretty easily control our deployed applications.   (I think that versioning an application could achieve the same.)  In practice, we've never experienced a version problem with this approach, and it avoids having to write any class-specific code (which, again, a developer should definitely not have to do) to support serialization.

[Cross-posted here on the JKI blog]

 

One LabVIEW feature that (if it existed) would make a big difference for VIPM users is the ability to refresh the menus (e.g., the FileTools, and Help menus) programmatically after installing packages that add menu-launch VIs.  Maybe we could do this if LabVIEW added a new VI server method called Application:Refresh Menus.

Note: this would be similar to how we can refresh the palette menus programmatically by invoking theApplication:Refresh Palettes method (shown below).


refresh-palettes

 

I bring this up, because one feature that I’d love to see added to VIPM (some day) is an easier way to build menu-launch tools into VI Packages, and I’m sure more people would be asking us why their add-on doesn’t show up in LabVIEW after it’s installed.

Hopefully, we can help NI get this feature onto the LabVIEW roadmap by convincing them that it’s worthwhile.

Vision Assistant creates code for raising an error if the coordinate system is invalid. The code would look much nicer when the VI "IMAQ TransformROI" would check for validity of a coordinate system. Or when at least the error would be checked in a SubVI.

 

The generated code currently looks like this:                                     With the SubVI it would look like this:                                               And with error handling in IMAQ TransformROI like this:

Original_VI_BD.png SubVI_VI_BD.png inSubVI_VI_BD.png

 

 

The SubVI would contain code similar to this one:

Check Coordinate System_SubVI_BD.png

 

I would prefer better and much more error messages in the DLL import assistant.

- I had a unknown data type of I64 as "long long". But LabView only knows "__int64".

 

The only message was "could not import function xxx"

I prefer the line of header file, there the import stopps. Two days of searching, and only small hints from the NI support...

 

Peter