Response Time Concerns
Now that we know about response time, here's what it really means to the application. The PLC can only see an input turn on/off when it's looking. In other words, it only looks at its inputs during the check input status part of the scan. Input 2 is not seen until scan 3. This is also because when the input turned on scan 2 had already finished looking at the inputs.
Input 3 is never seen. This is because when scan 3 was looking at the inputs, signal 3 was not on yet. It turns off before scan 4 looks at the inputs. Therefore signal 3 is never seen by the plc.
But what if it was not possible for the input to be on this long? Then the plc doesn't see the input turn on. Therefore it becomes a paper weight! Not true... of course there must be a way to get around this. Actually there are 2 ways.
Pulse stretch function. This function extends the length of the input signal until the plc looks at the inputs during the next scan.( i.e. it stretches the duration of the pulse.) | |
Interrupt function. This function interrupts the scan to process a special routine that you have written. i.e. As soon as the input turns on, regardless of where the scan currently is, the plc immediately stops what its doing and executes an interrupt routine. (A routine can be thought of as a mini program outside of the main program.) After its done executing the interrupt routine, it goes back to the point it left off at and continues on with the normal scan process. | |
The diagram below shows the longest delay (worst case because the input is not seen until scan 2) for the output to turn on after the input has turned on.
The maximum delay is thus 2 scan cycles - 1 input delay time.
1 comment:
Why ????? May be 2 scan cycle - 1 output delay ?????
Post a Comment