LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Better architecture for a Vision application 80% generic (all customers) and 20% specific (one customer)

Solved!
Go to solution

Hi all

 

We are a small vision company that develop dedicated Vision inspection systems for our customers. These systems are installed on production lines and inspect 100% or products.

The main HMI of this application is always the same (way of displaying images, showing current logged user, functionning mode, managing parameters, etc...) which represents around 80% of the code.

Using a dedicated set of parameters we can customize number of cameras used for instance and a lot of other things, but the image processing algorithm (and sometimes the way we communicate with the PLC) is always dedicated to a specific system.

For now, in the code, we simply use PPL to store all the algorithms (1 PPL for 1 specific algorithm) and the call to either one or another PPL is done in the main application using "Conditionnal Disable Structure"...

Obvisouly, the code is growing all the time and is more and more difficult to maintain.

Have you got any suggestions of base architecture to do it better?

 

Thanks for your help

 

Lionel

0 Kudos
Message 1 of 4
(1,923 Views)
Solution
Accepted by topic author CAPTIC_LA

This sounds like the school example of object oriented approach. 🙂

Instead of conditional disable you should have a class for each use case, there by loading/injecting a class you'll determine the behaviour.

I would assume a config file determining which class to load so you'll 'just' have to configure the system.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 4
(1,907 Views)

Thanks for your answer.

When you say using a config file to know which class to load, you mean "dynamically" loading, in order not to have all the childs' code permanently included in the main application code?

0 Kudos
Message 3 of 4
(1,888 Views)

@CAPTIC_LA wrote:

Thanks for your answer.

When you say using a config file to know which class to load, you mean "dynamically" loading, in order not to have all the childs' code permanently included in the main application code?


Yes, that's one way of doing it. Or, depending on the size and other factors you have all classes in the application code but just create/instanciate the ones needed. I don't know how much PPLs influence this so it's a little trial and error. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 4
(1,855 Views)