LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Make current value default

Solved!
Go to solution

Hi all, 

(Tried this in Labview 2011 ,definitely, and 2016 I think)

when using local edit (right click, data operations, make current value Default) the change does not save with the file. It does when I use the Edit path. The control being operated on is in an array in a global VI

When the save is made correctly, the behaviour is odd  again when using the right click restore default option.

 What am I doing wrong?

 

 

0 Kudos
Message 1 of 6
(4,067 Views)

Why don't you attach your global.vi so we can see how it behaves?

 

I don't know what you mean by "Edit Path".  Is this a path control in the global VI?  What type of control is it you are working with?

0 Kudos
Message 2 of 6
(4,055 Views)
Solution
Accepted by topic author KGM

@KGM wrote:

The control being operated on is in an array in a global VI


With arrays you need to be careful because you can define the default value of the array or you can define the default value for the array element, depending on where you right-click.

 

(To define the array default value, right-click on the array container (frame or index terminal area))

Message 3 of 6
(4,049 Views)

Hi, thanks.

Played with the two approaches but didn't really understand. So I'll just stay with the whole array approach I think. 

When I operate on an element, Reinit... produces a different result from that I get when I operate on the whole array. And by repeating the operation in reverse, you revert back to the "other" default.

Problem is confounded for me a bit because I am trying to have this done by a third party at the end of a phone, so I don't always know exactly what keystrokes are used.

I have not had a problem myself that I know of..

0 Kudos
Message 4 of 6
(3,980 Views)

Hi, thanks for the reply.

by path I mean the literal interpretation, not the Labview one. So path = route taken through etc. So there are seemingly two methods, (again the literal meaning) Either use the Edit menu or right click and go from there. 

Sending a VI didn;t seem necessary to me because the matter is one of procedures not of coding. You can't always tell where a prob lies I know, and we all have our prefered way to track down an anomaly. I am sorry I didn't allow for that evidently.

 

Anyway, the difficulty is that an element in an array seems to have two possible "defaults" , one at the element level, and one at the array level.

0 Kudos
Message 5 of 6
(3,976 Views)

@KGM wrote:

Anyway, the difficulty is that an element in an array seems to have two possible "defaults" , one at the element level, and one at the array level.


No, an element has only one default value, but the array also has a default value. You see the default element value for array elements that are outside the valid size. All array element share all properties, including this one.

 

For example, the following array has a default value of [1,2,3,4] and the element has a default value of -999.

 

altenbach_0-1592613812067.png

 

0 Kudos
Message 6 of 6
(3,971 Views)