04-27-2022 12:47 AM
Hi, i have a problem that i cant seem to figure out so thought maybe i could get some help. Essentially i have a Labview project that monitors the condition of a industrial pump and is more or less working. However, i now want to do 6 pumps of the same code in the same project. The problem i face with just duplicating the code 5 more times is that the code is way too complicated. Anybody have any suggestions?
04-27-2022 01:19 AM
Hi MB,
@MBSHIRAZIZ wrote:
Anybody have any suggestions?
The general/usual suggestion to repeat some code is to use a loop!
The more specific suggestion to handle several objects of the same kind is to use some OOP implementation…
04-27-2022 01:22 AM
Im rather new to this can u explain a little bit what a OOP is and how would i implement the loop?
04-27-2022 01:43 AM
Hi MB,
@MBSHIRAZIZ wrote:
Im rather new to this can u explain a little bit … how would i implement the loop?
When you don't know how to implement a loop in your code then I strongly suggest to look at all the training material offered at the top of the LabVIEW board!
@MBSHIRAZIZ wrote:
Im rather new to this can u explain a little bit what a OOP is…?
When you don't know what OOP is then I suggest to learn about that programming paradigm in general and then learn about its implementation in LabVIEW.
Once you implement your "pump driver" in an OOP clase you can easily create/handle several pumps/objects using the same driver functions…