11-05-2021 05:47 PM
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.
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.
11-05-2021 06:02 PM
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!
11-05-2021 06:23 PM
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)
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.
11-06-2021 12:22 PM
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.
11-06-2021 06:51 PM
@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)
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.
11-09-2021 11:56 AM
I solved the problem after rethinking about the data flow.
Thank you all very much for your help 🙂
11-10-2021 07:24 AM
@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?
11-11-2021 12:14 PM
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.
11-11-2021 12:34 PM
@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.