1.使用"減計(jì)數(shù)"指令,每次執(zhí)行該指令,輸出CV的值將遞減。
2. 當(dāng)輸入CD的信號(hào)狀態(tài)從低電平(“0”)變?yōu)楦唠娖剑?ldquo;1”)時(shí)(即信號(hào)上升沿觸發(fā)),執(zhí)行該指令,并將輸出CV的當(dāng)前計(jì)數(shù)器值減1。每檢測到一個(gè)信號(hào)上升沿,計(jì)數(shù)器值就會(huì)遞減1,直到達(dá)到指定數(shù)據(jù)類型的下限為止。一旦達(dá)到下限,輸入CD的信號(hào)狀態(tài)將不再影響該指令的執(zhí)行。
3. 如果當(dāng)前計(jì)數(shù)器值小于或等于0,則輸出Q的信號(hào)狀態(tài)將設(shè)置為高電平(“1”)。在其他情況下,即計(jì)數(shù)器值大于0時(shí),輸出Q的信號(hào)狀態(tài)將保持低電平(“0”)。
4. 當(dāng)輸入LD的信號(hào)狀態(tài)變?yōu)楦唠娖剑?ldquo;1”)時(shí),將設(shè)置輸出CV的值為參數(shù)PV的值。只要輸入LD的信號(hào)狀態(tài)仍為高電平(“1”),輸入CD的信號(hào)狀態(tài)就不會(huì)影響該指令的執(zhí)行。

1. Use the "Countdown" command, and each time the command is executed, the output CV value will decrease.
When the signal state of the input CD changes from low level ("0") to high level ("1") (i.e. the rising edge of the signal is triggered), execute this command and subtract the current counter value of the output CV by 1. Every time a signal rising edge is detected, the counter value will decrease by 1 until it reaches the lower limit of the specified data type. Once the lower limit is reached, the signal state of the input CD will no longer affect the execution of the instruction.
If the current counter value is less than or equal to 0, the signal state of output Q will be set to high level ("1"). In other cases, when the counter value is greater than 0, the signal state of output Q will remain low ("0").
When the signal state of the input LD changes to high level ("1"), the output CV value will be set to the value of the parameter PV. As long as the signal state of the input LD remains high ("1"), the signal state of the input CD will not affect the execution of the instruction.
