The Add On Instruction included in this ZIP file performs four functions.  

1. It takes the two words of position data from the NR25 and combines them into one DINT register.  
2. It takes the two words of velocity data from the NR25 and combines them into one DINT register.  
3. Based on the state of an input register, it offsets the position data to the Preset Value.  That is, it Applies the Preset Value to the position data.  
4. Based on the state of an input register, it saves the offset value generated by an Apply Preset operation in the NR25s flash memory.  


The AMCI_NR25_AOI uses the following required parameters. 


NR25_INPUT = Four 16 bit words that must be referenced to the input data from the NR25 encoder.  

NR25_OUTPUT = Three 16 bit words that must be referenced to the output data sent to the NR25 encoder.  

NR25_PROGRAM = An input parameter to the AOI that consists of one 16 bit word used to command the programming of the NR25 encoder.  Set this register to 1 to set the NR25s position to the Preset value (Apply the Preset).  Set this register to 2 to set the save the offset value generated by an Apply Preset operation in the NR25s flash memory.  

NR25_COMBINED_POSITION = An output parameter from the AOI that consists of one 32 bit DINT register that will contain the result of combining the two 16 bit position data words into one DINT register.  

NR25_COMBINED_VELOCITY = An output parameter from the AOI that consists of one 32 bit DINT register that will contain the result of combining the two 16 bit velocity data words into one DINT register.  

NR25_PRESET_VALUE = An input parameter to the AOI that consists of one 32 bit DINT register that contains the value that you want the NR25s encoder to become when you perform an Apply Preset operation.  
