Updating a value within an array of cluster is too complicated compared to other programming languages.
In my application I hold an (global) array of jobs to do, each consisting of its name and an array of (different) parts belonging to this job. One element of the part's description is the number of parts already done. If I want to update this value, the code looks:
Note the calling function has to update the global variable after updating or JobFilesIn and JobFilesOut can be replaced by reading/writing the global which does not make the code more visible.
Within C code the update would look
which will not raise the need of making it a function (VI) at all.
A solution might be similar to Replace Array Subset if the compiler is parsing the data type on the input and accepting indices and cluster element names as shown below
Of course this should work with any data type selected from the initial variable by the selectors similar to C code
It also should accept a cluster as top level element as well, e.g. to replace an element within an cluster of clusters similar to C code
or an element within an array which is part of a cluster.
All the C code examples above expand to LabVIEW code which is hard to read.
Although it might be tricky to implement I would like to suggest the option to add comments to a block diagram while the code is running.
This way you can make notes to the block diagram for debugging and/or "reverse engineering" (examining LabVIEW spaghetti for example).
Problem: in some of the code we need to insert the error case. it will take time to create error case and wiring to it.
solution: if we can able to insert the Error case in the Error wire , it is easy to Error codes insdide the case.
Tired of resizing an event structure and having to relocate the timeout constant?... Simply double-click on the hourglass and type the timeout value!
Of course, the option of wiring to the event structure timeout input should still exist. Just like the timed loop, where you can double click and set the period, etc.
Graphs allow displaying data in linear or log scale.
This doesn't go without glitches, so my first suggestion would be fix all the annoying bugs which exist.
But a common way to get motivated to fix a bug being to implement a few feature, here is a unique opportunity:
Implement symmetric log scales (aka symlog scale) on all Graphs
What is a symlog scale, you will ask?
It is a log scale accepting negative arguments.
If x > 0, then Log(x) is computed (and labeled "x", hence the log scale apparence).
if x < 0, -Log(-x) is computer and labeled "x"
To get a visual representation of what this all mean, Google "symlog scale" and you will most likely end up on this page from which I am linking this figure:
Of course this should work on both axes (or all 3 axes for a 3D Graph).
The benefit is that when a curve has negative values, using a log scale to represent the plot results in a clipped plot. All negative values are gone, leaving gaps in the plot. The only way to visualize them is to revert to a linear scale, which now clumps all small positive values to pretty much the same location on the axis.
I faced to delete multiple elements form the array which is having 20 steps.
if able to select multiple elements by holding the shift key we can delete selected items 1 time and can insert 1 time.
I have a Red-Green colorblind coworker. When he looks at the Silver Error Cluster, he actually cannot tell if there is an error. Why? Because NI decided to make green the false state and red the true state of the boolean. So he updates his error clusters to use black for the false state.
Simply put, that boolean display needs either icons (like in the Modern Error Cluster) or different colors to help these people.
NI send us the NI Developer Suite each year on DVDs all packed in a nice little NI branded dvd carry case. We are on the SSP suscription and we receive 3/years, which means I have a whole stack of them.
I suggest that NI start shipping USB keys instead. USB has several advantages:
I recently starting putting String Indicators in some of my programs that identified the Routine, along with its Version Number. I have also created Dialog Boxes with one-line Messages, usually in large size, often Bold, sometimes colored and with a colored background. I wanted to have the String indicator displaying these one-line messages "fit the text" (if the indicator was too short, the message would be truncated, and if too long, it "looked unprofessional" and wasted space). I found code on the Forum that was awkward and didn't scale with fonts -- I found a work-around, got in touch with NI to inquire about filing a CAR to fix the specific flaw in their Get Text Rect function that I discovered, but was told they were not interested ("You just need to add a constant").
After more investigation, I found an even better solution to this problem, which I have posted to the LabVIEW Community here. While this seems to work, I would like to propose that NI provide a simple Method or Property that could be used to scale the horizontal size of the contents of both the String and Path controls to just fit the content to be displayed in these controls. This Method or Property should work regardless of the other properties, such as Font Size or Font Attribute (Bold, Italic, etc.). It should also work regardless of the "family" of the control (Silver, Modern, Classic, or System). I do note that System Strings might be a problem, but I could get my code to work with the System 2.0 String indicators available on the LabVIEW Tools Network.
The figures show a Front Panel with "too small" indicators truncating the display of their (variable, and run-time-dependent) content, plus the same Front Panel after I run my "Size-to-Text" code on the indicators. I'm suggesting that NI provide a Method/Property to do the "dirty work" for me.
Notice truncation of Text and Paths
After programmatic adjustment of Indicators to "fit" their content.
Picture says it all.
I am not allergic to Kudos, in fact I love Kudos.
Make your LabVIEW experience more CONVENIENT.
single click we can create Lable in the Block Diagram.
if we want to create constants(sting , enum,numaric etc), it will take three steps.
by converting the Free Labels to Constants, I feel it is easy way to create Block diagram constants.
If I have a path control on my front panel for the user to interact with, I will always show the browse button. This button makes selecting a path easy from a user perspective, and from a developer I know that the path they selected has some level of validity. So for instance I know that the path they selected must exist and be a valid path otherwise Windows won't let them select it, and the value change won't be triggered for the control.
But the user can manually type in text into the path control, and when focus is taken off the value change event will take place. The problem with this is the path they entered might not be valid, or may contain characters my platform doesn't support.
I doubt a user will manually type in text in the control often, they will use it as an indicator showing the path they selected using the browse button, but on the off chance that they type somthing and it isn't valid, my code might crap out throwing errors.
I can add code to check for a valid path, and I can add code to check for illegal characters in the path, but I'd have to do this for every path control on every UI the user sees. I could also write an XControl for this with a decent amount of work and hopefully meet my needs, but it would be nice if this were a native feature.
So what I'm suggesting is that the path control have an option, possibly in the browse options dialog, which makes the interaction with the control, only available by using the Browse button. This would ensure that any value change event will be from the user picking a valid path with the browse button.
I have a large library of general purpose functions and I do a lot of OOP in LabVIEW, and as a result my preferred workflow involves dragging a lot of functions from the project explorer window onto the block diagram. This workflow is slowed down, however by the fact that the project explorer window is regularly hidden by other windows when I click on them.
What I would like to see is something like most development IDEs have, e.g. Visual Studio, where I can have the project explorer always visible in a fixed position on the screen. I suggest this would be an option, so would not affect those who like things the way they currently are.
I use Splitter extensively to create resizable GUIs. However, if I create my resizable GUI and then my customer asks me to add parameters in a new pane on the left, I can't add to an existing GUI a splitter in the top of the hierarchy, i.e. a new vertical splitter that all the existing splitters will be on the right of the splitter and a new empty pane on the left. Any splitter I add will be added to the bottom of the existing hierarchy, and there is no way to change this. So to do this I basically need to rebuild the GUI again from scratch.
Another example, if this is my GUI:
I can't add a status bar now, as any horizontal splitter I add will be inside an existing pane, and this can't be modified. However, if this idea were implemented, I could View splitter hierarchy and create a new horizontal splitter at the top of the hierarchy so that I would have my status bar without rewriting the whole thing.
We have a software product where we have started working with branches and sometimes have a few different versions of the repository checked out for code implementation / testing / exploration.
It happens that I have two (or even more) versions of projects with the same name open at a time from different paths. Currently I switch to files view and back to check which version I am currently looking at and I just thought it would nbe nice to see the path of the project file int he title bar of the project window.
I know I can right.click the project, I know there are other ways to get this information but can't we have a simple indication as to the path at least SOMEWHERE in the project window?
Classes suffer from the following:
Classes are identified by their name.
Renaming a class results in a loss of identity history. The version history is reset
The name consists of the file name and all the libraries the class is nested in.
Moving a class into or out of a library counts as a rename of the class.
So what is the issue with this? Any method you use to save the class data to a file (datalog, xml, flattened string...) will contain the class name (including library position) and the version. If you move/rename the class this data will change and your externally saved class data will be unreadable.
Also using classes in packed libraries will result in the classes being renamed (lvlib-->lvlibp), but the classes will retain their version history. Still, the rename makes saved data unreadable.
I propose that we introduce a static class ID that persists through all the above operations. I'm thinking something like a Class GUID. This GUID would be created together with the class and would be read only. It would be good if Get LV Class Name.vi would return the Class GUID and if you introduced a Get LV Class Default Value By Class GUID.vi (Class must be in memory). All the operations that saves/flattens etc. and currently uses version and name should then use version, name and GUID. On load/unflatten the name would not be used at all, only the GUID and the version.
If this was implemented:
The version would never be required to be reset. As long as the GUID persists the version can remain.
Saved class data would not become corrupt upon trivial operations in the project. As it currently is you cannot move a class out of a library and restore it to the same position/name without corrupting your saved class data (unless the class version is 220.127.116.11 already).
You would get fewer complaints regarding the OOP implementation.
So there are some problems with doing this. I'll list possible solutions along with the problems:
What should be done on a rename or library relocation:
Version should be incremented retaining the old name. GUID stays the same.
What should be done on a “Save as” - “Copy”:
New GUID created for the copy. Save as will prompt you to retain version history or reset the version to 18.104.22.168 (if you can find find a way to do this), or just reset the version.
What should be done when a class is copied in internet explorer and loaded?
This is currently very very bad for labview, and thus never done.
But now we can detect that we have multiple GUIDs and a pop up should be displayed with a list of all duplicates. There should be three choices for each group of duplicates:
Retain GUID, only one can select this
Get new GUID and prompt for class rename – version history handles as in 2.1
Don't load the class and discard the operation adding it to the project.
What should be done when both a class from a packed library and the library that was packed are trying to be loaded at the same time:
They have the same GUID, prompt the user to choose which to load, only one can be loaded at any time.
What should be done with the version numbers when packing a class in a packed library:
Original has version incremented twice, all version have the same data. Example:
Original class version = 22.214.171.124
Packed class = 126.96.36.199
After Packing original is = 188.8.131.52.
The major issue with this is probably that it'll increase the overhead on all classes, right? So it doesn't have to be a GUID, but some form of uniqueness should be attributed to the class because the system is extremely inflexible in the current implementation.
Please don't propose that I implement methods on all classes that saves the private data piece by piece as a work around. If that was the intention that NI had with classes then wiring a class to a flatten/save etc. node should result in a broken wire.
I might have been overly thorough with my explanation but this is a big issue for me due to CAR543330 where the work around is reducing the size of my libraries, which is really really hard when they contain classes that are also saved to a large number of external files.
Best regards Henrik