LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Coersian dot on "Stop if True"

Solved!
Go to solution

OK then guys, what on EARTH is going on here!?

 

whatisthis.JPG

0 Kudos
Message 1 of 15
(2,969 Views)

You can add a conditional terminal to configure a For Loop to stop when a condition occurs. A For Loop with a conditional terminal executes until the condition occurs or until all iterations complete, whichever happens first. For example, if you want a loop to execute a set number of times unless an error occurs, you can use a For Loop with a conditional terminal and wire an error cluster to the conditional terminal.

            If you wire the conditional terminal in a For Loop, you cannot predetermine the number of iterations the loop executes. You can determine the number of iterations the loop completes by auto-indexing an output array and checking the number of elements after the loop executes or by wiring an indicator to the loop iteration terminal and checking the count after the loop executes.The number wired to the count terminal or the number of elements in the auto-indexed input array acts as the maximum number of loop iterations that complete if the condition wired to the conditional terminal never occurs. If you want a loop to iterate until a condition occurs with no maximum number of iterations, use a While Loop instead.

 

If the conditional terminal of a While Loop, a For Loop, or a (Windows, ETS, Vxworks) Timed Loop is Continue if True , the loop executes its subdiagram until the conditional terminal receives a FALSE value. If the conditional terminal is Stop if True , the loop executes its subdiagram until the conditional terminal receives a TRUE value.

 

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 2 of 15
(2,965 Views)

Hi alecjcook,

 

Is your 'Stop control' is type def ??

 

Regards,

Bijay

0 Kudos
Message 3 of 15
(2,956 Views)

So why does it have a coersion dot on it?

0 Kudos
Message 4 of 15
(2,952 Views)

Yes my 'Stop control' is type def

0 Kudos
Message 5 of 15
(2,951 Views)

I am with the expectation of being the boolean control being a typedef.  From LabVIEW 2011 on, the block diagram makes us easily see if the control is a typedef. So I guess you are not using LabVIEW 2011.

0 Kudos
Message 6 of 15
(2,949 Views)

No, its LV2010.

So why is there a coersion dot? the data type of this custom control is still boolean, it can still only be TRUE or FALSE, so what is being coerced?

0 Kudos
Message 7 of 15
(2,942 Views)

The coercion is done from typedef'd to non-typedef'd.  No reason to care: LabVIEW just tells you that the data types do not match exactly.

Message 8 of 15
(2,939 Views)
Solution
Accepted by topic author alecjcook

It is almost impossible to avoid coercion dots in the latest versions of LabVIEW as a typedef is now viewed as different than its underlying type.They also alert you that your chose datatype may not be optimal or appropriate for a certain function.It is always best to avoid coercions/conversions. Choose a proper data type from the beginning if at all possible.

 

see this thread:  http://forums.ni.com/t5/LabVIEW/Coercion-dots-Typedef-and-Property-Nodes/td-p/1507442

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 9 of 15
(2,937 Views)

@danil33 wrote:

[...].It is always best to avoid coercions/conversions. [...]



I do not agree. As long as no buffer allocation takes place, I do not concern about coercion dots.  See e.g. are typedef coercion dots bad for efficiency

0 Kudos
Message 10 of 15
(2,925 Views)