LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strict typedefs changes value throughout project

Solved!
Go to solution

The condition that triggers this window is that the selected enum label doesn’t exist anymore as far as a string compare between the existing items and the selected item would determine. 
All the instances where such an item is selected retain the old selection but are grayed out and broken. Even if you dismiss the dialog, which I sometimes do in my zealous attempts to get at a specific different window, this condition remains and you can go to the broken VIs from the error window to find them.

I would think that you need to have the relevant VIs loaded at least inside a project at the time of the enum edit to make this work alright. In my experience the VI does not have to be open as long as it is present in the project in which the enum is edited too. It’s important to always work within a project to let LabVIEW have an overview on what you are working!

And the next LabVIEW release will be even more reliable in finding “This VIs callers” when selected in the popup menu inside a project.

Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 14
(429 Views)

When changing 'enums' the compare window appears (sometimes).

 

Adding controls to a cluster, even another enum may leave the value intact or just resets it to the default setting.

I have the same experience when changing the .ctl of classes. Sometimes when I add  / remove elements the references of existing controls change (when 'Unbundle_by_name' is used). This is not a problem as long as the randomly assigned value has not the same datatype and I can follow the broken connection.

 

My usual course of action is to search for the element and manually check the values of the constant. This often proved tedious since some parts of the code was written weeks ago and I have to familiarizes myself with already finished parts of the project

 

 

0 Kudos
Message 12 of 14
(419 Views)

@s.h._tech wrote:

When changing 'enums' the compare window appears (sometimes).

 

Adding controls to a cluster, even another enum may leave the value intact or just resets it to the default setting.

I have the same experience when changing the .ctl of classes. Sometimes when I add  / remove elements the references of existing controls change (when 'Unbundle_by_name' is used). This is not a problem as long as the randomly assigned value has not the same datatype and I can follow the broken connection.

 

My usual course of action is to search for the element and manually check the values of the constant. This often proved tedious since some parts of the code was written weeks ago and I have to familiarizes myself with already finished parts of the project

 

 


I've never had this window (knowingly) fail me by not appearing when something changed.  I know that enum (and indeed any) values inside a cluster can revert to their default values without notice, when changing something inside the cluster, if you use a typedef'd constant directly on your block diagram.  Best practices dictate that you always bundle changing values into your cluster to avoid this.  In other words, don't drop a typedef'd cluster onto your block diagram and change the values inside, or otherwise depend on the values inside a typedef'd cluster constant.  Always explicitly determine the values to be used.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 13 of 14
(390 Views)

I've never had the problem either. However, a few things can make it hard for LabVIEW to figure out what your doing.

 

1. Open the PROJECT First- always open the PROJECT - stop opening VI's. Open the VI's in the project - After you open the project.

    - The LV Project space preserves the VI's in that project within that project space - meaning your intending to limit the scope of change - especially Type Def's to that project.

 

2. Even with the Project open - Open your Main Vi - then drill down to the sub-VI your updating - when and if you make a change at the sub-vi level - as the main vi and hierarchy is already in memory - and the update will propagate easier. [If you simply think about this it makes sense to do this - otherwise when you open the main after a change to a called asset that's changed, there is much more heavy lifting for LabVIEW to determine how to reconnect the changed assets.]

 

3. LabVIEW version 2017 and above has a dialog interface for manually updating Type Def's, it works well. Provide all the calling VI affected by the Type Def change are in memory. That dialog is triggered automatically, when you commit [Save] the change to the Type Def. - then follow the broken arrows to remedy the changes using the dialog.

 

Some of the LabVIEW issues are actually use-case scenarios - I've had a lot of interns hose LabVIEW vi hierarchy in ways I've never seen. Once I show them to open the project first, then make and commit changes - a number of odd issues go away.

 

Good Luck Type Def's are a very powerful feature of LabVIEW, they work well and as expected imo.

 

Jack

Message 14 of 14
(377 Views)