

If you have data structures that are dependant on other data structures, then you can call one action engine from within another action engine.Offering Expert Exterior Lighting Install & Repair Electrician Semaphore Adelaideįor high quality lighting and exterior lighting setup solutions in Semaphore, you can depend on our reliable service and professional experience. AS long as it is inside the action engine, other attempts to manipulate the data are forced to wait until the previous is complete.

When designing your action engines, make sure that any manipulation of your data structure takes place inside the action engine.

It is this "locking" that helps us prevent race conditions when using action engines. LV in the background miantians a set of mutexes to prevent more than one call to take place at any one time. This is the key to what makes these action engines powerful. Now to prevent the wires of a shared non-re-entrant VI form having to hold the values from more than one call, only one of the calls is allowed to execute at anyone time. This means if I leave some data behind from one, a latter call can get at that data. Now if the VI is NOT re-entrant, they have a single data space for every instance of the VI. The district data space makes it impossible (?) to share the data across instances.

If they are re-entrant, they can be executed at the same time by more than one caller, and this is made possible by giving each instance a distinct data space. The Action and LV2 have to be set as NOT re-entrant to work. It greatly simplifies the management of shared data structures in what I feel is a very elegant manor. LV2 with brains.Īny time I have a data structure that must be manipulated from more than one place, I will concider using an Action Engine. Those VI's comprise a very simple example of the "Action Engine" i.e. Please see the examples I posted in reply #13 & 14 of this thread. Ps: apologies if this makes no sense at all! if I have getA, "do something", setA (where getA means get from LV2 global in position A in the code) then its possible that if "do-something" take too long it can be interrupted by getB-setB, so the sequence would be getA-"do something"-getB-setB-setA, and the LV2 setA operation would NOT retain the value just set in the setB as it would use its previously read value from the getA operation. This seems to work fine in simple apps, but when I have multiple get-set operations it is possible that a normal get-set sequence can be interrupted by another get-set sequence somewhere else in the code? ie. So every time I wish to set a variable I have to use the Get function (to retrieve the previous contents of the LV2) and then pass that cluster into a bundle-by-name which has the new value of the (usually) single element of the cluster I wish to change. Regarding LV2 style globals, do I need separate accessor methods for each variable that I wish to change? Currently I only have a single set and get function which operates on a large cluster of variables. I think I know whats going wrong with my program.
