LabVIEW Idea Exchange

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

Although it appears that the 2020 version of the Block Diagram Cleanup Tool (BDCT) does do a better job than its predecessors, I would still say that the BDCT’s results are still less than optimal. Most LabVIEW Idea Exchange posts concerning the BDCT talk about label positioning and alignment.  Here I would like to focus on the issue of horizontal expansion of the block diagram and a holistic view of what LabVIEW features contribute to that effect.

 

Like most programmers, when developing a VI block diagram, I try to keep the diagram no more than one screen wide.  I have learned a few tricks over the years that help manage horizontal expansion, such as resizing an object’s label so that the words appear on multiple lines before running the BDCT. This allows for some compression horizontally and allows for some growth vertically to compensate. Horizontal expansion of the block diagram is certainly expected to some extent because data flow happens left to right, of course; but it would seem logical to incorporate that knowledge into the BDCT algorithm to compensate and find ways to adjust the spacing so that the rearrangement creates more a bit more vertical expansion and less horizontal expansion—while still satisfying usual criteria such as no backwards-running wires.

 

Because data flow is horizontal, to help the BDCT work better, NI may want to think about what visual features—other than left-to-right data flow—contribute to a unnecessarily wide block diagram. I seldom have an issue with a block diagram becoming too tall.  Admittedly, poor programming technique can result in too-wide block diagrams, but let’s look at a few other things. What elements of LabVIEW’s block diagram unnecessarily consume width? Here’s a few that I could think of:

 

  1. Long names in bundle/unbundle cluster objects, property/invoke nodes, Enum/ring constants, local variables, formula nodes, etc. – Most LabVIEW-supported languages are left-to-right horizontal. Long names, especially when using nested clusters, take up horizontal space. I like being able to use long names; it helps the code to be more self-documenting. If those type of objects supported word-wrap, that would help conserve width.
  2. Expression nodes and multi-digit constants – no word-wrap available here either.
  3. Named terminals of timing and event structures – They are what they are, and you cannot remove all of the ones you don’t use, and so they take up space horizontally.
  4. Some native functions – There are some LabVIEW native function icons that are wider than they are tall. Some examples: In-Range/Coerce and Initialize Array.
  5. Shift registers – It has a subtle effect, but shift registers are wider than they are tall. Do they have to be that way?

To fully tackle this issue, I believe you have to look at things holistically and not just as potential improvements that could be made in the BDCT.  Recognize that data flow is left-to-right horizontal and you will have long text names; you can’t really do anything about that. However, there are other things that could be done in LabVIEW feature-wise to help compensate for width-wise block diagram growth.

The current legend properties are too low level - requires a loop to iterate on active plot and set/get legend text.

There should be high level (express ?) VI's to do the most common task of labeling a plot legend.

Yes this can all be done with lower level primitives today but why waste everyone's time with coding something that is always needed.

Ideally an express VI that takes a reference to a plot and an array of numbers of strings and allows the user to generate an appropriate legend for the plot based on the array input. The express VI can be saved and modified by the user for special, uncommon applications but most users can just use express VI to quickly create legend for plots.

Since LabVIEW 2021 is announced that will adopt the advantage features of NXG, I expect some thing like:

- In NXG we could dock constants to functions & nodes. hope can also be in LabVIEW 

- In NXG we could also reduce space of block diagram by (Ctrl + mouse click & move up/left) while Down/right is to extend the space. In LabVIEW still couldn't reduce the space. all mouse direction are extending the space.

- provide unplaced terminal, controls and/or indicator pallet, is very use full.

- zoom in/out, I've no Idea why NXG can while LabVIEW can't.

Current LV version should not be listed here! Many a time, this has confused me & even made me think that I'm already one version ahead of time.

 

Save for Previous Version - Has Current Version.jpg

Hello,

 

The deletion of a Conditional Disable Symbol has no effect on the Conditional Disable Structures which use it.

 

This is very dangerous because the Conditional Disable Structure ignore the deleted conditional disable symbols and the default case is used.

 

It should be nice, in case of Conditional Disable Symbols deletion, to make "unexecutable", all Conditional Disable Structures which use it.

 

Thanks for reading.

 

Manu.

 

When integrating libraries written in C# a common scenario that occurs is the necessity to cast a method to a generic delegate defined in the class in order to, for instance, subscribe callbacks to events belonging to sub-classes inherited by the object instantiated by the Constructor Node.

 

So far LabVIEW efficiently allows to subscribe to events, registering a VI as callback in case the event involved is fired, but does not allow to cast a VI to a generic delegate and that's very limiting.

 

The only workaround existing is to wrap the C# library, adding an additional C# layer that instantiates the delegates on behalf of LabVIEW and then exposes plain methods, properties and events that are straightly callable by LabVIEW itself.

 

The idea is to allow  LabVIEW to instantiate generic delegates based on the definition of the delegate provided by the C# library and return the delegate object so that it can be provided as input to library's methods requesting it.

 

This feature would make the LabVIEW integration of C# dlls more solid and completely manageable within LabVIEW code without further wrappers needed.

Imagine that I have a UI with dozens of graphs all showing acquired time history data.  Time could be on the X axis, but it could also be on the Y axis depending on the convention of the UI.  The user wants to see what happened between 1 minute ago and 2 minutes ago.  The user needs to look at data on various graphs to make a determination.  The user wants to go to one plot and make a zoom operation on the time scale and have all other plots show the same time scale interval.

 

Why not have a properties tab on plots that allows the developer to define a named linked scale and assign a scale on the current graph to link to the global scale.  So the developer can drop XY graphs and set the time scale to link to create a standard time scale common between plots.  When the user changes the time scale on one linked plot, it automatically propagates to all other linked plots.  The common scales would be global across any VIs in memory.

 

This would be useful for linking time scales, but I also see it as potentially useful for linking other scales, say the Y scale is temp and the user wants all temp plots to match scale.  This would be harder though as some negotiation would be needed if autoscale is turned on where where all plots would have to report their min/max to a process that would then pass out updated scale ranges as some reasonable interval (1 hz, 10 hz, etc).

 

All of the above can be managed with resize events and programmatic handling of those events, but I waste many dev hours on that task.  I'd love for this to be an out of box feature.

Currently, the "Tab" key is not individually mapped to an action for Block Diagram interactions; my suggestion is to use it to swap between "control", "indicator" and "constant", in the same way we already do with the options of the right-click menu "Change to Control/Indicator/Constant".

As an example, having selected a control on the BD, by just pressing "Tab" we would transform it into an indicator, a second press to a constant, and a third one would bring it back into being a control.

 

I understand this is a simple thing, but personally, I feel this ends up being one of the most repeated actions we end up taking as developers and I believe it would be intuitive to map it to a familiar key to many of us - tab.

 

Thanks all,

Cris

Just recently ran into an issue with XML namespaces where the LabVIEW implementation just didn't cut it. The AE had R&D confirm this too. The work around, after trolling through the vast sea of .NET XML features & forums, was there. Something this simple shouldn't burn up this much time.

The world around us uses JSON & XML extensively yet the examples are minuscule. It doesn't matter if new examples are .NET, Python or something else but we need to get to solutions quicker.

 

How about Indexing cluster element by name or order number?

 

 

AdarshaPakala_0-1625234655052.png

 

This helps dynamic indexing or programmatically indexing the cluster elements.

 

 

Thank You

Adarsh

LabVIEW from 2006

CLA from 2014

(In LV2017) "Browse Relationshiips\Unopened SubVIs" shows a list of icons with truncated VI names - about 12 characters per VI. When looking through a list of similar icons, one has to hover over each icon to see the full VI name.  This is impractical when hunting through tens or hundreds of SubVIs.  If unopened SubVIs could appear as an alphabetically-sorted list of VI names, it would be very helpful.

 

 

 

On larger diagrams (e.g. state machines) it's sometimes annoying to search for a special control or constant that defines the data type of the wire (especially if it is hidden or out of the visible FP area) or just to see the exact type of the wire.

To make this easier I have several suggestions:

1) add the data type to visible items: Right-Click to a wire -> visible items -> datatype   (should show either the basic data type like "U32" or the name of the type def control or class.


2) add a tool-tip function to wires. After a few seconds of mouse-on-wire the type / type-def name should appear

(ToolTip.jpg)

ToolTip.jpg

 

3) add an option to open the type def control file by right click to a w

ire (see RightClick.jpg); alternatively to #2 the menu could also show the data type

 

RightClick.jpg

 

Ever tried to parallelize a loop?

You just have to place your mouse over what feels an approximately 1 pixel wide area on the left side of your loop and press the right mouse-button without moving the mouse. If there was no input or case terminal around a context menu opens that gives you access to the function you need.

Point anywhere else and the contect menu doesn't contain what you need.

 

The context menu entry could also show if the mouse hovers over any other parts of the loop as well to make the area easier to point at.

Currently, the only way to add a webservice to a project, is by right clicking a Target and selecting New->Web Service.

There's no way to add existing Web Service definitions to a project, other than manually performing the copy operation at the XML file level.

This prevents proper re-use of IP!

 

Webservice in project.png

 

I would propose extending the capabilities of a Library to also support Web Service definitions as Child objects.

That way, the library can act as a container for the Web Service definition, and can easily be reused in other projects:

 

Webservice in library.png

I tried using an XML editor to manually put a Web Service definition underneath a Library, LabVIEW didn't like that!

I wanted to suggest if it would be possible to add an option to resize the "Browse for Variable" screen which would help with the development of the new project. Especially when you have a generic subVI where you just change the variable but keep the logic built.

Download All

When you want to look for a specific VI in your project using Ctrl+F you have an handy option to search vi by name. But this is quiet difficult to find the VI you are looking for in this windows : All VIs are listed (without structure) and there is no Filter. Something similar to Event selection window would be much better (That would have a filter and where VI's would be grouped by libraries and class)

 

This "Find all instance" could also be added directly in the project explorer, in the Right click -> "Find" menu

 

 

Download All

LabVIEW functions "Set Waveform Attribute" and "Get Waveform Attribute" could write/read any attribute name/value to waveform. But, according to help files (https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/functions/set-waveform-attribute.html), there are default attributes such as device number, channel name, etc., which could be set by NI-DAQ, and Express VIs. But sometimes there is need to set them manually (for example, while reading data from FPGA and building waveform from it).
It would be handy to include to Waveform pallete simple API with polymorphic VI to set and get those default attributes. Then one should not remember what exact name it has, but just take the function, select which attribute he needs, and use it.

 

Sincerely, kosist90.

In the world of tab controls, a tab caption refers to the actual text in the tabs that you click on to select the different pages, see attachment "Tab Caption". Currently, there is no property node that allows you to change the font characteristics of the tab captions. The font characteristics can be customized non-programmatically by right-clicking on the tab control and selecting Advanced/Customize. However, within the customize control all the tab caption properties are linked, so if I make the font color red for the page 1 tab caption, it will automatically change the page 2 tab caption text as well. The same thing applies to the other font characteristics.

 

This functionality would be useful for those users who want more control over the aesthetics of their front panel. For example, if a user wanted each tab to represent a test that he was running he could change the individual text and color to represent whether or not the test passed, green "passed," or failed, red "failed."

 

 

Refer to https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/vi-lib/picture/picture-llb/draw-line-vi.html

 

Under the Pen -> Style, there is a "Dot" option.

 

But the output is not really a dot but a short dash. Can labVIEW make the output into a real single pixel dot?

 

Same applies to draw circle VI.

 

The built in web services are a handy way to expose a simple RESTful API to a LabVIEW executable. And it's nice that it supports hosting static content like HTML pages and javascript. But it would be extra nice if we could host directories with dynamic content, such as a folder of log files that we want to expose for troubleshooting purposes.

 

For example, if I have services that generate debug logs, I could do something like start up a python simple http server to host the log directory and make the files accessible remotely. As log entries are appended, or new files are created, they are automatically made available via browsers (or programmatic GET operations). It would be really cool if the native labview web services could do this, to avoid having to set up a separate process (and manage another port number). If I've already set up a web service for remotely interacting with this process, it feels natural that I would be able to extend it to host stuff like this.