g.mccormick
Lifetime Supporting Member
I would like to use this thread to ask for opinions on methods/practices. I am starting on a fairly large complete rewrite of code for several systems and I would like to "do it correctly". So, I ask for some opinions here.
1. I have an AOI for dealing with analog inputs. This AOI does scaling, filtering, alarming, etc. The systems I am working on have between 16 and 64 analog inputs. Do you have individual instances for each AOI call, or just reuse the same instance? I can see an argument for each way. If individual instances and you're not using in a loop, I can see the values in code for each instance. This could help with troubleshooting, but I also can/will have the AOI data type be equal to my analog input data type and pass by reference.
If I just use one instance, I save creating a lot of unused tags.
More questions will come as I think of them.
1. I have an AOI for dealing with analog inputs. This AOI does scaling, filtering, alarming, etc. The systems I am working on have between 16 and 64 analog inputs. Do you have individual instances for each AOI call, or just reuse the same instance? I can see an argument for each way. If individual instances and you're not using in a loop, I can see the values in code for each instance. This could help with troubleshooting, but I also can/will have the AOI data type be equal to my analog input data type and pass by reference.
If I just use one instance, I save creating a lot of unused tags.
More questions will come as I think of them.