LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple front panels for different instances of the same subVI

I usually use two queues (one in each direction) for communication with my modules.  In general, each module/loop has a dedicated queue to send commands/data to it, and uses a shared queue for communication with the main application/loop.  Using many queues is not a memory problem, as long as the consumer is keeping up with the producer.

 

There are probably as many ways to deal with multiple queues as there are LabVIEW large application programmers.  Rather than give you one method, I will refer you to the Large Application group in the LabVIEW community.  There is a plethora of advice and examples there for exactly this type of problem.

 

I would probably use LabVIEW classes for your queue elements instead of clusters, and you seem to be at the point to take advantage of this.  Check out the tutorials at the above link and repost if you have further questions.

0 Kudos
Message 11 of 19
(1,414 Views)

Thanks for your reply. There is plenty of advice I can feed on 🙂

 

I do not know why I did not think of clusters for my queues ... it's so obvious and much simpler than my (dumb) approach 🙂 Now, classes are different class all together. I'll have to look into that. I originally started with two queues as well but it quickly grew. My experience now (looking back) that it's a bit easier to implement, but harder to expand later on. So my approach (with multiple queues) kind of defeats the original purpose of this all exercise to improve expandability and modular approach.

 

There are some excellent posts in the link you provided ... so much to read 🙂

 

Cheers,

Radovan

0 Kudos
Message 12 of 19
(1,408 Views)

HI,

             I am also facing same problem. What i did to see the working of reentrant is.

 

1. Create 1 master Vi by name master.vi

2. Create 1 slave VI by name slave.vi

3. Enable the reentrant in slave VI.

 

          I added one 10 sec delay in the slave VI to see the creation of clone inbetween slave is running.

 

As i run master.vi & calling slave.vi than clone is created but after completion of first called than only second clone with same name is created with name clone, but the data which i am passing from master is updated.

 

Can any of you please tell me that how can i load multiple front panel for same subvi with each doing seperate work assigned (i..e. add two number sent from master.vi)...

 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 13 of 19
(1,346 Views)

Hey Ranjeet_Singh!

 

First off, I would like a little more information about your program so there is better understanding on how to address your problem. What exactly are you trying to accomplish with your master/slave VI setup. What kind of data are you trying to pass around?

 

Just to help get you started, try checking out this article on opening multiple instances of a VI

 

https://decibel.ni.com/content/docs/DOC-5598 

 

Keep us posted on how that works for you!

 

Regards,

James W.
Applications Engineer
National Instruments
0 Kudos
Message 14 of 19
(1,321 Views)

Hi MaesterSid,

                                       Although my application is big which gonna need this reentrancy. To illustrate this i wrote two very simple basic program called master.vi & slave.vi...

 

i just want to acheive that as soon as user presses add from master.vi by entering different value from master front panel. The slave should add the value & present to output.. Can you please go here & take a look at my code.

Till that time i will check ur code.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 15 of 19
(1,310 Views)

Hey friend MaesterSid,

                                                   The main problem with this code is we are fixing the number of instances. But in my application this wlll be depeneds on number of elements in a queue.

                                                    Second thing if i run my VI like this than i wont be able to pass the values. check this out.

 Just go for the property of invoke node runVI.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 16 of 19
(1,308 Views)

Hi Ranjeet_Singh,

 

It looks like you have your own thread running in the forums on this particular issue. Instead of trying to work in two areas on finding a solution I suggest we focus our support on the thread you linked here. Older threads will not see as much visibility to the most recent discussions. You will find you will get a lot more community support from newer topics as well. It looks like you have some good suggestions from the members of the community to work off of and I would definitely suggest looking into their recommendations.

 

Regards,

James W.
Applications Engineer
National Instruments
0 Kudos
Message 17 of 19
(1,287 Views)

Hi james,

                           Can  you please elaborate which solution you are telling. Synchronous & asynchronous ?

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 18 of 19
(1,279 Views)

It looks like some others have posted to elaborate on this particular answer in the other discussion forum you created for this issue. Please refer to their advice to see if that will help you out.

 

http://forums.ni.com/t5/LabVIEW/instances/m-p/2186966/highlight/false#M701888

 

Regards,

James W.
Applications Engineer
National Instruments
0 Kudos
Message 19 of 19
(1,266 Views)