1.使用加計數(shù)指令,遞增輸出CV的值。
2.每當輸入信號CU的狀態(tài)從“0”變?yōu)?ldquo;1”(即信號上升沿),就會執(zhí)行該指令,同時輸出CV的當前計數(shù)器值加1。計數(shù)器值會在每次檢測到信號上升沿時遞增,直到達到輸出CV所指定數(shù)據(jù)類型的上限。一旦達到上限,輸入信號CU的狀態(tài)將不再影響該指令的執(zhí)行。簡而言之,該指令會持續(xù)檢測信號上升沿并遞增輸出CV的值,直到達到指定的上限。
3.Q輸出的信號狀態(tài)由參數(shù)PV決定。如果當前計數(shù)器值大于或等于參數(shù)PV的值,則將輸出Q的信號狀態(tài)置位為“1”。在其它任何情況下,輸出Q的信號狀態(tài)均為“0”。
4.當輸入R的信號狀態(tài)變?yōu)楦唠娖剑?ldquo;1”)時,輸出CV的值會被重置為低電平(即“0”)。在此之后,只要輸入R保持高電平狀態(tài),無論輸入CU的信號狀態(tài)如何,輸出CV都將保持不變。

1. Use the add count command to increment the output CV value.
2. Whenever the state of the input signal CU changes from "0" to "1" (i.e. the rising edge of the signal), the instruction will be executed, and the current counter value of the output CV will be increased by 1. The counter value will increase every time the rising edge of the signal is detected, until it reaches the upper limit of the data type specified by the output CV. Once the upper limit is reached, the state of the input signal CU will no longer affect the execution of the instruction. In short, this instruction will continuously detect the rising edge of the signal and increase the output CV value until it reaches the specified upper limit.
The signal state output by Q is determined by the parameter PV. If the current counter value is greater than or equal to the value of parameter PV, set the signal status of output Q to "1". In any other case, the signal state of output Q is "0".
When the signal state of input R changes to high level (i.e. "1"), the value of output CV will be reset to low level (i.e. "0"). Afterwards, as long as the input R remains in a high level state, regardless of the signal state of the input CU, the output CV will remain unchanged.
