LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graphs retain values

Hallo,

 

i am having trouble in clearing my graphs in the attachment . I tried invoking property node and reinitialised to default and also tried the clear indicators option under Vi properties . Both these options clear the graphs when i run the program,but when the values are plotted they continue from the previous iteration.

 

Kindly help with a solution .

 

Thanks and best regards,

 

 

Download All
0 Kudos
Message 1 of 10
(3,660 Views)

Try initializing the shift registers in your loop. If you don't initialize the shift register, they retain their values for as long as the VI is in memory.

Marc Dubois
Message 2 of 10
(3,637 Views)

Hallo,

 

Thanks a lot for your reply.

 

I tried initialising the shift registers to 0 and there was no graph at all .

 

Thanks and best regards ,

 

 

0 Kudos
Message 3 of 10
(3,627 Views)

Hi sridps,

 

your loop only runs once as you wired a "1" to the iteration count terminal. So your shift register will hold just one value when you initialize them with empty arrays…

 

You should

- remove local variables and use more wire

- think about state machines instead of giant sequence structures

- only initialize the shift registers once at start of your measurement

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 10
(3,614 Views)

Hallo, 

 

Thanks for your reply .

 

There is an outer while loop which makes the actual iteration and i actually collect the data the required number of times. For some reason it does not collect data multiple times without a for loop and it doesnt matter whether i give the for loop number as 1 or 10 . I still get the same result .

 

I have no experience with state machines . Maybe i should try them . But i have no idea why my graphs behave like this now .

 

Thanks and best regards

0 Kudos
Message 5 of 10
(3,573 Views)
It is expected behavior for a shift register to retain data between iterations. You don't show the main VI but that is probably where you want it. Your code makes very little sense.
0 Kudos
Message 6 of 10
(3,568 Views)

Hallo,

 

Thank you for your reply.

 

Kindly find attached the whole vi in  my first post . 

 

Thanks ans best regards

0 Kudos
Message 7 of 10
(3,562 Views)

Which VI? Where?

(In case of difficulties in uploading VIs you should read this thread…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 10
(3,534 Views)

Hallo ,

 

i attached it in my first post . Maybe there is a problem . Kindly find attached the full vi in this post .

 

Thanks and best regards

0 Kudos
Message 9 of 10
(3,519 Views)

Hallo,

 

Can you find the vi in the previous post  ? Any help would be grateful .

Thanks and best regards,

0 Kudos
Message 10 of 10
(3,490 Views)