06-22-2024 07:43 AM
@alexderjuengere wrote:Why is there a timeout case that can never happen?
- because, I don't want any timeout effects, can it be removed?
Yes. Just delete the event case.
@alexderjuengere wrote:
Why aren't the buttons latch action?
- because you can't use local variables with that mechanical action
Do you actually need the Local Variables? You've been around long enough to know you should avoid them.
06-22-2024 09:27 AM
I somehow missed that this discussion was in the RG thread. I was looking for the link to the quote thread.... 🙂
06-25-2024 04:43 PM - edited 06-25-2024 04:57 PM
wiebe@CARYA wrote:
@Henrik_Volkers wrote:
@altenbach wrote:
In a nutshell, we basically have a 2D boolean array to be turned into a single boolean according to some rules.
I have that nagging feeling that this could be simplified somewhat. 😄 (seen here)
shiftregisters and one OR 🙂 just keep the boolean information (edit: first SR init to false 😉 )
Put the indexing on Last Value, and make it conditional:
Nest auto indexed loops and Just enable the loop conditional terminals and STOP THE LOOPS when the first TRUE occurs. Output last value.
Better yet: there should be a way to use recursion for this and scale it for n dim array where n is known only at runtime (Xnode, vim maybe? I'd have to play) just OR each autoindexed element with the previous result on a FBN. NOTE the nth+1 dimension loop will execute 0 times returning the default output F to the nth loop, so the whole dang thing stops on the first T in any dimension
for dimensions (n to 1), n--
06-25-2024 06:55 PM
@JÞB wrote:
Nest auto indexed loops and Just enable the loop conditional terminals and STOP THE LOOPS when the first TRUE occurs. Output last value.
Sometimes this is fine, but not always. In the original code, a lot of other things occur in the loop, including file writing and an inner FOR loop doing DAQ. I cannot tell if stopping early would be correct in that scenario. (I might study it if the code were cleaner, but there are too many hairballs... 😄 )
06-25-2024 10:36 PM - edited 06-25-2024 10:40 PM
@altenbach wrote:
@JÞB wrote:
Nest auto indexed loops and Just enable the loop conditional terminals and STOP THE LOOPS when the first TRUE occurs. Output last value.Sometimes this is fine, but not always. In the original code, a lot of other things occur in the loop, including file writing and an inner FOR loop doing DAQ. I cannot tell if stopping early would be correct in that scenario. (I might study it if the code were cleaner, but there are too many hairballs... 😄 )
Oh, I assumed modular code. Silly me.
So much for just sorting and testing the default (last) element output of delete from array 😞 as an OR Array Elements replacement. HMMM. I wonder if there is any case where that could be faster than OR Elements. Certainly either would be simpler than the example shown. That "=0, Negate" bothers me when "≠0" is right there.
07-26-2024 01:10 PM
Logging four scalar (!) values to a file every 10 seconds apparently needs conversion to arrays, to dynamic data, a diagram full of express VIs and a handful of local variables. (seen here)
07-31-2024 11:41 PM
I am not sure where the OP dug out that old example, but turning a 1D array into a 2D array with one column does NOT need a formula node!
10-03-2024 02:06 PM
10-06-2024 11:26 AM
@altenbach wrote:
X(radians)+pi? Aren't there 2pi radians in a circle? I'm sure you can find a complex solution that fits on a postage stamp (of course that might be a postage stamp that calls itself reentrantly)
10-06-2024 12:19 PM
@JÞB wrote:
@altenbach wrote:
X(radians)+pi? Aren't there 2pi radians in a circle?
That pi gets subtracted again later. It just makes sure that the remainder is mapped into -pi..pi instead of 0..2pi.