Example - Ladder Diagram
HSCSW
The HSCSW instruction counts up or down the pulses from the terminal of the channel, Ch, and accumulates change in pulses in the assigned DWORD data register D.
Ladder Diagram Example
When the contact, M0.0, is powered ON (1), the HSCSW instruction begins high-speed counting.
Since the contact, M0.2, is powered ON (1), the HSCSW instruction is counting backwards.