Hi everyone!
I am planning the development of a new program which uses one oscilloscope and one signal generator.
The program must be able to adapt to different models/brands of oscilloscopes and multiple type of signal generators and be scalable so if we buy another scope it is easy to include it into the software.
When thinking about the problem, three principal solutions come to mind, but I cannot decide for on or the other and was wondering if the forum could help decide (or maybe comment a better way of resolving the problem):
- Option 1: Create a case structure inside all the vis (measure.vi, initialize.vi, close.vi…) which manages the selection of the instruments. This way an equipment type Enum will always be an input of the vi. For example, the measure_scope.vi will contain the program for all the scopes we have.
- Option 2: Create multiples vi for each action and equipment (intialize_siglent.vi, initialize_tek.vi, measure_siglent.vi...) and call the vis by reference.
- Option 3: Create a vi (siglent.vi, tek.vi…) for every instrument which has an Enum input which indicates the function to perform (initialize, measure…). This vi will also be called by reference.
I don´t have code examples since I have not program anything yet if my words are confusing I could develop a quick example.
What does the forum think?