LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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 Kudos
Message 1 of 9
(3,225 Views)

Hey,

 

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

 

Christian

0 Kudos
Message 2 of 9
(3,212 Views)

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 Kudos
Message 3 of 9
(3,209 Views)

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
Message 4 of 9
(3,204 Views)

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 Kudos
Message 5 of 9
(3,191 Views)

Hey,

 

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

 

 

Christian

Message 6 of 9
(3,175 Views)

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 Kudos
Message 7 of 9
(3,170 Views)
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?
Message 8 of 9
(3,160 Views)

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 Kudos
Message 9 of 9
(3,131 Views)