LabVIEW Idea Exchange

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

With LabVIEW classes, I appreciate that:

- I can save and load class data to/from disk.

- Backwards compatibility is automatically taken care of with no coding required (in most cases).

 

However....this functionality breaks as soon as you rename a class (which includes moving it into a library).

 

It'd be great if I could rename a class (or add it to a library) and then still load data that was saved with a previous version of that class.  I've been burned by this a few times where legacy data files are unrecoverable after code refactoring....  and it's a tradeoff I'd rather not have to make in the future!

 

(Apologies if this suggestion has already been submitted...but...didn't find it in my search)

We are already familiar with the Ctrl+Scroll to explore the Structures in the Block Diagram.

 

It is a handy feature to explore the Numerous Pages of a structure.

 

And on the Front Panel, we have a similar Primitive which has the ability to have as much pages as required - The Tab Control.

 

In different scenarios, we may end up with numerous pages on our Tab Control and even we may not have the Tabs/Page Labels Display visible in the GUI.

 

In such scenarios, while editing the GUI, we may need to switch between different pages. To switch between pages currently we have only one option with the Right Click->Go To Page->select page process.

 

This is making the whole GUI editing process slower.

 

We also have some workarounds to avoid this Right Click->Go To Page->select page process delay by temporarily making the Page Labels Display visible during the edit time to select which page to be shown.

 

But lets consider the efficiency if we have this Ctrl+Scroll feature for Tab Controls to explore the pages!

 

And it may work only in the Edit mode.

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.

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.

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.

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

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

 

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

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."

 

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.

Sometimes / often it happens that I add an existing VI to an exiting class or lib.

In this case the icon of the added VI stays at it is and does not change to the libraries icon. I could use the lvlib-option-function "apply icon to VIs" but this changes all my VIs which is not appreciated!

 

What I suggest to add is a right-click option to the VIs icon "set library icon" (see attached picture).

 

Hi, I'm a EE currently working on a project with a group of others. Some in the group have significant Labview expertise and are developing .vi's to control NI-device-interfaced hardware that others & I have developed.  Those in our group that "speak Labview" are fairly comfortable reviewing and debugging each others' designs by reviewing the .vi files.  Unfortunately others of us such as myself have minimal Labview expertise and will remain that way for the foreseeable future.  To accurately/readily review .vi code, we would like more traditional formats such as Timing Diagrams.  In my experience, such formats not only can serve a broader scope of reviewers (thereby being more appealing in the marketplace as well?), but in many cases they hold potential for being more illuminating for reviewing, debugging, communicating, and so forth.

 

One of our software developers offered to develop such a tool, but as with most projects our staffing & time resources are scarce, and like many projects, software is currently on critical path.

 

I suspected that one or more tools to generate Timing Diagrams from a .vi already existed from NI and would have been in routine use by some developers.  Or if not from NI, then 3rd-party, or somewhat redundantly developed by thousands of project labs around the world.  NI Technical Support Engineering has suggested that I submit this entry here, so I am, first-time NI submitter.  The suggestion isn't tied to our project's particulars, but if the above suggestion isn't sufficient, possibly the below info about our application will help.  Thanks!

 

about our own application

 

Our medical-therapeutic research device will use a myRio-1900, interfacing with a user via wireless to a laptop.  The laptop will use code being developed with Labview.  Rio code is being developed with Labview-RT for the processor, and with Labview-FPGA for Rio's FPGA portion.  Interfacing to Rio's I/O, much of our custom circuitry is SPI-based, but with particulars that preclude using Rio's native SPI, so we've developed lots of SPI in the FPGA.  Among the external circuitry there's a total of about 100 SPI-interfaced a/d's, d/a's, and GPIO-interfacing chips.  16 battery-packs, each recharged by the instrument under software control, provide >500W of power to various regions of circuitry that spans 32 voltage-isolation barriers.

 

Here's one example of how the proposed tool would have helped us in the recent past.  (This would have been easier without COVID19 so that we could all be co-located and with the prototype, but ....).  During some debug, we eventually found that some bits were being generated or sampled on SPI clock (SCLK) edges that weren't compatible with some of the peripheral chips.  This would have been readily apparent if we had had timing diagrams showing the .vi outputs nCS, SCLK, and MOSI.  Those by themselves would have been highly helpful.  In addition, also helpful would have been to see some nodes that are internal to the .vi if possible, such that we could know when the incoming MISO line was sampled relative to SCLK.  We didn't need to see propagation delays etc., we just needed to see the logic manifestations on a diagram or equivalently easy for a .vi-illiterate human to digest.

 

Hope that's helpful.

 

       -- Bruce P.  8/10/20

 

This is just a small QOL thing but also not that hard to do I feel like. When right clicking a wire whose data type is a type def enum or cluster, add the option to Open Type Def. from that menu. The current way of doing that would be to right click the wire and Create -> Constant, right click the constant and Open Type Def., then delete the constant.

When working on VIs that require large arrays or images for input, I often need to run a calling VI rather than the VI I'm currently working on, which involves a lot of tabbing between windows and clutter from having more open windows. I realize it is possible to set default values for controls, but I would rather avoid that as I often use optional connections to my SubVIs and therefore don't want to change default values.
In my opinion it would be useful to have the option to configure the run button to run a different VI than the currently open one, when working on VIs specifically developed to run as subVIs in the context of a higher-level caller.

When using VI scripting to create UI objects, please add the new "NXG Style" objects as an option

Add a right click option to navigate to the method in the project window when you right click on a send message VI. Bonus if it gave you an option to go to the base class method or any overriding methods. 

 

NavToMethod.jpg

I often run into the issue that I have one event case that I need to execute for multiple controls. Most of the times I simply read out the terminals and most of times I get the "NewVal" from the terminal. Some times however that's not the case. I'm currently having the issue that I use a property node of a control to trigger the event and every other time the terminal gives out the "OldVal".

 

I believe the proper way to solve this issue would be to go by the reference. I find this blows up the code more than it should do. Looking around in the community I've found two other ideas suggesting different solutions for this issue:

 

The first has multiple boolean controls triggering the same event. SectorEffector's solution was asking for a reference case structure, which might be a great idea, especially when the event is triggered by different data types. When I have multiple boolean triggering one event I almost always build an array from the terminals and convert the array to an integer, so that a case structure or other code can deal with the value. But again I'd have to deal with fiddling the new value from the triggering control and the other control values together.

 

The second mentions actually two ideas. The actual idea of rcpacini is to have an enum indicating which control triggered the event. This is a similar approach to what SectorEffector suggested. They're both aiming at using a case structure with a different cases for each event source. The alternative idea of rcpacini was to have event data elements for each control. The is more similar to my idea, but I would like to have the values of all registered event sources clustered together.

 

Here a side by side of the current solution and what I'd suggest:

New value by referenceNew value by referenceNew value clusterNew value cluster

 

The order of the events would determine the order of the values in the cluster, so a way to arrange the events like a move up and move down button would be helpful:

Event source order up/down buttonsEvent source order up/down buttons

Often times I need to change a property of something in labview that seems to only be available through a property node. And often I don't want to do it during run time just once at development but I find it really hard to get references to some objects and I want them in another VI that I can run real quick to set the property and then be done. If you have the option enables that shows labview scripting property node options and invoke nodes, can under create there be a  Create reference in a new vi. And if you click it you get a new VI with just a ref that you can then do whatever you need with it. And please make this work for anything that has a property or method related to it. I have some tools that I wrote that can kind of do this but I am sure it is not a good way of doing it (but it is the best I have got).