I typically develop a FGV Controller for functions or instrument controls. These controllers usually perform functions such as: Initialization (Open), Setup or Configuration, Write, Read, Close. Examples: Power Supply control or Timing control (or like Logging, see attache example).
What happens whens when you need multiple instances of your FGV controller? Since it is non-reEntrant, you may want to copy it for each usage. This leads to duplicate code, which is something I'd like to avoid.
Here is a method that I welcome critique and alternative solutions as feed back....
If you make your core function a ReEntrant VI, (as I did on the attached Example), you can reuse it without code duplication.
This would require you to pass info (that was stored in the FGV shift register) into the reEntrant VI each time it is used.
One solution is to create a FGV_WrapAround that maintains the FGV properties, but allows you to use the clone VI internally.
I know that there are many other solutions out there...
NI Community, What have you found is a good method to handle encapsulated functions while allowing multiple use (without duplicating code)?