Hi all,
Just wondering if anyone knows enough about the inner workings of an add-on instruction to answer this question for me:
Does the AOI update it's own inputs and outputs synchronously, or asynchronously?
By which I mean, does the AOI act like an SLC or MicroLogix, in that it
1. Reads inputs
2. Executes code
3. Writes outputs
or does it operate more like a Compact Logix, where inputs could be updated midway through the code, and outputs are updated immediately as they are changed in the code?
My situation is this: I'm writing an AOI which does some sampling of a process variable, and I want to take a certain number of samples and store them in an array. The number of samples is an input parameter can could be changed by a programmer accessing the "faceplate" of the AOI from within the main code, or an operator using a HMI. My array is of a fixed size, and so the first thing I do in the AOI is to use a standard GRT MOV pair to limit the "samples" input to the size of my array. This is all well and good, but what I'm not sure of is, if programmer or operator changes the "samples" input parameter to too high a number while the AOI is partway through executing the code - after my limiting logic, but before it's used as an array pointer - will the "samples" value be updated immediately, and used at it's too high value for the remainder of the logic? Or is it checked at the start of the AOI and not updated again until the next call?
Just wondering if anyone knows enough about the inner workings of an add-on instruction to answer this question for me:
Does the AOI update it's own inputs and outputs synchronously, or asynchronously?
By which I mean, does the AOI act like an SLC or MicroLogix, in that it
1. Reads inputs
2. Executes code
3. Writes outputs
or does it operate more like a Compact Logix, where inputs could be updated midway through the code, and outputs are updated immediately as they are changed in the code?
My situation is this: I'm writing an AOI which does some sampling of a process variable, and I want to take a certain number of samples and store them in an array. The number of samples is an input parameter can could be changed by a programmer accessing the "faceplate" of the AOI from within the main code, or an operator using a HMI. My array is of a fixed size, and so the first thing I do in the AOI is to use a standard GRT MOV pair to limit the "samples" input to the size of my array. This is all well and good, but what I'm not sure of is, if programmer or operator changes the "samples" input parameter to too high a number while the AOI is partway through executing the code - after my limiting logic, but before it's used as an array pointer - will the "samples" value be updated immediately, and used at it's too high value for the remainder of the logic? Or is it checked at the start of the AOI and not updated again until the next call?