09-23-2014 07:33 AM
Kindly clarify me query.In the above for loops when the refnum data passes through the shift registors a valid refnum is obtained at the end of loop execution,whereas when the refnum does not pass through the shift registor refnum becomes invalid.What is the reason for this behaviour?
09-23-2014 07:38 AM
Hi,
if your FOR loop runs NULL times, and you use tunnels, a null reference will come out - as there is no valid data at the output tunnel.
MB
09-23-2014 07:40 AM
I'm not seeing the For Loop you referended, but watch out for loops that execute 0 times. Because the shift register is a single memory space, you will have the reference on the other side of the loop even when the loop doesn't execute (e.g. indexed by empty array). However, tunnels are independent memory spaces, so the outgoing tunnel won't have anything feeding it when the loop doesn't execute. This isn't the case for a While Loop since it will always execute at least once.
09-23-2014 08:27 AM
I'm pretty sure they are referring to this post: http://forums.ni.com/t5/BreakPoint/LabVIEW-Minutiae-that-may-bite-you-someday/m-p/1122315#M12323
09-23-2014 11:14 AM
In the snippet below, the final output Boolean always evaluates to TRUE ... right?
Not quite!
The two pairs of functions are not exactly inverses of the other for IEEE 754 Floating Points, meaning the XOR of the two functions is not always TRUE. As with the first Bit of Minutiae, this discontinuity happens when either input is NaN.
The semantics of this output are very important to consider when designing fail-safe systems. Ensure that you choose the correct function with the desirable result, which is oftentimes a failure mode, for NaN!
09-29-2014 10:34 AM
No Comment required.
09-29-2014 10:51 AM
@Intaris wrote:
No Comment required.
Many fields require memorization of minutia.
Programmers should know the value limits of all common number representations.
09-29-2014 11:13 AM
Labels are wrong, -32767 goes to 32767 obviously, not 32768....
Otherwise I feel this should be mentioned in the help. Currently it states that it negates the input number which is clearly not always the case......
09-29-2014 12:10 PM
A help note would clarify the limits of the signed integer, but one could argue the function did negate the input as expected:
-32768 (-1) = 32768 (not possible in I16) = 32767 + 1 = -32768 (in I16)
10-05-2014 07:59 AM
Thanks for your reply.I have attached the for loop here.So, owing to the memory allocation a valid reference is obtained at the end of loop execution in the case of shift registers.Whereas in the other case when loop execution is zero a valid reference cannot be created.