ProTool 6.0 SP3 Configuring Function Keys to Set/Reset Bits

David Krause12 min read
HMI ProgrammingSiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

ProTool 6.0 SP3: Configuring Function Keys to Set/Reset Bits on OP17

This reference documents the exact procedure for binding function keys F1 and F2 on a Siemens OP17 operator panel to a single bit address (M0.0) in the connected SIMATIC S7 PLC, using ProTool/Pro V6.0 SP3 as the configuration editor. The same workflow applies to any discrete PLC bit (inputs, outputs, flags, or data-bit DBx.DBXy) and to most OP3x / OP7x / OP17 text panels configured in ProTool V6.x.

The procedure was clarified in the original support thread: function keys in ProTool are screen-scoped, the bit-manipulation function is named Set_Bit_in_Tag (or Reset_Bit_in_Tag), and the simple Calculate » Set Value action must not be used to write a single bit — it overwrites the entire tag word, which is the typical reason a first attempt fails silently.

Important scope limitation: The legacy Set Bit / Reset Bit function-key actions are restricted to the OP 3 and C7-621 panels in ProTool V6.0. For every other panel — including the OP17 — the bit-manipulation must be done through the Set_Bit_in_Tag / Reset_Bit_in_Tag system functions, not through the direct function-key dialog.

1. Overview and Architecture

ProTool/Pro V6.0 SP3 is a 32-bit Windows configuration suite (Win98 / WinNT 4.0 / Win2000) for Siemens text and graphics operator panels. It communicates with the target panel via serial, MPI, PROFIBUS, or Ethernet, and with the PLC through the panel's own MPI/PROFIBUS interface.

For the OP17 (a 4-line, 20-character-per-line text display in the OP17/DP variant), function keys F1…Fnn are physical membrane keys on the front foil. Each key is assigned, per screen, to one or more events. The relevant events for this procedure are:

Event Trigger Typical Use
Press Key contacts close Set a bit, increment a counter, navigate
Release Key contacts open Reset a bit, acknowledge

Because the events are per-screen, the F1 » Set M0.0 binding must be repeated on every screen where the operator should be able to set the bit, or moved to a global area (global function-key assignment) where the panel supports it.

2. Prerequisites

Item Requirement
Configuration software Siemens ProTool/Pro V6.0 SP3 (or later V6.0 service pack)
Panel firmware OP17 with PROTOOL firmware; transfer protocol matched in ProTool (e.g. OP17 / DP)
PLC SIMATIC S7-200 / S7-300 / S7-400 with bit memory area available (M0.0 default)
Cable PC ↔ OP17 serial or MPI download cable, OP17 ↔ PLC MPI/PROFIBUS
Project Existing ProTool project, compiled, downloaded at least once
Tag area permission The connection must allow the tag address used (M0.0 in STEP 7 » Accessible Bits must be enabled for HMI access)
Tag-access note: If the PLC project is password-protected or the M area is excluded from HMI read/write in STEP 7, the panel will receive an error 0x02 / "Address not available" on download. Verify the address area in STEP 7 » PLC » Properties » Communication » Access Points before continuing.

3. Why Calculate » Set Value Fails for Bit Operations

The Set Value action (under Functions » Calculate) writes a complete numeric value to a tag. The smallest atomic unit ProTool will write is one byte, not one bit. Writing 1 to tag MB0 therefore sets bits M0.0…M0.7, while writing 0 clears all of them. The user cannot isolate M0.0 with this action.

The correct primitive is a bit-mask write, but ProTool's standard Set Value function does not expose a mask argument. The only ProTool-supplied functions that act on a single bit inside a tag are:

  • Set_Bit_in_Tag (function number 13 in the ProTool system-function catalogue)
  • Reset_Bit_in_Tag (function number 14)

These are not visible from the "Tag:Set Value" dialog; they live in the system-function list and are selected by name. The thread responder pointed the user to the Online Help search box — searching for the exact strings Set Bit in Tag, Reset Bit in Tag, or Set_Bit_in_Tag will surface the function reference. If the function does not appear in the editor, the project target may have been changed to OP3 / C7-621; reverting the target to OP17 restores the function list.

4. Step-by-Step: Binding F1 to Set M0.0

  1. Open the ProTool project in the configuration editor.
  2. In the project tree, expand Screens and open the screen that should host the F1 action (the assignment is per screen, so repeat for every screen that needs it, or move the binding to a global function-key layer if the panel supports it).
  3. Click the F1 key on the on-screen panel preview to select it. The properties dialog for the function key opens.
  4. Switch to the General tab. This is the tab named in the thread as the location of the tag "projection" (i.e., the tag binding).
  5. Under the Press event (not Release), click Add » Function » Edit / Bit » Set_Bit_in_Tag.
    • Function number: 13 (decimal) in the ProTool system-function catalogue.
  6. In the function parameters, fill the following fields:
Parameter Value Notes
Tag MB0 (or the byte containing the bit) Pick the byte, not the bit
Bit number 0 0-based: bit 0 of MB0 is M0.0
Bit value 1 (set) 1 sets, 0 resets
  1. Click OK to close the function dialog, then OK again to close the function-key properties.
  2. Save the screen (File » Save).

5. Step-by-Step: Binding F2 to Reset M0.0

  1. Open the same screen (or, again, repeat per screen).
  2. Select the F2 key in the preview.
  3. In the General tab, on the Press event, add the function Reset_Bit_in_Tag (function number 14).
  4. Parameters:
Parameter Value Notes
Tag MB0 Same byte as F1
Bit number 0 Same bit index
  1. Click OK, save the screen.
  2. Repeat for every screen that should expose the reset.
Bit-number indexing: In ProTool the bit index is 0-based. To act on M0.7, set Bit number to 7. The address MB0 exposes bits M0.0 … M0.7; the address MB1 exposes M1.0 … M1.7, and so on.

6. Visual Binding Summary

Screen "Main"
+--------------------------------------------------+
|  F1 (Press)  -> Set_Bit_in_Tag  (MB0, bit 0 = 1)  |
|  F2 (Press)  -> Reset_Bit_in_Tag(MB0, bit 0)      |
|  F3 ... (other screen-local bindings)             |
+--------------------------------------------------+
                  |
                  v
            PLC Bit M0.0  (set / reset)

7. Tag Configuration Requirements

The tag referenced by Set_Bit_in_Tag must exist in the Tags area of the ProTool project and must point at the correct address. A typical configuration for M0.0:

ProTool field Value
Name PLC_M0_0 (or any descriptive name)
PLC SIMATIC S7 300/400 (or S7-200, matching the target)
Address MB 0
Data type BYTE (or WORD / DWORD; the function still picks a single bit inside)
Access read/write
Length 1
Update cyclic on use
Do not create the tag as a BOOL data type. ProTool V6.0 expects BYTE/WORD/DWORD for Set_Bit_in_Tag inputs, and the bit index is then used to select the position inside. A pure BOOL tag is only valid for I/O-area panel points on supported panels.

8. Alternatives and Workarounds

8.1 Toggle with a single key (press = invert)

If the goal is a single key that flips the state, neither Set_Bit_in_Tag nor Reset_Bit_in_Tag supports that natively. A common workaround is to use a PlcJob / Invert_Bit_in_Tag where available, or to add two functions (set and reset) on Press and Release of the same key, accepting that the bit is briefly low while the key is held.

8.2 Using the Release event

For a key that should set on Press and reset on Release (e.g. a jog button), assign Set_Bit_in_Tag to the Press event and Reset_Bit_in_Tag to the Release event of the same key. The Release event is the second line in the function-key properties » General tab and is independent of the Press event.

8.3 PLC-side logic as a fallback

If Set_Bit_in_Tag cannot be found in the project, the legacy technique is to bind the function key to Set Value with the tag MB0 and a value computed by the PLC: read the current byte, set/clear bit 0, write it back. This requires an S7 FB or STL routine and is not a ProTool-only solution; it is documented here for completeness when the bit-mask functions are unavailable.

8.4 Global function-key assignment

On panels that support it (OP17 with sufficient firmware), the binding can be defined in System » Global Function Keys instead of inside every screen. The same parameters (Tag, Bit number, Set/Reset) apply. This avoids the per-screen repetition and is the recommended approach for widely-used control bits.

9. Verification

  1. In ProTool: File » Compile » Incremental. The compile must report zero errors and zero warnings related to the function-key events.
  2. Download the project to the OP17 (File » Download » To OP17). Confirm the transfer completes with no PLC address errors.
  3. On the panel: navigate to the screen where the binding was made. Press F1 — the operator message "Set_Bit_in_Tag OK" should not appear (the function is silent on success). On the PLC, monitor M0.0 in STEP 7 » Monitor/Modify; it should transition to 1.
  4. Press F2 — M0.0 should transition to 0.
  5. Toggle repeatedly to confirm there is no debounce or address-flip problem (a common symptom: F1 sets M0.7 instead because the bit index was entered 1-based by mistake).
  6. Power-cycle the panel and PLC; verify the bit state is restored from the PLC's retentive area, not latched by the panel (the panel never latches — it only writes).

10. Troubleshooting Matrix

Symptom Likely Root Cause Remedy
Function-key dialog shows no Set_Bit_in_Tag entry Project target is set to OP 3 or C7-621 (legacy direct Set Bit is shown instead), or to a panel that does not support the function Project » Properties » Target » change to OP17 (or compatible OP3x/OP7x); the function reappears
Function key does nothing on the panel Function assigned on a different screen; per-screen scope not understood Repeat the assignment on the actual active screen, or move to Global Function Keys
M0.0 sets, but a neighbour bit also flips Bit index entered 1-based or wrong byte selected Re-check: M0.0 = MB0, bit 0. M0.7 = MB0, bit 7. M1.0 = MB1, bit 0
Panel shows "Address not available" or system error 0x02 M area excluded from HMI access in STEP 7, or wrong CPU selected in ProTool connection STEP 7 » PLC » Properties » Communication » enable the M area for the HMI connection; verify the connection in ProTool » PLC » Connection
Calculate » Set Value writes the whole byte Wrong function chosen for a bit operation Switch to Set_Bit_in_Tag / Reset_Bit_in_Tag; never use Set Value for single-bit writes
Function appears in greyed-out form Tag not compiled or has read-only access Open Tags and set access mode to read/write
Bit toggles too fast (race condition in PLC) PLC OB1 scan faster than expected; Press/Release both wired Use only one of Press or Release for a simple set; the other is wired to the opposite function only for jog applications
Compilation warns "Function not supported on target" Target panel does not include the bit-mask functions Use a different panel model (OP17 supports them; OP3 and C7-621 are exceptions), or fall back to the PLC-side toggle workaround

11. Compatibility and Migration Notes

ProTool V6.0 SP3 is the last service pack of the ProTool/Pro generation. It is fully supported on Windows 2000 / XP for offline configuration. Siemens has since transitioned to WinCC flexible (2004–2013) and then to the TIA Portal / WinCC family, both of which import ProTool V6.0 projects and preserve function-key events including Set_Bit_in_Tag / Reset_Bit_in_Tag.

When migrating to WinCC flexible:

  • Open the ProTool project in WinCC flexible 2008 SP2 or later; the converter flags per-screen function-key events.
  • The functions are renamed SetBitInTag / ResetBitInTag but the parameters (tag, bit number, value) are identical.
  • The legacy Set Bit action that was only available on OP 3 / C7-621 is no longer supported in WinCC flexible; the new bit functions apply to every panel.

When migrating to TIA Portal:

  • Use the "Migrate project" wizard in TIA Portal V13 or later.
  • Function-key bindings import as Events » Press » SetBitInTag.
  • The OP17 itself is not a directly supported TIA Portal target; projects typically migrate to a KTP or Comfort panel with the same F-key layout.
Firmware field advice: On OP17, function-key events are executed by the panel firmware at every press, regardless of screen focus, when bound as Global Function Keys. When bound per-screen, they are executed only while that screen is the topmost. Always confirm by triggering from each screen the operator may legitimately use.

12. FAQ

Why does the OP17 not show the "Set Bit" function in the function-key dialog?

In ProTool V6.0, the direct Set Bit / Reset Bit actions in the function-key dialog are restricted to the OP 3 and C7-621 panels. For the OP17, use the Set_Bit_in_Tag and Reset_Bit_in_Tag system functions (numbers 13 and 14) and address the byte containing the bit (e.g. MB0) plus the 0-based bit index (e.g. 0 for M0.0).

Can I toggle a single bit with one function key on the OP17?

ProTool V6.0 does not expose a native invert/toggle primitive. Use two keys (one set, one reset) or assign Set_Bit_in_Tag to Press and Reset_Bit_in_Tag to Release of the same key for a momentary toggle. For a true latched toggle, implement the invert logic in the PLC (read MB0, XOR 0x01, write MB0) and trigger it from a ProTool Set Value action.

Why does Calculate » Tag: Set Value not work for M0.0?

Set Value writes an entire numeric value to the whole tag, not to a single bit. Writing 1 to MB0 sets bits M0.0…M0.7; writing 0 clears them. To act on M0.0 alone, use Set_Bit_in_Tag (or Reset_Bit_in_Tag) with byte MB0 and bit index 0.

How do I find Set_Bit_in_Tag in ProTool 6.0 SP3?

Open the Online Help (F1) and search for the exact strings Set Bit in Tag, Reset Bit in Tag, or Set_Bit_in_Tag. The function reference lists the parameters and a link to the system-function number (13 / 14). If the function still does not appear in the function list of an event, the project target may be set to OP 3 or C7-621; change the target to OP17 in Project » Properties.

Do I have to bind F1 / F2 to Set/Reset M0.0 on every screen?

Yes, when the binding is configured under Screens » [screen name] » Function Keys; function-key events in ProTool V6.0 are per-screen. If the OP17 supports global function keys (System » Global Function Keys), configure the binding there once to apply it across the whole project. After configuration, compile and download the project, then verify M0.0 toggles in STEP 7 » Monitor/Modify when F1 and F2 are pressed on the panel.

Back to blog