09-22-2008 07:05 AM
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
09-22-2008 07:46 AM
Hey,
Did you try to clear the variable and create a new one?
Christian
09-22-2008 07:52 AM
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
09-22-2008 08:05 AM - edited 09-22-2008 08:07 AM
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!
09-22-2008 08:45 AM
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
09-22-2008 09:10 AM
Hey,
I would suggest to use Functional Global Variables -> http://zone.ni.com/devzone/cda/epd/p/id/3124
Christian
09-22-2008 09:20 AM
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
09-22-2008 09:46 AM
09-22-2008 03:09 PM
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