With an AOI, an associate data type will be defined. Therefore, every time I call an AOI I have to create a tag/instance of that type in order to compiles. I just want a simple function like a MOV function where I only need ma source and a destination. Also I'm using ladder logic.
You don't "...have to create an instance..."...You create the AOI only once...It will be in the Instruction Pallete just like your (apparently favorite) MOV...Just drag it onto a rung and define your INs (Sources) and OUTs (Destinations)...Just like your favorite MOV...Use any language you are capable of programming with...LAD, FBD, ST...
..and most importantly...READ THE MANUAL!...before having any opinions...
Apparently I've created an AOI before I made this post. FROM the MANUAL you are required to have an InOut Parameter which is an a tag with AOI data type. I can create a global tag and use it every time I call the AOI, but I don't want to create a tag that could cost confusion for someone else that try to use the function.
It seems you are trying to implement a Siemens feature within a Rockwell platform.
Logix platform does not offer Siemens user defined FC-like instructions but user defined FBs and they are referred to as AOI; they do have "memory" when implemented, however, the inconsistency with Siemens' FCs is the name of the "instance"; the required IN and OUT parameters will differ with each occurrence.
Name each "instance" with the intended functionality followed by a number or letter since each "instance" will perform the same function within a different application : e.g. StartStop_Pump_1, StartStop _Pump_2, etc. or SpeedReference_Conveyor_A, SpeedReference_Conveyor_B, etc.
Third, if you have a global instance and want to use it in other AOIs you are violating separation of concerns.
Oh it was suggested to me in a similar thread on Reddit.At least no one suggested the use of parameters in subroutines... which is probably far worse with regards to separation and "hacking" a function.
Good I'll keep up the good work.We get it dude, from all your posts, you hate Rockwell Automation.