Introduction to the Schneider Electric TMH2GDB HMI for the Modicon M221 Nano PLC

The Schneider Electric TMH2GDB is Human Machine Interface (HMI) for the Modicon M221 line of nano PLCs. It features a small 80 x 126 mm (3.2” x 5”) footprint with a 240 x 160-pixel graphical display. It is mounted to the control panel via a 22 mm hole like other panel mount industrial switches and indicators. It connects to the M221 PLC’s “serial” port using a traditional Ethernet cable with RJ-45 connections that provides communication as well as power. The red PLC-side cable connection is visible in Figure 1.

For demonstration purposes, the TMH2GDB graphical display, TM221CE24T Nano PLC, and XPSBAC14AP mounted on a 19-inch rackmount trainer. The resulting system is compact and provides a convenient desktop trainer. This is very comfortable for code development as the HMI is at eye level.

Figure 1: Image of the TMH2GDB HMI installed on a 19-inch trainer along with a Schneider Electric M221 PLC, safety relay, and a reversing motor starter.

The HMI acts on PLC memory locations

The Schneider Modicon M221 nano family of PLCs feature flat memory space with preassigned locations for each type of memory. For example, outputs begin with %Q, inputs with %I, and bit memory locations with %M.

The TMH2GDB HMI is deeply integrated with the PLC and interacts directly with the PLC memory. For example, Figure 2 shows the TMH2GDB HMI Volume Unit (VU) screen configured to display the potentiometer voltage. For this example, the Display was configured to read from the PLC memory location %IW0.0.

Figure 2: VU display for the TMH2GDB showing the unscaled value of the potentiometer connected to analog input 0.

Figure 3: Linking one of the HMI’s “VU meters” to read and then display memory location %IW0.0 with a 0 to 1000 scale.

Advantages of a flat memory space

Global variables have always been a contentious topic. With good reason, as improper use can lead to time-consuming troubleshooting. On the other hand, there would be no misunderstanding if all variables were global. That is exactly what Schneider has done in the Modicon M221 series. All variables are preallocated with dedicated locations for each type. For instance, the function buttons can be configured to directly set or clear a memory location. For instance, a user pressing F1 could set memory location %M20 as shown in Figure 4.

This flat memory space greatly simplifies the TMH2GDB programming. The programmer’s task is to link the HMI’s functionality to the PLC memory.

Figure 4: The HMI’s F1 key is configured to set memory location %M20.

Navigating between pages

The HMI is designed for a hierarchical menu driven user experience. By default, it opens the Menu page as shown in Figures 1 and 5. The user navigates using the HMI’s rotary selector and OK pushbutton. From the programmer’s perspective, the text is matched to a specific page. For example, the 3rd text option, “Potentiometer,” is linked to a page called VU_Pot.
By default, the HMI’s home button brings us to the top-level menu page.

Figure 5: Configuration to navigate between pages. The gray box provides a preview of the HMI display.

Alarm functionality and storage

The true power of the HMI becomes apparent when we consider the alarms and alarm history function as shown in Figure 6. Multiple conditions may be sent to the alarm historian such as loss of the safety relay’s enable command or a tripped motor starter.

The word alarm appears in the upper left corner of the display. Pressing the alarm softkey will navigate us to the alarms page, where the active alarms are prominently displayed.

Pressing the history softkey reveals a timestamped history showing when the alarms were set and cleared, as shown in Figure 6.

In my opinion, this is the best feature of the HM as it allows a technician to scroll through the system to determine cause and effect. This is a critical component of systematic troubleshooting. This is an important decision to make when purchasing hardware and programming a machine.

Figure 6: Alarm history display of the TMH2GDB. The system is currently in an alarm condition that was entered at 07:43:11.

Tech Tip: The trainer, as shown in Figure 1, contains a red safety relay to monitor the emergency stop pushbutton and prevent unexpected startup in the case of a power failure. It is wired to disable the motor starter but not the PLC. This “PLC alive” condition is an important consideration for troubleshooting and viewing the various alarms via the HMI.

Note that the PLC is still in control of its outputs for panel indicators. It may even disable outputs such as motor controllers. However, the safety relay operates independently of the PLC and directly disables safety-critical outputs.

Parting thoughts

The Schneider Electric TMH2GDB HMI is an easy-to-use complement to the Modicon M221 nano PLC. The system’s flat memory space simplifies the implementation as a programmer establishes top-down associations between HMI function and PLC memory.

Be sure to review the HMI’s alarm functionality. Given the high cost of system down time, the unit would pay for itself in the first system casualty on this basis alone.

I sincerely hope you found this brief useful. Please leave your comments and suggestion in the space below.

Best wishes,

APDahlen

Related information

Please follow these links to related and useful information:

About this 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.