LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tunnel conditional not allowed with fpga target. Any alternative?


@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.

0 Kudos
Message 11 of 17
(1,028 Views)

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 😉 )

0 Kudos
Message 12 of 17
(1,023 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 13 of 17
(1,017 Views)

@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:

Conditional Last Value.png

 

 

 

0 Kudos
Message 14 of 17
(1,001 Views)

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.

 

0 Kudos
Message 15 of 17
(991 Views)

@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.

0 Kudos
Message 16 of 17
(985 Views)

Hi,

 

Not sure but it seems like this is what you are trying to do: (also attached a VI)

 

Snippet.png

 

-N

0 Kudos
Message 17 of 17
(966 Views)