Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 34914500, Entry date: 01/28/2014

With the function keys of the LOGO! Text Display, how can you increment/decrement a setpoint?

  • Entry
  • Associated product(s)

You can change the values on the LOGO! device using the menu function "SetParam" and selecting the block to be changed.
However, if you want to change setpoint values directly in the Program View, for example, via the LOGO! TD function keys, then you should use the LOGO!Soft Comfort program code provided below.
Hitting the function key once increments or decrements the value and holding the key down increments/decrements the value continuously until you release the function key.

This function is suitable for all applications that need gradual increasing or decreasing of a setpoint value, for example, like the setting of

  • Threshold values (e.g. heating, timers)
  • Speed preset
  • Flow rate
  • Fill level
  • Valve setting

Program code

Fig. 01


No. How it works
1 Key F1 of the LOGO! TDs increases the setpoint value B001 and F2 decreases it.
2 The Exclusive OR block B004 serves to counterlock the function keys in each case.
Thus, if you hit function keys F1 and F2 at the same time, nothing happens.
3 When you hit F1 exclusive or (B004) F2, a positive edge is at the "Cnt" input of the counter B001.
Since F2 defines the negative direction at the "Dir" input of the counter B001, the value of the counter B001 increases by one when F1 is hit once and decreases by one when F2 is hit once.
4 The exclusive OR block B004 also switches the switch-on delay B005, which is set to 2 seconds.
This means that pressing the function keys for longer than 2 seconds activates the pulse encoder B002.
The pulses (here: 5ms duration, 5ms pause) are then forwarded to the counter input "Cnt".
The exclusive OR block B003 ensures recognition of the pulses of pulse encoder B002, because the pulses would not be recognized with an OR-linked single hit or continuous pressing of the function keys.
5 Evaluation and display of the setpoint value B001 is then performed by transfer to other function blocks and in the message text.
Table 01

Modification of the time after which continuous changing of the setpoint value starts, is done by defining the switch-on delay time of block B005.
Modification of how fast the continuous incrementation should be, is done by defining the pulse duration and pulse pause times of the pulse encoder B002.

The download "Setpoint_variation.zip" contains the following files:

File Description
Project "timer.lsc" Sample project in which the switch-on delay time can be changed via the function described.
Input I1 then switches output Q1 with a delay.
Project "heating.lsc" Sample project in which the setpoint temperature of a heating thermostat can be change via the function described.
The actual temperature is simulated and at a temperature difference of >=2.5°C follows up the specified setpoint temperature until the setpoint temperature is reached (hysteresis).
The opening of the heating valve is displayed via output Q1 and the closing via output Q2.
Table 02

Setpoint_variation.zip ( 26 KB )

More information is available in the LOGO! Manual, Entry ID: 50074616

Additional Keywords
Setpoint value, TD, Function keys, F keys, increment, decrement

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
Requests and feedback
What do you want to do?
Note: The feedback always relates to the current entry / product. Your message will be forwarded to our technical editors working in the Online Support. In a few days, you will receive a response if your feedback requires one. If we have no further questions, you will not hear from us.