Hi,
I am preparing some up front design patterns for a new project we are about to get, with requirements that will exceed our previous software projects. And I have some questions, the main one being "Is LVOOP a good direction to go in?", taking into account (by order of importance) performance, modularity, maintenance, reliability.
I use the latest LabVIEW 2013 and I would consider myself fairly experienced at LabVIEW (CLD, 4 years of professional development) and Vision Development Module. I have some background in micro-controller programming (C) and I developed several LabVIEW applications for Machine Vision systems, which were all using a single PC + GigE ethernet camera. Almost all apps follow the same top level flow: 1) acquire image -> 2) process image -> 2) update UI -> 3) signal result via I/O -> 4) save image to disk. I use the JKI State Machine for all my projects and it works fine. The biggest challenge is the time constraint (performance optimizations) and memory management (no locals, use of in-place structures, etc.), because of high demands regarding inspections per second. Images are at least 1600x1200px large, sometimes up to 4000px, so RAM usage is usually critical.
For the upcoming project, we will have to use 4 computers (each with a GigE camera and touchscreen panel), a compactRIO for machine control. All results and images will have to be continuously uploaded to company server. See image for a simple layout:
Each PC will have to perform high-rate image acquisition and processing, and also communicate with other PCs and cRIO (signal errors, stop signal, etc) and send images via ethernet to server.
I am worried that all these tasks are too much for the JKI State Machine, so I started looking to LVOOP - but I have no previous experience with OOP. Since I come from C programming where OOP is almost non existent, I am having some problems converting my thinking mindset from a task based approach to an OO approach. I've read some LVOOP literature, especially Applying Common Object-Oriented (OO) Design Patterns to LabVIEW where design patterns are listed, but I do not know which is good for which task.
I would like to use as much reusable code as possible and the same main framework for all applications, allowing each function (or plug-in) to be developed and maintained separately, but running on the same core exe. My idea so far:
1) a plugin based framework for the main core application, which would be the same for all 4 PCs. The appropriate Vision (image acq+processing) module or plugin would be loaded at startup (selected by user or auto by config file).
1A) what would be the best way to implement a settings menu in a plugin based framework. I would like to have the image acq+processing plugin to be running, while the operator is changing parameters - by my current understanding, if the settings menu is a plugin, the vision plugins stops working. Also, how do you recommend to handle and store settings? XML, LabVIEW Config files, something other?
2) Vision (image acq+processing) module or plugin would use either a Command pattern or a Factory pattern or maybe a basic JKI state machine. Which do you suggest performance wise? Also, how much overhead does subpanels and subvis (plugins) add to the overall application?
3) Which type of communication between applications and cRIO do you recommend? Shared network variables? TCP? Are JKI Public Private Events suitable for this?
4) By my current understanding of LVOOP it would be even possible to make the image acquisition process a class, and have different public methods for different cameras (and also a simulated camera, which would load images from a folder). Does this impact performance of acquisition?
5) Just curious: does this qualify as a large app?
Questions and comments on direction(s) both for planning or coding would be highly appreciated. The more I read about LVOOP the more I like the general idea behind it, but I am having trouble trying to adapt it to my needs.