LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster of occurrences compiles but array of occurrences does not (FPGA)

Hi,

 

On FPGA target (Labview 2013), I can create an cluster of occurrences but not an array.  When I use an array I get the error "Possibility of Dynamic Refnum not supported for current target.

 

First, no errors with just cluster:

 

cluster.png

 

 

Now errors using arrays:

 

array.png

 

 

I don't understand why there is an error with arrays.  My goal is simply to be able to identify individual Occurrences from a bunch of Occurrences that we use (e.g., "Occurrence1", "Occurrence2").  I've tried hard to name each occurrence in a cluster but haven't figured it out (they're ALL called "occurrence"! and providing a Constant Cluster with names doesn't work with occurrences that I could find).  

 

So now I'm trying to identify occurrences by using an index into an array of occurrences, and now I can't even create the array!!

 

I really hope someone can show me a way to do this.  

 

Okay, I should mention my PRIMARY goal is to throttle the execution of numerous loops that run at different rates.  Each occurrence is used to "release" an iteration of a loop. A master loop goes through the timing information and sets the occurrences as needed.  I want to use a FOR loop to go through each loop's timing information (stored in an array) and then grab the right occurrence (hopefully also stored in an array).  If you have an alternative design for this I'm all ears.

 

Thanks!!

 

Steve

 

0 Kudos
Message 1 of 10
(2,837 Views)

Unfortunately the FPGA compiler does not support arrays of references. Semantically you are correct, there is no difference between using the cluster and unbundle versus using an array with constant array indices. The work has just not been done to make it happen. Please feel free to post to the FPGA Idea Exchange (if the idea does not exist).

0 Kudos
Message 2 of 10
(2,834 Views)

Ugh, ok.  

 

Please tell me there is a better way to group and identify references than this:

 

select.png

 

 

Thanks,

Steve

0 Kudos
Message 3 of 10
(2,821 Views)

You can name each occurrence when you bundle them either by using wire labels (I think) or by right-clicking the top terminal on the bundle node and creating a cluster constant. You can then change the label of each element in the cluster. Also note that if you are going to be passing this cluster of occurrences into subVI calls then you'll probably want to create a typedef for it so you can keep them all in sync.

0 Kudos
Message 4 of 10
(2,814 Views)

As far as your primary concern of loop synchronization we'd need to know a bit more about your app to know how to help as there are many synchronization techniques. For instance, if your master loop is controlling other aspects of the worker loops then you could use FIFOs to send the messages to each loop which would have a similar throttling affect.

0 Kudos
Message 5 of 10
(2,809 Views)

Thanks for the responses Dragis.

 

I had already tried your cluster suggestions; the clusters do not take the label names - at least for occurrences - and I am not able to populate the Cluster Constant with occurrences (in order to provide names).

 

Hmm, I guess I will explore a typedef for this but not sure if it works for occurrences.

 

This may seem minor to some folks, but coming from the software engineering side of the shop (25 years) I can tell you this inability to clearly identiy things is a bug magnet!

 

Steve

0 Kudos
Message 6 of 10
(2,795 Views)

I can use a cluster of occurrences with naming by creating a cluster control with the correct labels and using that for a Bundle By Name. There is a caveat that you can't create a constant and the control must be on the FPGA VI's connector pane (probably just some requirement of the FPGA module and references). I don't have the compile tools installed at the moment, so I can't verify that this actually compiles, but I can name the elements in the cluster and unbundle them by using the name.

fpga occurrences.png

Donovan
0 Kudos
Message 7 of 10
(2,789 Views)

This may seem minor to some folks, but coming from the software engineering side of the shop (25 years) I can tell you this inability to clearly identiy things is a bug magnet!

 

You are absolutely right and each release LabVIEW FPGA tries to address more of these issues and bring the product closer to a software design language. It is posts like this that help drive what work is done, so keep up the good work. Like I mentioned before, please take the time to vet these ideas on the FPGA Idea Exchange so everyone can help push the changes. There is a long way to go, but you have to start somewhere ; )

0 Kudos
Message 8 of 10
(2,779 Views)

Ok, well using a front panel cluster apparently works but since we're currently trying to reduce our FPGA front panel items due to resource usage I wouldn't call that a "clean" solution (but thanks for at least giving a solution).

 

I've posted to the Idea Exchange.

 

Steve

0 Kudos
Message 9 of 10
(2,760 Views)

I ran into this problem today. Put the cluster constant in a diagram disable structure and the broken run arrow goes away.

 

 FPGA named occurrence.png

Message 10 of 10
(2,681 Views)