LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array values are not giving default values

Solved!
Go to solution

Hi every1,

     I am working on a VI which is related to changing points in graph. Almost I completed my VI but the thing is the array values what 

iam using here(Y array) are not set to default value when i stop the vi. When i stop and run the vi again the lastly stored values of

array Y are set. One more thing is when i click the stop button it is not coming to an end.The VI stops only when the stop button goes high

and then to low. I mean for stopping two times the stop button is to be clicked. Here is my VI.  Help me to know  my mistake here in this

VI..........

Download All
0 Kudos
Message 1 of 16
(3,504 Views)

I cant see your VI, as I dont have LV as of now...

 

But what I can understand from your sentence, "I mean for stopping two times the stop button is to be clicked", I think your stop button has been assigned with Switching action. Or, maybe if you have kept that terminal outside of its event case.

 

Next, your array values WONT be set to default automatically, when you stop your VI; you need to code it using invoke node or property node.

Message Edited by parthabe on 07-30-2009 06:13 AM
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 2 of 16
(3,499 Views)

Hi parthe,

     You ae r8.The conditional terminal is outside the event. The VI is not supporting when i place that stop in event.

Give me some solution 4 this.......

0 Kudos
Message 3 of 16
(3,487 Views)

pani wrote:

 

The conditional terminal is outside the event. The VI is not supporting when i place that stop in event.


I didnt mean this terminal. This means the red color terminal in the while loop. What I meant was to keep the BD terminal of the Stop button inside its Value Change event case (in case, if you have NOT configured one).

 

Try it out & post back here if you still have trouble.

 

Probably both the VI & a snapshot, since I dont have LV installed...

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 4 of 16
(3,479 Views)
I added tat in the event. Just u check the image of my VI.. Here it is ..........
0 Kudos
Message 5 of 16
(3,473 Views)
Solution
Accepted by pani

Aah, I guessed it correctly! Smiley Happy

 

Remove the local var of the Stop button & place the terminal itself inside the inner while loop & directly wire it to the conditional terminal of the outer while loop.

 

Please see the attached pic...

Message Edited by parthabe on 07-30-2009 07:12 AM
- Partha ( CLD until Oct 2027 🙂 )
Download All
Message 6 of 16
(3,468 Views)

Gr8 Parth. U r r8. One Prob is solved. Thanks dude. Nw can u suggest a solution to make the array Y  values to be default.

When i stop and run program again the previously used Y values are set. Instead of that when i run program again the array

should be initialized to zero.

0 Kudos
Message 7 of 16
(3,460 Views)
From your pic, I understand that Waveform Graph (in your terms, Array) is your O/P. Just keep a local var of it outside of the outer whle loop & wire a empty array constant to it. This would put back the Waveform Graph to be empty on the start of every new run.
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 8 of 16
(3,446 Views)
I tried tat parthe. But no use.
0 Kudos
Message 9 of 16
(3,442 Views)

Sorry, from your first post I see the O/P array if Y.

 

So, did you try connecting an empty cluster to it as I suggested in my earlier reply?

Message Edited by parthabe on 07-30-2009 07:31 AM
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 10 of 16
(3,439 Views)