取消
显示结果 
搜索替代 
您的意思是: 

Make current value default

已解决!
转到解答

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 项奖励
1 条消息(共 6 条)
4,828 次查看

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 项奖励
2 条消息(共 6 条)
4,816 次查看
解答
已被主题作者 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))

3 条消息(共 6 条)
4,810 次查看

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 项奖励
4 条消息(共 6 条)
4,741 次查看

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 项奖励
5 条消息(共 6 条)
4,737 次查看

@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 项奖励
6 条消息(共 6 条)
4,732 次查看