AS Series Programming Manual Note: You must set the lower bound ( S 2 ) to be less than the upper bound ( S 3 ). If you set the zone boundaries incorrectly, the PLC automatically makes the adjustment. 3. If S 1 specifies a hardware counter and the value of the specified counter reaches the lower bound ( S 2) or the upper bound ( S 3 ), the DHSZ instruction makes the comparison immediately according to the count direction (up/down). The comparison condition and output state are shown in the following table. 4. If the device specified by D is Y0.0–Y0.15, the comparison result is output to the external 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. _6 5. Refer to the DHSCS instruction (API 1005) for more information on the high-speed zone comparison. Example 1. When D is specified as Y0.10, Y0.11–Y0.12 are also specified automatically. 2. The instruction compares the current value in HC200 with the upper/lower bound (1500/2000) of the comparison zone, and one of Y0.10–Y0.12 is ON according to the comparison result. 3.
When the current value in HC200 When the current value in HC200>=2000, Y0.12 is ON. 6-284 Count direction Comparison condition D+0 state D+1 state D+2 state Count up The count value of S == the lower 1 bound (S ) 2 OFF ON OFF The count value of S == the 1 upper bound (S ) 3 OFF OFF ON Count down The count value of S == the lower 1 bound (S ) 2 ON OFF OFF The count value of S == the 1 upper bound (S ) 3 OFF ON OFF