From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-20-2021 01:30 AM
Why he is "True" if constant to case is "False"?
09-20-2021 01:48 AM
Hi Lugaro,
@Lugaro wrote:
Why he is "True" if constant to case is "False"?
Because you NEVER set that boolean indicators to FALSE.
Because you also made TRUE the default value of those indicators…
Because indicators, which are connected with the connector pane, should NEVER be placed within (case) structures!
Based on your question: Did you take those "Training resources" offered at the top of the LabVIEW board?
09-20-2021 04:21 AM
As Suggested by GerdW, you need to go through LabVIEW Basics (https://www.ni.com/getting-started/labview-basics/).
In addition if you want see the execution flow during runtime- Check the Highlight Execution in the Block Diagram.
09-20-2021 06:25 PM - edited 09-20-2021 06:28 PM
@Lugaro wrote:
Why he is "True" if constant to case is "False"?
Because of the magic of dataflow. Follow the wire! Your program does exactly what you programmed it to do. (...and why are you using continuous run"? Since you have no controls, nothing can ever change)
Obviously, you must have simplified your demo ad absurdum. Can you show us a more functional program that shows what you are trying to achieve?
09-21-2021 04:26 AM
Hello. I repit my simple demo in another file and they show different result. Why?
My original problem is VI for bar-code scaner.
I scan bar-code and wont to see it while I dont use scanner. But string indicator clear in next cycle. Somtime (and today) it work as I wont. Sometime case work evry cycle after start - clear "string" and ON "test" indicator
09-21-2021 04:29 AM
Thank for "Highlight Execution". But it show that indicator must be "False".
09-21-2021 05:07 AM
@GerdW wrote:
Hi Lugaro,
@Lugaro wrote:
Why he is "True" if constant to case is "False"?
Because you NEVER set that boolean indicators to FALSE.
Because you also made TRUE the default value of those indicators…
Because indicators, which are connected with the connector pane, should NEVER be placed within (case) structures!
Based on your question: Did you take those "Training resources" offered at the top of the LabVIEW board?
Addendum:
Because an indicator, that is connected to the connector pane, is set to its default value at start of the VI execution. That is in contrast to an indicator that is not connected to the connector pane, that will not be changed just by starting the VI.
Regards, Jens
09-21-2021 05:56 AM
I repit my simple demo in another file and they show different result. Why?
09-21-2021 06:11 AM
@Lugaro wrote:
I repit my simple demo in another file and they show different result. Why?
I repeat my previous reply:
Addendum:
Because an indicator, that is connected to the connector pane, is set to its default value at start of the VI execution. That is in contrast to an indicator that is not connected to the connector pane, that will not be changed just by starting the VI.
Solution: Make sure, that a return value is always set at the end of the VI execution regardless of case-structures, ....
i.e. in case that "Boolean 2" is your return value, set it outside of the case structure:
Regards, Jens
09-21-2021 06:39 AM
I try it. Do you have not error?