Effects of Response Time / 響應時間的影響
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.
現在我們知道了響應時間,下面就說說它對應用程式的真正含義。PLC隻有在查找輸入狀态時才能看到輸入點是開還是關。換句話說,它隻在一個掃描階段的輸入狀态檢查部分才檢視其輸入。(一個掃描階段包含:輸入狀态檢查部分—程式執行部分—輸出狀态更新部分)

In thediagram, Input 1 is not seen until scan 2. This is because when input 1 turned ON, scan 1 had already finished looking at the inputs.
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.
在上面時序圖中,直到第2掃描階段(SCAN2)才能看到輸入1的打開狀态。這是因為當輸入1打開時,第1掃描階段(SCAN1)已經完成了對輸入1的狀态的檢視。
直到第3掃描階段(SCAN3)才能看到輸入2的打開狀态。這也是因為當輸入2打開時,第2掃描階段(SCAN2)已經完成了對輸入2的狀态的檢視。
永遠看不到輸入3的打開狀态。這是因為當第3掃描階段(SCAN3)檢視輸入3的狀态時,輸入3還沒有打開,但在第4掃描階段(SCAN4)檢視輸入狀态時它又已經關閉。是以,輸入3的打開狀态永遠不會被PLC看到。
To avoid this we say that the input should be on for at least 1 input delay time + one scan time.
為了避免這種情況,我們說輸入打開時間應該至少有一個輸入延遲時間加上一個掃描周期時間。
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.
但是如果輸入不可能有這麼長時間呢?然後,PLC就看不到輸入打開的狀态。那麼我們就不用管這種情況了嗎?不,不,那是不行的……當然,肯定有辦法解決這個問題。實際上有兩種方法解決這個問題。
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.)
脈沖擴充功能:該功能擴充輸入信号的長度,直到PLC在下一次掃描周期内檢視輸入信号。(即,它延長了脈沖的持續時間。)
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.
中斷功能:此功能可以中斷掃描,以處理您編寫的特殊例程。例如,隻要輸入打開,無論目前掃描周期在哪裡,PLC都會立即停止它正在做的事情,并執行中斷例程。(例程可以看作是主程式之外的一個小程式)。在它執行完中斷例程之後,它回到它停止的地方,繼續它正常的掃描過程。
Now let's consider the longest time for an output to actually turn ON. Let's assume that when a switch turns ON we need to turn ON a load connected to the PLC output.
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.
現在讓我們考慮一個輸出點實際打開的最長時間。讓我們假設,當一個輸入點打開時,我們需要打開一個連接配接到PLC輸出點上的負載。
下面時序圖顯示了輸入點打開後輸出點打開的最長延遲時間(最壞的情況是直到第2掃描階段SCAN2才看到輸入點打開狀态)。
是以最大的延遲時間是2個掃描周期時間減去1個輸入延遲時間。
It's not so difficult, now is it ? / 這并不難,不是嗎?