LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scalable way to communicate between parallel processes in VI?

I'm working on FPGA. I'd like to have a VI that can be duplicated several times on the front panel, and each VI would consist of two parallel processes, one of which sets a flag for the other process (essentially, a go-ahead flag that allows some synchronization between the processes). I've understood that a register would be the simplest way to set up such flag, but the problem is that I only know how to create registers global to the FPGA (by right clicking on the FPGA target -> New -> Register), not local to the VI. As a global register, if I duplicate the VI, the register won't automatically be duplicated, but I have to manually create several registers, and then add several cases to the VI to select the correct register, which becomes cumbersome.

 

Is there a way to communicate between the parallel processes in the VI using a register-like entity, which would automatically "scale up" when I create copies of the VI? (Note that I cannot use local variables either, as the parallel processes are in separate sub-VIs and I'd like to keep it that way.)

0 Kudos
Message 1 of 3
(578 Views)

Memory?

 

A memory block that is shared by all VIs, where an input specifies the address to be used... 

 

So, not totally automatic, you'd have to increase the constant wired to the copied VI..

 

It's tricky though, it depends a lot on what you are trying to 'communicate'. For instance, if one VI writes a value, and another reads, you can get synchronization problems.

0 Kudos
Message 2 of 3
(549 Views)

@okahilak wrote:

Is there a way to communicate between the parallel processes in the VI using a register-like entity, which would automatically "scale up" when I create copies of the VI? (Note that I cannot use local variables either, as the parallel processes are in separate sub-VIs and I'd like to keep it that way.)


Search in the palettes, specifically the Data Storage & Transfer palette.  There, you can define the register, FIFO, memory, or handshake in the VI.  You can double-click on the resulting node to configure it.  You then pass the reference around to the method nodes to read or write.  And those references can be passed into subVIs as well.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(537 Views)