LabVIEW Idea Exchange

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

We can easily replace a FOR loop with a WHILE loop and vice versa and most features are retained in a reasonable and expected manner. (For example if there is an indicator wired to [i], it will still be connected after replacement).

 

There is one annoying exception: The conditional terminal is completely ignored.

 

For example:

 

Case 1 (FOR -> WHILE)

We have a FOR loop with a conditional terminal wired to a boolean condition. If we replace that FOR loop with a WHILE loop, we probably would expect the conditional terminal be still connected in the same way. This is not the case. We get a dangling broken wire and a new, now disconnected conditional terminal.

 

Case 2 (WHILE -> FOR):

We have a WHILE loop and replace with a FOR loop. If the conditional terminal is wired to some real code, it should automatically retain the conditional terminal in the same place. (If the conditional terminal is not wired in the while loop, the FOR loop should not show the conditional terminal).

 

As a practical example, let's look at my old inverse erf draft posted here long ago. One flaw is the fact that there is no limit on the number of iterations so it might get stuck with a misbehaving function. In the old days, we would add another comparison with [i] and OR to the termination condition (lots of extra code, new loop needs to grow in size). A cleaner solution is to replace the while loop with a FOR loop, leaving the conditional terminal in place as-is, and wire a reasonable iteration limit to N (little extra code (just one diagram constant!), loop can remain at the same size). Here Case 2 would simplify the transition.

 

SUGGESTION: If we switch loop flavors using the "right-click..replace" mechanism, the conditional terminal wiring should be retained in a reasonable way.

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

Currently, if you select a tunnel, you can only move it along the border of the structure - attempting to move the tunnel perpendicular to the structure border is just a no-op. Instead, I'd like to see this action resize the structure!

 

The first video demonstrates current behavior, how tunnels cannot affect structure boundary sizing. The second video shows a selected tunnel resizing the structure boundary as it is repositioned.

 

 

  1. These demonstrations reposition the selection using the Keyboard, but the same principle could apply repositioning a selection with the Mouse.
  2. A side perq of this feature is that structures are resizable with fine, granular control using the Keyboard!

As part of a review of a shipping product, I want to make sure that all of our LabVIEW-built executables are using the same version of LabVIEW so that we also only have to ship one version of the LabVIEW Run-Time Engine. Everyone I've talked to has given me advice on things to change at export time, build time, or even run-time to know the version of LabVIEW it was built in (e.g. the App.Version property), but what if I want to know the version of an EXE I have already built?

Here are the methods I've tried so far:
1. I created a set of VIs that does it crudely by reading the EXE file in as if it were a text file, finding mention of lvrt.dll, and then scanning back a few hundred bytes to try and find a version X.Y token in there. (Of course this could be done in any language, not just LV). This solution can be automated for my product release's review process, but it would be prone to failure if the EXE format changes or my assumptions aren't correct. I wrapped the solution in one that searches our installation directories for all EXEs and returns all LV EXEs with versions (as they are detected here) and all non-LV EXEs so I can verify that my tool is not giving false negatives on LabVIEW-based executables.

Parse EXE as text for Version

 

(See attached .zip file for my LV implementation)


2. Run the EXE on a machine with no LV RTE and read the version from the error popup that you get when it launches. Obviously this requires user interaction, and requires launching the executable.
3. Install all LV RTE versions you think the EXE most likely requires. If it launches without incident and stays in memory, you can use Process Explorer to figure out what libraries it has loaded and see which version of LV RTE was called (since the lvrt.dll will be under "<NISHARREDDIR>\LabVIEW Run-Time\<Version>"). Obviously this isn't easily automated either, and requires launching the executable.
4. I tried using Dependency Walker to see what lvrt.dll dependency was found, but it didn't show me anything useful. I'm guessing it's dynamically loaded somehow, and DepWalker can't tell me?

What I'd really like are two things:
1. An LV Invoke Method like "Get VI Version" and "Get VI Editor Version" that works on built applications -- "Get App Version" with the same types of inputs and outputs as (file path input, string version output and U32 version output). An added output to determine platform and/or bitness would be nice, too.

2. An LV RTE property that tells me the Run-Time version in the file's properties. I could potentially automate checking of this via .NET calls or something like that

GetAppVersion.png

 

Embed_LVRTE_Version_into_EXE.png

Renaming files with F2 or the context menue entry "rename" is easy - as long as the file is a LabView or NI-File. But if it is just a simple *.txt, *.pdf, ... file it is not possible. Please add this function! - thanks.

 

Add ability to install and update NI packages via the winget utility.  This would make it easier to standup new development or test systems. 

 

Winget has a very user friendly export/import systems that can be used to replicate development installs across multiple computers. 

 

tkendall_0-1662655723758.png

 

I think you should be able to build this around the current NI package manager system with some helper scripts. 

 

A tabbed wiring diagram comment field. Not a constant, just a placeholder for free text.

 

17661iA4DF90F9D4D1C4A7

 

 

When you right-click on a connector pane terminal, a context menu pops up -- but there isn't a good indication of which terminal you've clicked on:

carls___1-1593626658134.png

You could assume that selected terminal is at the top-left corner of the context menu, but (due to a bug, I'm assuming), the actually selected terminal is a few pixels down and to the right of where you clicked.

 

What if the terminal you right-clicked on got highlighted while the context menu was shown?  This would provide visual feedback of the selected terminal, giving you confidence that you clicked on the terminal you thought you clicked on (and avoid mistakes of configuring the wrong terminal).  I can't even begin to count the number of times I've set the wrong terminal to "recommended" or disconnected a different terminal than expected. Could look something like this:

carls___4-1593627315744.png

(which just piggy-backs on the appearance when you're wiring up a terminal:

carls___2-1593626739401.png)

 

Bonus points if the bug gets addressed where clicks are actually a few pixels off.

Firefox is not publishing the PNG data that contains a snippet inside the Drag and Drop info, however the info is stored inside CFSTR_FILEDESCRIPTOR (source) it would be very helpfull if LabVIEW supported this as well.

 

TOn

Currently, the "In Range and Coerce" function requires that the upper and lower limits be wired. Often I am only interested in coercing at one end of the range. It seems crazy to wire "-2147483648" to the lower limit of an I32 just to ignore that input and coerce the maximum...

 

I'd like to propose that this function allow unwired limits, and that unwired limits assume the maximum or minimum allowable values for the given datatype:

coerce.png

I am migrating and updating some of my favorite tools to LV10, and one of the first to make the move is always my Connector Pane Editor.  This is a homemade tool I have had around since LV8.2, which allows me to quickly wire the connector pane in a style reminiscent of the Icon Editor.  I use my version constantly and can not live without it at this point.  I would like NI to adopt something similar for a few reasons.  1) I am a UI pragmatist, and this could probably use a little help in this regard.  2)  It is hard to incorporate tools like this into the IDE.  Right now I use the Tools menu which is ok, but I'd like to get this into the Right-Click menu that we currently use to edit the connector pane.  3) It drives me nuts when I am on a computer that does not have this.

 

Here is a screenshot of my version and zoom on the right-hand side.

 

21055i12DB0EFCA0AC94F9

 

21059iD4CEEA35EC3F9767

 

Features I like about my current version:

1) No squinting and carpal tunnel issues trying to land on tiny terminals

2) Auto increments controls, when one control is placed, the target is automatically incremented so the next control is ready to go.  Arrow keys allow you to skip controls.

3) Front panel image shows which control is currently being wired, which one is currently attached to a terminal when the mouse is over it, and is clickable to choose which control to wire.

4) Control descriptions are editable at the same time.

5) Shift-click grabs the currently wired terminal.  If you want to move a connection, Shift-click to pick it up, move to the new location, click to drop.

6) Clicking on a currently wired terminal replaces that connection with the current target, and makes the previously wired control the new target.  Swapping terminals is a two-click process.

7) Optional autowiring, Error In/Out as well as references/paths can be autowired according to my preferred style.

 

In short, even my crude attempt is an incredible timesaver, I can wire a ConPane in a matter of seconds, without the back and forth trips between the FP and the ConPane with the wiring tool.  A little NI-ification, as well as integration should make it even better.  If it gets screwed up, at least it should be similar to the Icon Editor which can be modified by those who want to badly enough.

 

 

"A picture is worth a thousand words..."

 

That's especially true when describing complex interactions of the kind often seen in code.  Currently the block diagram decorations consists of 4 elements: a line, a straight arrow, a frame, and a label.  I can and often do create state diagrams out of those elements, but they look very hacked together (i.e. unprofessional) and are cumbersome to create.  The alternative is to use an external graphics program and paste the image into the block diagram.  I do that sometimes too, but it makes it harder to keep the diagram up to date.

 

I'd like to see elements added to the decorations palette to help us create graphical comments.  Since state machines are very commonly implemented in Labview, that seems like a good place to start.  How about adding a state decoration and a transition decoration?  The state decoration should allow more formatting flexibility than the label does.  (Like having the first line centered and the rest left justified.)  The transition decoration should be an arrow that allows routing--either smooth curves or point turns.  It should also have a label attached to it for identifying the transition trigger.

 

Here's an example of a state diagram for some proof of concept code I wrote that I pasted to the block diagram.  I'd like to be able to easily do these kinds of drawings without needing a 3rd party app.

 

Capture.PNG

The shortcut menu should launch the new type def.'s front panel when 'Make Type Def.' is selected. You will need to save it anyway, and if you find the need to edit it right away, then it is already open and ready to go.

 

make type def.jpg

(This came up an a somewhat related discussion here. Possibly it would be easier to implement and thus has a better chance.)

 

The suggestion is to provide an event terminal that outputs the current number of queued up entries in the event queue for that particular event.

 

(The main purpose is to deal with stale event accumulation. Details are in the quoted idea thread.)

 

When using a program we all expect the UI to be resizable and to remember it's size and position.

 

Graham Beauregard made and excellent blog post in the UI Interest Group about Resizable UI’s in LabVIEW.

 

That helps to address how to make your front panel resizable...BUT...

 

It's a pain storing the size and position and restoring it as soon as the application starts without the user seeing it jump and resize.

Unless there's a better method that I'm not aware of, you have to store the size and position in a config file somewhere, then read the file and apply the settings on start up.

If you don't want the user to see the front panel jump and resize you have to have the front panel start hidden, then move and resize, then display.

How much better it would be if there were a couple of checkboxes in the VI properties dialog to do that automatically for you.

 

RememberScreenSize.PNG

RememberScreenPos.PNG

 

From what I'm led to believe...".Net has an application settings system which handles this stuff automatically". Why not LabVIEW?

How about having a timeout occurrence as an input for functions which support timeouts?

 

I am illustrating a single use case with queues (and a notifier) but I would see this as being beneficial to nearly ALL functions with timeout inputs.

 

Sometimes we'd like to wait for one of a few different functions (an example of mine which springs to mind is the Dequeue primitive).  At the moment we must essentially poll each primitive with a relatively short timeout, see if one responded and then handle accordingly.  This is (for me at least) ugly to look at and introduces polling which I generally don't like.  I'm an events man.

 

Occurrence timeout.png

 

What I propose would be that instead of simply defining a timeout in milliseconds we can define both a timeout (in milliseconds AND an occurrence for the timeout).  If we wire this data to several primitives (all sharing the same occurrence) the first primitive to receive data triggers the occurrence so that the others waiting in parallel return also.

 

In the case where no data arrives, each function waits the defined amount of time but upon timeout DOES NOT fire the occurrence.  This would cover corner cases where you may want different parallel processes to have different timeouts (Yes there are cases although they may be rare).  It is possible to change the "priorities" of the incoming queues in thie way.

 

Background info: One example where I could use this is for RT communication.  Here we multiplex many different commands over TCP or UDP.  On the API side it would be beneficial to be able to work with several strictly-typed queues to inject data into this communication pipe while still maintining maximum throughput.  I don't like using variants or flattened strings to achieve this multiplexing.

 

Being forced to poll means the code must decide between efficiency (low CPU usage) OR response time (setting a very low timeout).  Although the CPU load for polling may be low, it's not something I personally like implementing and I think it's generally to be avoided.

 

There IS a LVOOP solution to this particular problem but not everyone can use LVOOP in their projects (for various reasons).  I can envisage other use cases where interrupting a timeout would be desireable (Event structure, wait on ms, VISA read and so on and so forth).

 

Shane.

It seems there are a lot of NI services that start running directly after logging in to windows.  I even tried manually turning them off using msconfig thinking the services would start when LabView was loaded or on an 'as needed' basis, but I was wrong. 

The user should have the option of starting services at windows startup or at LabView startup, or even not at all if it is not required.  Perhaps this could be added to select the services within LabView's 'Options' menu.  An explanation of each service and why it is needed would be great also.  With all of the programs that run on our computers these days, the less running in the background, the better.

Interfaces are a great improvement in LabVIEW OOP. For me steepest learning curve was in figuring out how to implement default behavior when interface class doesn't have a private data control.
For example I have created Collectable interface (inspired by iterable interface found in other languages). It has default implementation for methods like Next and Add. It has accessors methods like Read and Write Items, which descendants must override.
When I create a new class which inherits from my Collectable interface, I need to override those accessors, and manually add required controls to new class private data control, and unbundle/bundle elements, and wire the controls and indicators.

data accessorsdata accessors

My idea is that there should be a tool to do automate this code generation.

 

I think the straight forward way would be to use scripting and project providers to create something similar to Actor Framework Create message etc. tools. 
But a more fundamental change would be to implement this as part of property definition folders and property nodes. Which I think in this case should be in protected scope by default.

property nodesproperty nodes

The Collectable interface can be found from lavag.org 

Check the images for explanation:

 

Front Panel

 

Block Diagram