LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

replace array subset

Hi Tom,

 

I passed through C on the way to LabVIEW so I understand about trouble shooting. I will tremporarily create thenm to X-shoot myself, but try to delte them since every local forces a data copy.

 

I also undertand the challenge of usinf an AE in a VIT. There are a number of methods to work-around those challenges. One idea that comes to mind is using a single element queue as illustrated in the proptotype Aristos Queues aded to my Action Engine Nugget.

 

THe idea would be to forget about the SR's in the AE but rahter use a queue to store the data. Each instance of your VI would create a queue for its use and it would be apssed into a re-entrant pseudo-Action Engine that does all of the same stuff but works with the dat in the queue.

 

Yet another approach would use VI Serve Call by refenrence to call an AE created once for each instance.

 

The main reason I am dwelling on an AE approach is your mention of "lots of SR and not used everywhere". That pattern just screams AE at me.

 

Could you post some screen shots so we can get a better idea of what you are doing?

 

Have fun,

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 11 of 15
(924 Views)

Hi Ben,

 

      I attach a snap shot of my program. Thanks for your suggestions.  I will try AE. For single element queue, can you  store multiple varaibles in one AE?

 

     Tom

0 Kudos
Message 12 of 15
(894 Views)

tom_z wrote:

Hi Ben,

 

      I attach a snap shot of my program. Thanks for your suggestions.  I will try AE. For single element queue, can you  store multiple varaibles in one AE?

 

     Tom


 

Hi Tom,

 

I don't have time to code up a demo but I'll outline what I think may be helpfull.

 

First:

AS you pointed out we can't take advantage of the native feature of the AE since you want to code inside a template where you can have multiple instances so the the AE have to have unique data spaces.

 

In a normal AE the "data' would be stored the SRs. We need another place to store the data and a mechanism to control which data is being touched by which instance.

 

WIth a single-entry queue can solve both challenges. The single entry that is stored in the queue replaces the SRs. Instead of putting the data in the SR it will go into the queue entry.

 

If we create a unique queue for each instance of the Single-Queue-Entry-AE (SQEAE) then we can apss the queue ref to the SQEAE effectivly telling it "do this operation on this data set". The SQEAE would be largly the same as an normal AE except;

 

1) Data is read from the queue and the updates are put back in the queue.

 

2) THE SQEAE doe NOT have to be non-reentrant (? Sanity check requested here! ?)

 

Re: the design of the SQEAE

 

When designing AE I kinda try to apply normalization rules. I try to only group related data structures that are used together. If two sets of info have nothing to do with each other they generally end up in different AEs. Depending on the nauture of your data sets and their relatinships to each other it sometimes is useful to have nested AEs (Users AE calls User_Groups AE when required to ad anew user but most of the time just accessing teh User AE is enough).

 

Is any of this helping?

 

Done rambling.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 13 of 15
(890 Views)

Hi Ben,

 

     It is very helpful. Thanks a lot!

 

     Tom

Message 14 of 15
(870 Views)

You are welcome Tom.

 

When you have somthing that you fele will meet your needs please let us know how you handled it. I suspect there a few lurkers out there that would like to hear about your solution.

 

Ben

 

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 15 of 15
(866 Views)