LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot use Select inside For Loop inside SCTL (FPGA) - Bug? Alternate approach?

Solved!
Go to solution

When I put a Select inside a For Loop inside a Single-Cycle Timed Loop in LabVIEW FPGA, I get the following error when I try to compile:

"An internal software error has occurred. Please contact National Instruments technical support at ni.com/support with the following information:

Error -61003 occurred at

Possible reason(s):

LabVIEW FPGA:  You cannot include this function in a For Loop when the For Loop is inside a single-cycle Timed Loop."

 

I haven't seen anything documented that says this isn't allowed; is this a bug, or did I miss some documentation?

 

The code that causes this error looks like this, inside a SCTL (ignore the stray boolean wire behind the for loop)

Select inside For Loop.png

I've come up with the code below instead, which does compile in a Single-Cycle Timed Loop, but it looks a bit ugly. Does anyone have a better suggestion?

alternate.png

Message 1 of 9
(4,665 Views)

Actually, the documentation for SCTLs seems to mention, rather specifically, that what you are doing should be working.

 

https://zone.ni.com/reference/en-XX/help/371599L-01/lvfpga/fpga_timed_loop/

Nope.PNG

 

I would would think bug but would want to hear what other people think.

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 9
(4,642 Views)

Can you use Swap instead of Select?

0 Kudos
Message 3 of 9
(4,640 Views)

@Darin.K wrote:

Can you use Swap instead of Select?


No, but thanks for the idea. Swap isn't available on the FPGA palettes.

0 Kudos
Message 4 of 9
(4,637 Views)

Tried it myself and I received the same error. Interestingly enough, if you use a Case Structure instead of Select everything will work fine. 

Case Structure.JPG

It might be easier to follow, but no where near as fun or clever as your own solution above.

Charlie J.
National Instruments
Message 5 of 9
(4,585 Views)

Since there seems to be agreement that this is a bug, can we get a CAR assigned to it?

0 Kudos
Message 6 of 9
(4,454 Views)
Solution
Accepted by topic author nathand

This issue is currently being tracked under CAR# 592391. Please keep an eye on our patches and new releases as normal! 

Charlie J.
National Instruments
0 Kudos
Message 7 of 9
(4,425 Views)

I still have the same issue with LabVIEW 2017 Version 17.0f2

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019OLtSAM

 

0 Kudos
Message 8 of 9
(3,356 Views)

Hey Marcus,

 

The CAR submitted for this issue appears to still be in progress. You can work around this issue by using a case structure instead of a Select VI. Thanks!

Jen P.
Applications Engineering
National Instruments
0 Kudos
Message 9 of 9
(3,340 Views)