LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Values into Case Structure regardless True or False Case

Hi,

 

I am a new user to LabVIEW, so this question might seem dumb, but thank you very much for your help!

The picture below shows partial of my program.

 

kaho2315_0-1636152299062.png 

kaho2315_1-1636152334294.png

 

So, what I am trying to do here is that I would like the value from Check pt 2 be sent into the Case Structure no matter if it is True or False case, so that the value in Check pt 3 will always be the same (continue updated) as Check pt 2.

 

Can anybody guide me through this problem ?

I really appreciate with your help.

 

 

 

 

0 Kudos
Message 1 of 9
(2,461 Views)

First of all, Check Pt 3 redundant copy of Check Pt 2. If Check Pt 2 already shows the value what is the use of showing the same value on another Check Pt 3.

 

Anyway, it is simple as moving the Check Pt 3 outside the case structure and wiring it with Check Pt 2, now both Check Pt 2 and Check Pt 3 will show the same value.

 

Think Data Flow!

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 9
(2,454 Views)

Thank you for your reply.

 

Just an FYI, I put Check pt 2 and Check pt 3 there just so I can explain my question better. They are also there for me to debug the issue (I put them there so that I can see the values, and they will be removed once this problem is solved).

 

Now going back to my question - 

I would like the values to pass into the Case Structure no matter if it is true or false. 

As you can see in the picture below, the value of Check pt 2 and Check pt 3 are different. (This is because under false case, the value from Check pt 2 is not sent into the Case structure)

kaho2315_0-1636154285310.png

But what I want to do is that the value in Check pt 3 and Check pt 2 to be synchronized. (In other words, I want the value from Check pt 2 be ALWAYS sent into the Case Structure regardless of it is true or false)

 

I am sorry about my explanation was not so clear.

 

0 Kudos
Message 3 of 9
(2,446 Views)

Your explanation makes absolutely no sense. Why would you put anything into a conditional structure if it should be unconditional?

 

I think you should take a step back and re-think your approach. I am sure you have some lingering misconceptions about dataflow. If you need the same value in both cases, that's already available at the input tunnel.

 

Please tell us what you are trying to do, not how you are trying to do it. Most likely there is a trivially simple solution. Also attach a simplified example VI. 

0 Kudos
Message 4 of 9
(2,398 Views)

@kaho2315 wrote:

Thank you for your reply.

 

Just an FYI, I put Check pt 2 and Check pt 3 there just so I can explain my question better. They are also there for me to debug the issue (I put them there so that I can see the values, and they will be removed once this problem is solved).

 

Now going back to my question - 

I would like the values to pass into the Case Structure no matter if it is true or false. 

As you can see in the picture below, the value of Check pt 2 and Check pt 3 are different. (This is because under false case, the value from Check pt 2 is not sent into the Case structure)

kaho2315_0-1636154285310.png

But what I want to do is that the value in Check pt 3 and Check pt 2 to be synchronized. (In other words, I want the value from Check pt 2 be ALWAYS sent into the Case Structure regardless of it is true or false)

 

I am sorry about my explanation was not so clear.

 


The fact that Check pt 3 is different from Check pt 2 has when the case is False has nothing to do with whether Check pt 2 is being passed into the case structure. It's value is available at the tunnel. Check pt 3 does not update because it is inside the other case, which does not execute since the condition is not met. I think that you should step back and take some LabVIEW basics. Also, remember that in LabVIEW the wire is the data, so if the wire is passed somewhere then the data is passed. 

0 Kudos
Message 5 of 9
(2,366 Views)

I solved the problem after rethinking about the data flow.

Thank you all very much for your help 🙂

 

 

0 Kudos
Message 6 of 9
(2,303 Views)

@kaho2315 wrote:

I solved the problem after rethinking about the data flow.

Thank you all very much for your help 🙂


Would you mind sharing what you did so that others in the future who have similar issues can benefit from it?

0 Kudos
Message 7 of 9
(2,289 Views)

For sure.

So my goal for this section of this program was to compare the value of Target Start Time After Cooling and the value from Check pt 2/ Check pt 3. Whenever the value of Check pt 2/ Check pt 3 is less than Target Start Time After Cooling, it then output True.

(Just an FYI, the value of Check pt 2/ Check pt 3 is just a counter of elapsed time, so the value should keep updated, in other words, it should be unconditional)

 

Because of that, I moved everything under the red line out of the Case Structure. It is a very small change, and it finally works!

So the take away is - don't put anything that is unconditional inside the Case Structure.

 

 

0 Kudos
Message 8 of 9
(2,251 Views)

@kaho2315 wrote:

So the take away is - don't put anything that is unconditional inside the Case Structure.


I can't tell you how many times I've had to learn that lesson.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 9
(2,245 Views)