Specifications

SIMATIC Instructions
9-45
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Change Direction in Modes 0, 1, or 2
The following steps describe how to configure HSC1 for Change Direction for
Single Phase Counter with Internal Direction (Modes 0, 1, or 2):
1. Load SMB47 to write the desired direction:
SMB47 = 16#90 Enables the counter
Sets the direction of the HSC to count down
SMB47 = 16#98 Enables the counter
Sets the direction of the HSC to count up
2. Execute the HSC instruction to cause the S7-200 to program HSC1.
Load a New Current Value (Any Mode)
The following steps describe how to change the counter current value of HSC1
(any mode):
Changing the current value forces the counter to be disabled while the change is
made. While the counter is disabled, it does not count or generate interrupts.
1. Load SMB47 to write the desired current value:
SMB47 = 16#C0 Enables the counter
Writes the new current value
2. Load SMD48 (double word size) with the desired current value (load with 0 to
clear it).
3. Execute the HSC instruction to cause the S7-200 to program HSC1.