LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bool indicator is "True" if I connect this indicator to terminal. (In case structure)

Lugaro_0-1632119192365.pngLugaro_1-1632119214684.png

Why he is "True" if constant to case is "False"?

 

0 Kudos
Message 1 of 12
(18,104 Views)

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?

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 2 of 12
(18,097 Views)

 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.

Pazhanivel Thiruvenkadam,
CertifiedLabVIEWArchitect|| CertifiedTestStandDeveloper,
Currently able to Access LV2015&LV2017
0 Kudos
Message 3 of 12
(18,056 Views)

@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?


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 4 of 12
(18,011 Views)

Hello. I repit my simple demo in another file and they show different result. Why?

Lugaro_1-1632215471798.png

 

 

Lugaro_0-1632215277816.png

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   

Lugaro_3-1632216179032.png

 

 

0 Kudos
Message 5 of 12
(17,967 Views)

Thank for "Highlight Execution". But it show that indicator must be "False".

 

0 Kudos
Message 6 of 12
(17,966 Views)

@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

Kudos are welcome...
Message 7 of 12
(17,960 Views)

I repit my simple demo in another file and they show different result. Why?

Lugaro_0-1632221773262.pngLugaro_1-1632221793929.png

 

 

0 Kudos
Message 8 of 12
(17,946 Views)

@Lugaro wrote:

I repit my simple demo in another file and they show different result. Why?

Lugaro_0-1632221773262.pngLugaro_1-1632221793929.png

 

 


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:

JensG69_0-1632222651635.png

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 9 of 12
(17,940 Views)

Lugaro_0-1632224351927.png

I try it. Do you have not error? 

 

0 Kudos
Message 10 of 12
(17,932 Views)