If you share with us there may be a different way accomplishing what you are trying to do and still achieve your end result
Well, I got FB_AI and FB_RTD, tested and used FBs for couple of years.UdT data type is IN_OUT variable what is only difference in between every FB_AI or FB_RTD call.
Basically what these FBs does is scale AI or RTD to a measuring value, set some alarms and that's it.
I usually now use 1 network for each FB_AI, but would like to call this in a loop. Size of loop should be defined in hardwera configuration, number of AI/AI RTD channels.