Professional Documents
Culture Documents
This is a short document explaining the simple features of Add On Instructions, embedding those
instructions into User Defined Datatypes, and passing parameters with them.
Next you will configure the parameters. These can be Input, Output, and InOut. For this example we will
only be using Input and Output.
Be sure to give the parameters meaning, but non specific names. These will be added to a base tag
name that will define the unit or equipment.
Next I have added some local tags. These are similar to the difference between controller tags and
program tags. The local tags cannot be accessed outside of the instruction. For these I typically create
timers, one shots, or temporary, virtual tags.
Now we see the logic in the AOI. This is a simple pump control circuit that can be used over and over
again. This will be the base code used for each unit that uses the AOI.
Now we will go a step further and create a User Defined Datatype called BasePumpCode. In this we will
add the SimplePumpStarter we created and also add some AlarmAnalog AOI’s that were created
previously. The AlarmAnalog has been dimensioned to 10 to create 10 alarms in the UDT.
Now create a controller tag with Data Type of the UDT we created BasePumpCode.
Basic functions are another good use of AOI’s.In the next example the AOI is taking an array of stored
values for Inputs, checking for valid readings, averaging them, then outputting this to Average.
The array is dimensioned to 500 in this example to allow plenty of room. The SampleCount input
parameter is where you enter the actual max limit of the array.
- Conveyor control
- PID / PIDE
- Indirect addressing
- Hourly production reporting
- HMI animation
- Machine control
- Valve control
- Any code that is repetitive