Integrating the Banner K50 Pro Optical Series Touch Button with a Schneider Modicon PLC

What is an illuminated touch button?

The Banner K50 illuminated touch button is an advanced optical display for harsh industrial environments. The K50PTVAMGRY3Q device as featured in Figure 1 and Video 1 features a multicolor domed indicator with a capacitive touch sensor on the top of the dome and a small motor to provide vibration (haptic) feedback. The capacitive sensor will respond to a gloved hand. The device is designed to operate in harsh environments including direct wash down with pressurized water.

What is the purpose of this engineering brief?

This short article introduces the K50 touch button by focusing on the interface to a Schneider Modicon PLC. Specifically, the TM221CE24T PLC using a ladder logic program. This article will focus exclusively on the indicator portion of the K50 including physical connections to the PLC and associated ladder logic. Future installments will explore K50 programming as well as interfacing with the PNP touch output and the haptic feedback.

Figure 1: Picture of the Banner K50 Pro touch button with the Schneider Modicon PLC in the background.

Video 1: Windowed voltage detection using the Banner K50 and the Modicon M221 PLC.

Tech Tip: The term harsh has a specific meaning in this context. Close examination of the Banner K50 shows that it is designed for an IEC IP69K environment. This rating is typically associated with food production equipment. Hygiene is an important consideration in this environment. Consequently, devices such as the K50 are designed to be water resistant when subject to direct high-pressure water spray. As an example, suppose the touch display is installed directly on a food processing line. When the light is green and when the operator is ready, the button may be pressed to advance the line. Such a device would need to be sanitized along with the rest of the equipment.

Note that the pictured K50PTVAMGRY3Q is not FDA approved. For such application you would need to use K50PTFV or K50PTF derivatives.

How is the K50 device interfaced with a PLC?

The TM221CE24T Modicon PLC is designed with solid state (sourcing / PNP) outputs. Two of the Modicon’s screw-terminal outputs are used to drive the Banner K50. The connection is shown in Figure 2 datasheet description with the understanding that the two switches for K50 inputs (lines 2 and 5) are driven from the PLC.

Binary control of the K50 display states

From your digital logic class, you will recall that two digital lines may represent 4 unique states. Consequently, the two wires may control 4 unique signaling states as shown in Video 1. The truth table for the programmed K50 is as follows:

  • 00: three-pulse red
  • 01: steady green
  • 10: rotation of teal and purple
  • 11: pulsing yellow

Figure 2: Physical connection to the K50 touch button as presented in the datasheet. The PLC (sourcing) outputs are used instead of the switches.

Tech Tip: The colors and patterns presented in this article were custom programmed into the K50 – they are not the default settings. A Banner 2170 pro-kit was used to program the K50. The default GRY3 settings are: 00: off, 01: steady green, 10: steady red, 11: steady yellow.

PLC ladder logic program

A portion of the ladder logic used to interface with the K50 is presented in Figure 3. This is a continuation of an earlier article that introduced a User Defined Function Block (UDFB) to scale an analog input. You are encouraged to explore that earlier article as it presents the Modicon UDFB through the well know lens of the Arduino microcontroller. Specifically, it presents the structure of the UDFB and the importance of the dot notation. It is also important as it shows how the PLC’s Analog to Digital Converter (ADC) 0 to 1000 integer output is converted into a floating-point number.

With regards to the Figure 3 ladder logic, notice that we are performing a window operation using a series of comparison blocks. The K50 outputs (xGRY3B1 and B0) are set or reset depending on which window is active. Specifically:

  • input < 4.0 VDC: rung 3 commands 00 to the K50 resulting in a blinking red indicator
  • 4.0 >= input < 5.0 VDC: rung 4 sends 01 for steady green
  • 5.0 >= input < 6.0 VDC: rung 5 sends 10 for 50/50 rotation
  • input >= 6.00: rung 6 sends 11 for pulsing yellow

Observe that the Figure 3 code has complete coverage for all input voltage ranges. This results in predictable transition for both the ramping up voltage and the ramping down voltage. Full coverage is important as the Set and reset coils represent memory locations. Less than full coverage of the input will result in unexpected indicator “stuck” in the last position. There may be an argument against using the S and R coils however, in this code snippet they provide good readability. The fact all of the S and R coils are near each other is an important mitigating factor.

Figure 3: Modicon ladder logic used to interface with the Banner K50.

Tech Tip: The XGRY3B1 and B0 variables are associated with the general purpose (Boolean) memory location %M3 and %M2. These are not directly associated with the Modicon’s outputs. A separate output mapping program (not shown) is used to transfer the memory to the screw-terminal output.

This abstraction is part of a safe programming philosophy. It declares that the screw-terminal I/O shall appear in one and only one location in the program. For example, it allows two physical I/O to be swapped with changes to two known lines of code. This programming rigor can prevent errors as there is no need to search the code for multiple instances of I/O. This technique will not eliminate all bugs, but the abstraction forces the programmer to centralize I/O control often resulting in a cleaner implementation especially as the program size increases.


The Banner K50 Pro Touch Button provides a simple interface to a PLC. The two-wire interface for the indicator allows four unique states to be displayed - 5 if we consider no power to the device to be an additional state. The challenge is most certainly associated with programming the associated PLC and associated equipment. In this example, we programmed the Modicon PLC for a windowed voltage display. Perhaps in the future we can explore a meaningful application featuring the touch button.

Best Wishes,


About the Author

Aaron Dahlen, LCDR USCG (Ret.), serves as an application engineer at DigiKey. He has a unique electronics and automation foundation built over a 27-year military career as a technician and engineer which was further enhanced by 12 years of teaching (interwoven). With an MSEE degree from Minnesota State University, Mankato, Dahlen has taught in an ABET accredited EE program, served as the program coordinator for an EET program, and taught component-level repair to military electronics technicians. Dahlen has returned to his Northern Minnesota home and thoroughly enjoys researching and writing articles such as this. LinkedIn | Aaron Dahlen - Application Engineer - DigiKey

Return to the Industrial Control and Automation Index