LabVIEW Development Best Practices Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Develop a large scale app.

Hi, for many years now i have been writing applications. But now i would like to get achitecture correct first for my new project.  In the past ive used achitectures with one main block diagram with lots of loops performing different tasks. With numerous local variables sharing data etc. Not very organised. My new project will include data logging, data display e.g. graphs, indicators, alarms. Instrument control e.g. communicating read/write with plc's siemens, rockwell, rs logic, plus opc. but also the achitecture needs to be modular as data logging will be independent of serveral different process that may be happening. in essense it will be industrial supervisory control, display and data management. Anyone got any good labview achitecture examples?? Any help greatly appreciated.

Stu

0 Kudos
Message 1 of 5
(9,395 Views)

Stu,

Have a look at those two discussions :

"A Call  for Better LabVIEW Design Patterns", http://decibel.ni.com/content/message/15139#15139

"Modular  LabVIEW Application Development", http://decibel.ni.com/content/message/4976#4976

You may also find some potentially useful presentations at http://www.labviewcambridge.co.uk/ (You'll need to create an account first and log in to download them).

This one is also worth looking at : http://lavag.org/topic/3472-creating-a-wizard-like-interface-with-subpanels (having such idea of a front panel in mind may be a good inspiration on how to organize the block diagram)

Let me know if that's what you are looking for.

Jakub

0 Kudos
Message 2 of 5
(3,940 Views)

Stu,

Deffinatly get a copy of The LabVIEW Style Book  by Peter Blume.

Best,

Greg

Gregory Osenbach, CLA
Fluke
0 Kudos
Message 3 of 5
(3,940 Views)

I've been working on an architecture that uses classes to dispatch commands and messages between different loops in an application, which I think may apply to your application.. the code is not ready to be released, but this may help give you some ideas for the architecture of your applications.

Their are a few keys to this application:

1) The 'Execute Command' is dynamically dispatched to execute the appropriate command

2) Each command is a child of the general command class, which can contain custom data and methods

3) Data cohesion is enforced by the 'shifter wire,' which carries on it the only data and references that the loop can operate upon.  This means no local variables, etc... If you need to modify the value of a UI object, you have to seen the appropriate command to the UI Handler in order to do so.

My hope is to release a copy of this code in the next month or so as an example, but I could also share an early copy with anyone who requests it.  Email me at Elijah.Kerry@ni.com

command message handler.png

Elijah Kerry
NI Director, Software Community
0 Kudos
Message 4 of 5
(3,940 Views)

The general consensus for architecting large applications is to break the application down into individual processes, implement each process in a separate VI using a message handler/state machine design pattern and add a (queued) messaging mechanism to transfer and exchange messages, commands and data within and between processes. Each process becomes part of a 1-to-1 or N-to-1 producer/consumer design pattern. The same idea can be applied to a multi-target application by adding a network transport protocol as part of your messaging layer.

The exact nature of how the messaging mechanism is implemented will vary with different implementations, but the underlying design is pretty much the same with most of these. The LabVIEW features most commonly used to implement such a messaging scheme are:

  • Queues
  • Notifiers
  • User Events
  • RT FIFOs
  • Classes and objects using one or more of the above

One specific example of a messaging implementation and associated queued message handler design pattern is the Asynchronous Message Communication (AMC) library, published on Developer Zone. This library and design pattern has been used successfully in a wide range of applications and was designed specifcially for (distributed) industrial control and SCADA applications. If you have any questions on the AMC library, please let me know.

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 5 of 5
(3,940 Views)