09-13-2021 09:46 AM
@altenbach wrote:
@rwunderl wrote:
@GerdW wrote:
in LabVIEW FPGA it is NOT ALLOWED to create arrays of variable size!
Arrays need to be fixed in size! (And addtionally only 1D arrays are supported…)
Forgot about that little detail. It's been a little while since I needed to use FPGA code, and I've slept since then. I knew it couldn't be that simple...
But there are no arrays in your original code! Your conditional tunnel is not autoindexing.
As others have said, your code makes very little sense, conditional tunnel or not.
Note that this post is not from OP.
09-13-2021 10:21 AM
wiebe@CARYA wrote:
But there are no arrays in your original code! Your conditional tunnel is not autoindexing.
As others have said, your code makes very little sense, conditional tunnel or not.
Note that this post is not from OP.
Yes, but the original code under discussion had no arrays or autoindexing tunnels. I am not sure why the discussion sidetracked into arrays. (Yes, I could have referenced it more clearly 😉 )
09-13-2021 10:50 AM
Hi,
it was me talking about arrays - because conditional tunnels (as used in the example VI) only make sense for creating arrays.
When you just need the "last value" after the loop then you don't need a conditional tunnel at all…
09-14-2021 03:25 AM
@GerdW wrote:
Hi,
it was me talking about arrays - because conditional tunnels (as used in the example VI) only make sense for creating arrays.
When you just need the "last value" after the loop then you don't need a conditional tunnel at all…
Sure you do.
Returning the last value if it the value when the loop stops is a valid use case:
09-14-2021 07:47 AM - edited 09-14-2021 08:04 AM
wiebe@CARYA wrote:
Returning the last value if it the value when the loop stops is a valid use case:
You probably meant "the last matching value".
It gets a bit murkier with a FOR loop that can iterate zero times or if the condition is never true. We probably get the default value which may (or may not) make sense.
09-14-2021 08:14 AM
@altenbach wrote:
wiebe@CARYA wrote:
Returning the last value if it the value when the loop stops is a valid use case:You probably meant "the last matching value".
Probably, not sure what to make of that sentence anymore.
09-15-2021 11:36 AM
Hi,
Not sure but it seems like this is what you are trying to do: (also attached a VI)
-N