LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure: "true" to update the output value, "false" to display last output value

Here is what I am trying to do:

I want to use a case structure (maybe a loop would work better? but it doesn't look like it would) to update the output value if the input is not 0, and to output the previous output value if the input is 0. Basically I want the case structure to do nothing if the input is 0.
What I have tried so far is to use the Default case with nothing in it, but it complains that one output tunnel is unwired. If I then select "Use Default if Unwired" to fix it, it outputs 0 when input is 0.

Thanks,
Jheffy
0 Kudos
Message 1 of 3
(2,976 Views)

Hi Jheffy,

First, when you use the "Use Default if Unwired" the returned value will be the default value for what data type. e.i. numerics returns 0 and boollean's returns False and array's returns an empty array. Se LV Help bookshelf for more info.

what you need is booth an loop and a case structure, the loop should continue a uninitiated shift register and the case structure.

see file
 
/Thomas
0 Kudos
Message 2 of 3
(2,969 Views)
So simple, too. thanks!
0 Kudos
Message 3 of 3
(2,965 Views)