12-21-2022 11:19 AM
@JÞB wrote:
I think he meant that the second 0 constant could be removed and migrate add to after the loops.
Who is "he"?
@JÞB wrote:
The PRNG marks that the loop is no longer constant folded. Why? Because, although the PRNG WILL generate the same numbers, they may no longer be in the same order. ?
No, the numbers are guaranteed to be in the same order at the output tunnel, even though they might not have been generated in index order. (However, with random number we could not tell unless we reverse engineer the random algorithm, which has been done, of course. 😄 )
In any case, you can never constant-fold anything that contains a dice. No dice! (pun)
(Folding would always return the same random values that have been generated at compile time. not random!)
Here's my "slightly simpler" alternative to the original problem.
12-21-2022 11:44 AM
@altenbach wrote:
@JÞB wrote:
I think he meant that the second 0 constant could be removed and migrate add to after the loops.
Who is "he"?
@JÞB wrote:
The PRNG marks that the loop is no longer constant folded. Why? Because, although the PRNG WILL generate the same numbers, they may no longer be in the same order. ?
No, the numbers are guaranteed to be in the same order at the output tunnel, even though they might not have been generated in index order. (However, with random number we could not tell unless we reverse engineer the random algorithm, which has been done, of course. 😄 )
In any case, you can never constant-fold anything that contains a dice. No dice! (pun)
(Folding would always return the same random values that have been generated at compile time. not random!)
Here's my "slightly simpler" alternative to the original problem.
Turns out that I miss spoke a bit. (and the darn default ini file had show constant folding turned off)
With PRNG, the order of the values output is in order of the iteration in which they are generated. However, the seed for each call is dependent on the previous PRNG call. so for a given number of parallel iterations the same values are generated but, there is no guarantee that the calls are made sequentially and the order of the values may change at the output if loop parallelization is on and allow debugging is off
12-22-2022 03:41 AM
Ah, right! Yeah, the + 0 is quite redundant. 😄
12-22-2022 05:23 AM
@JÞB wrote:
With PRNG, the order of the values output is in order of the iteration in which they are generated. However, the seed for each call is dependent on the previous PRNG call. so for a given number of parallel iterations the same values are generated but, there is no guarantee that the calls are made sequentially and the order of the values may change at the output if loop parallelization is on and allow debugging is off
Sounds to me like an improvement of the Randomness of the numbers series. Not a significant one in terms of true crypto randomness but nevertheless. 😀
01-10-2023 09:44 AM
So we have a sequence structure. In the first frame is a "semi-transparent" event structure (timeout=0) with a value change event for "Gain" that locks the panel. In the "Gain:value changed" event case, we take the new value from the event data node and write it to the control (i.e. itself!) via a value property node. In the next frame, we read the "Gain" terminal.
What would the thought process be to do that crazy detour ????
01-17-2023 12:39 PM - edited 01-17-2023 12:44 PM
In order to connect a waveform to a scalar numeric indicator, somebody used "variant to data". (scratches head...).
Look ma! Not even a coercion dot!!!!
I am sure this must be obvious to all more experienced LabVIEW programmers (than rookie me), but what do you expect the indicator to display after running the above code (No cheating, i.e. without actually implementing it!)?
And yes, the following is equivalent. Somebody must have objected to the lipstick on the pig (coercion dot):
01-18-2023 11:45 AM
@altenbach wrote:
what do you expect the indicator to display after running the above code (No cheating, i.e. without actually implementing it!)?
Nice way to obtain last element. And I asked me myself "if it works with waveform, why should not work with cluster with same elements like waveform?"
And then I've got an exception: 😁
Nice side effect, can be submitted as bug. 2022Q3 64bit. You should select all elements in waveform, then move with Control key to make a copy. If you will drop copy in waveform and move, then exception can be raised. And one cosmetic issue.with label on diagram.
01-21-2023 11:39 AM
So we have a plain text file with one column (while it has a csv extension, there are no commas!). The first row is a header to be tossed.
In order to get that column, we apparently need to read it as a 2D array with one column, delete the first row, then reshape it to a 1D array based on the number of elements calculated from the product of the dimensions.
02-03-2023 04:33 PM
Well, I want to see more precision, so setting the indicator to EXT seems like a completely logical idea....
02-06-2023 06:21 AM
Even if you do all the math with EXT, you usually don't gain much. The man difference between DBL and EXT is that EXT has no guard bits.