LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sub-Panel with Run async or Run VI invoke node?

Coming back on this, I've realized that I'm going to face an issue soon:

 

As I'm using queues and calling async multiple times, I cannot assign a specific queue to a specific clone in advance, can I?

Because then it means that all my clones will use the same queue... How do I make sure that one clone won't read the data destined to another clone?

 

Typically, If I have the Clones 970002; 970003 and 970004 with Node IDs 1 2 and 3 respectively. These three clones will use the same queue(s) (by principal of being a clone)

If Node ID 1 requests telemetry; how do I make sure that data read in my communication module and sent over the common queue will not be read (and discarded then) by Node ID 2 instead?

 

As I see it, I can either create an array of queue(s) and whenever a clone is created with a specific node ID, this node ID indexes the array and then gets a specific (set of) queue(s) and everytime I request the communication Module I send over this index as well-

Or I can also use the Preview Queue Element function and depending on my clone name/Node ID I retrieve only one specific element (or not)

 

What do you think?

0 Kudos
Message 31 of 38
(523 Views)

If you had a small company with three workers, would you:

A) keep a copy of their individual email addresses (in an array, perhaps).

Or B) come up with complex rules where the three employees share one email address.

 

0 Kudos
Message 32 of 38
(513 Views)

haha I like this analogy.

 

My problem however is that I won't know in advance which clone will control which device in advance (operations include often plug/unplug of devices and it usually not necessarilly in the "Node ID Order") That's what I meant with my previous message (in a very poorly way sorry)
But I guess that is very specific to my case, I'll find an initialization solution, I think, were I'm questionning the system's identification somehow and assign it to a specific set of queues

0 Kudos
Message 33 of 38
(496 Views)

You get that information on a query of the Queues - When you setup clone, each queue can pass info back to the master controller (presumably via another queue and say which device it is) - or you index the info out of the FOR loop which setup the clones.
If using plug and play - you want to keep a record of which device type is attached to which queue anyway - FGV (or similar structure in main controller) is good for this.

 

It's like the small company analogy - you'd keep a record of job roles with HR as well as the email addresses.

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Message 34 of 38
(490 Views)

In your small business would you be spending time worrying about your "Employee ID Order"?  Or care, in advance, about which employee will handle which equipment?  And, if you want to send an employee an email, why not just ask them what their address is, rather than worry about "assigning" something.

 

I'm trying to prompt you into seeing past whatever is making you find a simple situation so complicated.  You are some way down a wrong path and I'm hoping to lead you back from wherever you are.

Message 35 of 38
(485 Views)

@James_W  a écrit :

You get that information on a query of the Queues - When you setup clone, each queue can pass info back to the master controller (presumably via another queue and say which device it is) - or you index the info out of the FOR loop which setup the clones.
If using plug and play - you want to keep a record of which device type is attached to which queue anyway - FGV (or similar structure in main controller) is good for this.


Yes it will be P&P, and sometimes only one device will be connected, sometimes up to 4. 

It is still quite blurred in my mind, but I think I need to stop talking about it and start making it 😄

0 Kudos
Message 36 of 38
(483 Views)

I think I'm struggling as well to porperly set my problematic as I'm lacking experience for this. But also I don't really have any devices to test right now, so that makes it difficult to try anything for now and I just have to anticipate different possibilites.. 

0 Kudos
Message 37 of 38
(473 Views)

Experience is gained through experimentation, not through anticipation.

Message 38 of 38
(449 Views)