LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing an Output of a Case Structure after Structure is Latched

Hi All,

 

I am very new to LabVIEW so I hope I am able to make the following question clear.

I attached a picture of the structure I am having trouble with below.

The structure preforms as I need it to in that is is able to calculate and return an average value when I turn on the control.

I have my Boolean control set to "latch when released" so that the case preforms its averaging purposes and then presents the average as "force zero value" (and does not continue averaging entries of the arrays).

This value displays, as I want it to, as soon as the case is run; however when the case is false, (imediataly after clicking "zero force"), the value returns to 0 because the case is off.

How can I "store" the force zero value that is calculated when I run the case structure so that I can use that value elsewhere in my VI.

 

I really appreciate any help; if I am going about this problem a completely rediculous way, please let me know.

 

-Mike

 passing case value 2.jpg

0 Kudos
Message 1 of 7
(2,761 Views)

I have read about "Shift Registers" and spent some time trying to use a For Loop to complete this task. 

However, I was not able to get that to work either, and ended up with similar problems.

If Shift Registers would be more helpful for this sort of problem, could someone provide a little information about how they work, or direct me to a tutorial that might help.

 

Thanks again

0 Kudos
Message 2 of 7
(2,758 Views)

Shift Registers: Passing Values between Loop Iterations - LabVIEW Help

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours 

0 Kudos
Message 3 of 7
(2,746 Views)

You could also just put your Force Zero Value indicator inside of the TRUE case....

Chris
Certified LabVIEW Architect
Certified TestStand Architect
Message 4 of 7
(2,720 Views)

PackerFan is right, if you don't need that value later in your program, just put that indicator into the True case. If you need it later, maybe local reference is a good way how to achieve it. 

0 Kudos
Message 5 of 7
(2,713 Views)

Yeah, the problem is that values need to be continuously compared using this zero value.  The best solution I could find is wire it to the opposite case so that it reads out always and then manually enter it into a numeric control and use that.

 

I was just wondering what a more elegant solution might've been.  I will look into local reference.  Thanks guys!

0 Kudos
Message 6 of 7
(2,702 Views)

The correct answer is to use a shift register.

Message 7 of 7
(2,697 Views)