Delta Electronics — 6.11.2 Explanation of Timer and Counter Instructions

AS Series Programming Manual Symbol S 1 : Counter number S 2 : Comparative value D : Comparison result _6 Explanation 1. Use this instruction with high-speed counters with numbers HC200 and above. If the value in the high-speed counter specified by S 1 changes by increasing or decreasing by 1, the DHSCS instruction makes the comparison immediately. When the current value of the high-speed counter is equal to the comparative value specified in S 2 , the device specified by D changes to ON. After that, the device specified by D remains ON even if the comparison result is that the current value and the comparative value are not equal. 2.

If the device specified by D is Y0.0–Y0.15, and the value of S 2 is equal to the current value , the comparison result of the high-speed counter is output to the output terminals Y0.0–Y0.15. Other Y devices are affected by the scan cycle, but this instruction updates all devices immediately and is not affected by the scan cycle. For PLC with FW V1.06.00 (V1.06.00 included) or later versions, devices Y0.12 ~ Y0.15 are affected by the scan cycle. 3. The D operand can also specify an I interrupt device between 1200–1267. 4. The high-speed counters are divided into software counters and hardware counters.

The available high-speed comparators and interrupt device numbers are listed in the following table. 6-276 API Instruction code Operand Function 1005 D HSCS S , S , D 1 2 Setting high-speed comparison Device X Y M S T C HC D FR SM SR E K 16# “$” F S 1  S 2    D     BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S 1  S 2   D  Pulse instruction 16-bit instruction 32-bit instruction - - AS