LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is LabVIEW's array truthiness done this way?


@RTSLVU wrote:

@ouadji wrote:

From my point of view, I tend to agree with GregFreeman.

 

The definition of the  and-gate  is perfectly clear and precise.

 

A HIGH output (1) results only if both (or all) the inputs to the AND gate are HIGH (1)

 

Even if this behavior is mentioned in the help for the "AND array" function, I find this behavior is inappropriate. (this current behavior seems illogical to me)

 

With an empty boolean array ... all inputs are not "high" ... so, according to the definition of the and-gate, I think that the gate output should be" low"

 

(IMHO, with my poor english)

 

 

 

 

 


Yes but an empty array is equivalent to the "gray area" in TTL logic because it is neither high nor low.

 

A TTL gate output with a Gray level input is undetermined, at least LabVIEW has a determined output, that is a lot eaiser to trouble shoot than if it could go either way like a logic gate. 


Standard TTL circuits operate with a 5-volt power supply. A TTL input signal is defined as "low" when between 0 V and 0.8 V with respect to the ground terminal, and "high" when between 2.2 V and VCC (5 V), and if a voltage signal ranging between 0.8 V and 2.0 V is sent into the input of a TTL gate, there is no certain response from the gate and therefore it is considered "uncertain"

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 11 of 16
(1,145 Views)

Standard TTL circuits operate with a 5-volt power supply. A TTL input signal is defined as "low" when between 0 V and 0.8 V with respect to the ground terminal,

and "high" when between 2.2 V and VCC (5 V), and if a voltage signal ranging between 0.8 V and 2.0 V is sent into the input of a TTL gate,

there is no certain response from the gate and therefore it is considered "uncertain"

 

yes, i know that (since a long time)  Smiley Wink

 

 ... and ? ... What is the result of your reasoning ?? (about the original question)

 

 

0 Kudos
Message 12 of 16
(1,132 Views)

To me, why it does what it does is academic.  The fact that the result of "AND array" and "OR array" empty array cases are desired outcomes for the vast majority of my uses makes me happy in the same way that the default for Boolean is FALSE and the default for an INT is 0 does.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 13 of 16
(1,119 Views)

@ouadji wrote:

Standard TTL circuits operate with a 5-volt power supply. A TTL input signal is defined as "low" when between 0 V and 0.8 V with respect to the ground terminal,

and "high" when between 2.2 V and VCC (5 V), and if a voltage signal ranging between 0.8 V and 2.0 V is sent into the input of a TTL gate,

there is no certain response from the gate and therefore it is considered "uncertain"

 

yes, i know that (since a long time)  Smiley Wink

 

 ... and ? ... What is the result of your reasoning ?? (about the original question)

 

 


 An empty array is equivalent to the "gray area" in TTL logic because it is neither high nor low.

 

A TTL gate output with a Gray level input is undetermined, at least LabVIEW has a determined output, that is a lot eaiser to trouble shoot than if it could go either way like a logic gate.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 14 of 16
(1,100 Views)

Indeed, a labVIEW logic gate with an undetermined output would be a real concern.

I agree with you. ...Phew!  it's not the case.  Smiley Happy

This is not really the subject of the original question, but your reasoning is interesting.

0 Kudos
Message 15 of 16
(1,088 Views)

@RTSLVU wrote:

A TTL gate output with a Gray level input is undetermined, at least LabVIEW has a determined output, that is a lot eaiser to trouble shoot than if it could go either way like a logic gate.


That's why you should use Schmitt Triggered gates to handle this for you (they stay at the output logic level until the input goes out of the gray area)!


GCentral
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
Message 16 of 16
(1,080 Views)