ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure - Labview

Hello,

 

I have some data being generated in a "True" section of a case structure and I feed them out of the case to some indicators (and saving in some Excel files). But Labview gives me error that I should connect something for the other case, so I just gave some zero input.

However I need to HOLD the data outside of the case structure until the case structure is "True" again and then update the data.

 

 

My code is a little large and I guess I should not give it out, so I cannot upload it.

 

 

Thanks,

Baran.

0 Kudos
Message 1 of 13
(4,052 Views)

You need your case structure inside a loop with shift registers on the loop which pass data from one iteration to the next.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 2 of 13
(4,046 Views)

You may need a shift register.  Pass the data through the false case.  That will hold the old data.

 

Lynn

0 Kudos
Message 3 of 13
(4,045 Views)

Can you try to make a small vi demonstrating your question/problem?

=====================
LabVIEW 2012


0 Kudos
Message 4 of 13
(4,041 Views)

Thanks.

 

I actually did that. But that will keep the data for one more loop and the next one is the zeros that is coming from the other case.

 

 

0 Kudos
Message 5 of 13
(4,039 Views)

Do what johnsold said...  Don't make it a zero, pass the wire through the false case.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 6 of 13
(4,032 Views)

Here is an simple example.

When the Read is pushed,  the indicator should show the control value. But when the read is not pushed I want the indicator keep the last values of control before the Read button is released.

 

Thanks.

0 Kudos
Message 7 of 13
(4,023 Views)

Oh the shift register works now! Thanks.

I guess it was not working well because I was just using one shift register for testing while I had two arrays, and it was mixing the two arrays.

 

 

0 Kudos
Message 8 of 13
(4,017 Views)

I am a Feedback Node fan myself.

 

FeedbackNodeExample.png

Message 9 of 13
(4,009 Views)

Sometimes it is sufficient to simply place the indicator and save operations also inside the same case structure. No extra code needed. 😄

Message 10 of 13
(4,006 Views)