01-31-2007 08:23 AM
01-31-2007 09:25 AM
01-31-2007 09:33 AM
A more serious query; how frequently are you using the following techniques in LabVIEW:
1. Buffered or queued state machine - using a queue or FIFO or something similar to buffer up a series of states in advance
2. A static code framework with dynamic code plug-ins, i.e. you have the core of your LabVIEW application that runs and during run-time you develop new LabVIEW modules that you call dynamically from your main application. I'm thinking of something like a PLC, where you have a static I/O scan engine which retrieves data from I/O channels and places it in a memory store. The core application may also perform data logging or passing data to another application across the network. You then develop VIs for control or process logic that are called dynamically by the core application and interact only with the memory store for their I/O data. The I/O scan engine runs all the time, while the process logic may be updated at run-time.
02-05-2007 07:27 AM
However, what we really need is a Warp-Event Structure, which creates code as you define it. It should come with a Neural Interface to convert brain waves into vi's.
@Christian L wrote:
1. Buffered or queued state machine - using a queue or FIFO or something similar to buffer up a series of states in advance
If this includes the use of Event Structures, then I use "queued events" all the time in my main vi.
2. A static code framework with dynamic code plug-ins, i.e. you have the core of your LabVIEW application that runs and during run-time you develop new LabVIEW modules that you call dynamically from your main application. I'm thinking of something like a PLC, where you have a static I/O scan engine which retrieves data from I/O channels and places it in a memory store. The core application may also perform data logging or passing data to another application across the network. You then develop VIs for control or process logic that are called dynamically by the core application and interact only with the memory store for their I/O data. The I/O scan engine runs all the time, while the process logic may be updated at run-time.
Not quite this elaborate, but I use the Open VI Reference to run VI's that are selected at run-time, thus allowing to develop code in parallel, while the main vi runs. Once ready, it can also be selected and run by a UI.
02-05-2007 09:45 AM
02-05-2007 10:31 AM
02-05-2007 01:07 PM
02-05-2007 11:57 PM
02-06-2007 07:06 AM
@johnsold wrote:
I use a variation of the queued state machine extensively, although under normal conditions I do not expect more than one element in the queue at any given time. Typically I send commands from the GUI loop to the Process loop via queues and the receiving loop uses the information from the queue along with current state information to define the next state. I usually do not queue up the states directly. I find the overhead to insert a higher priority state at the other end of the queue and to decide what to do with already queued states to be more hassle than it is worth given the relatively infrequent need to queue up several states.
I do the same as Lynn. There are 2 variations: 2 loops or 3 loops.
The first loop always contains the Event Structure.
The 2nd loop contains User Interface / Display event handling.
The 3rd loop takes care of any acquisition, number crunching (calculations), etc.
For simpler vi's which have 2 loops, the second loop contain what are descibed in the 2nd & 3rd loops above.
So far, I implement this only in the main UI vi. However, I am now starting to implement it in a sub-vi, which must have an algorithm ( intelligence) to find P1dB faster. In this case, the Event Structure would take care of memorizing past measurements and provide directions for the power adjustment loop.
I want to explore ways of creating more efficient vi's & sub-vi's using this method.
RayR
02-06-2007 09:55 AM
Thank you all for your feedback and answers to my questions. Please keep them coming.
As part of my work in the Systems Engineering group at NI, I am working on designing and developing recommended architectures and application components for use in developing typical LabVIEW applications. These architectures and components are published as Tutorials/Application Notes on DevZone. This is a relatively new project for us and so there aren't a lot of these in place yet. One example of such a component that has been around for a while is the Command-based Communication Architecture for RT-to-Host communication. Of course the common State Machine implementation using a Case structure in a Loop with a shift register could be considered another such recommended infrastructure component. Using queues or FIFOs to extend this to a queued State Machine would be an extension to the recommended architecture.
As LabVIEW applications do vary widely in scope, market, application type, etc. we see more value in providing recommendations for individual infrastructure components (such as a state machine, event handling in a UI, etc.) rather than developing many large architectures for complete applications. These infrastructure components can be used in a range of applications and can be combined 'a la carte' according to the needs of individual applications. In effect, we are not doing anything different than most experienced LabVIEW developers are doing on their own (i.e. developing reusable application components), but we hope to share what we learn and develop with a wider audience and help new LabVIEW developers to come up the application development curve more quickly. Newer LabVIEW users tends to focus on individual features and mastering them, while we focus on the LabVIEW application architecture as a whole before thinking about the specific implementation for each component of the architecture.
Thanks.