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

Variable is not changing

Hello,

 

I have Global Variable that is meant to take a certain value (in this particular case, a field is read from a ini file). But the variable simply doesn't want to take the value until I open the FrontPanel for the variable, or until I put a probe on the wire to the variable.

I also added an indicator. If I run the Main VI (the one that contains the VI where I put some value in the variable) it's not working. If I open the front panel for the VI (the one with the global variable and indicator) and the indicator is visible everything is OK.

My conclusion is: if I'm using a tool for displaying the value that will be written in the variable, everything is OK, otherwise the variable remain empty.

Please take a look to the attachment. The variable name is: TriggerQuelle.

 

Thanks,

Paul 

 

Ps: I can't send the VI, and I didn't manage to reproduce the error in a simple VI

0 项奖励
1 条消息(共 9 条)
3,634 次查看

Hey,

 

Did you try to clear the variable and create a new one?

 

Christian

0 项奖励
2 条消息(共 9 条)
3,621 次查看

Hi Christian,

 

Thanks for replay.

Five minutes ago I've created a new variable and replace the old one.

I still have the same problem. I've try different things, like putting that part in a Sequence Structure, and I wired through that structure different siganals/wires like Error, etc in order to set a different data flow. But it is still the same.

 

Regards,

Paul

0 项奖励
3 条消息(共 9 条)
3,618 次查看

Hi Paul,

 

do you write to that global somewhere else? Most common problem in LabView is to create some race conditions...

 

Btw.

1) Why did you scale the picture down?

2) Instead of collecting errors from several "read key" calls you can wire the error through those read functions!

Message Edited by GerdW on 09-22-2008 03:07 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
4 条消息(共 9 条)
3,613 次查看

Hi Gerd,

 

I'm writing into this variable only in this place. The writing part can be found in a for loop. But the loop has N=1, so it shouldn't be a problem.

 

1. Sorry for scaling the picture, it was a mistake.

2. I'm only tring to add something in an old Vi, written by somebody else. But anyhow you're right.

 

Thanks,

Paul

0 项奖励
5 条消息(共 9 条)
3,600 次查看

Hey,

 

I would suggest to use Functional Global Variables -> http://zone.ni.com/devzone/cda/epd/p/id/3124

 

 

Christian

6 条消息(共 9 条)
3,584 次查看

Hello,

 

I will try this (Functional VG) tomorrow, because I have to search for an older LabView version (the VI's are written for v5 and i have v8.5).

Anyhow it is very strange. I created a new variable as a cluster, I put a lot of delay (Wait) VI's in order to be enough time for writing, but nothing. Please take a look to the attachment. (Both for loops have N=1).

I have several others Global Variables in the project and everything works, except this one, which is trying to ruin my day :).

 

Thanks,

Paul

0 项奖励
7 条消息(共 9 条)
3,579 次查看
This may seem like a dumb question, but are you sure the global variable write is actually wired to the output of the Bundle By Name function, and not to the middle terminal?
8 条消息(共 9 条)
3,569 次查看

Hello smercurio,

 

:)) The variable is wired in the right way. This part with the cluster is just a disparate way to make it work. Actually I don't need any cluster.

I will try to delete all the all the parts that are not relevant for solving this problem and I will attach the project to a new post.

 

Paul

0 项奖励
9 条消息(共 9 条)
3,540 次查看