Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Industrial Technology

CXMM Message Management Library: Efficient HMI Messaging for IEC‑61131 PLC Applications

Introduction

The CXMM_MessageManagement library offers functions to display information-, warning-, error- and other messages from the application program on the hmi. The design lean on the PLCnext WBM notification display.

CXMM Message Management Library: Efficient HMI Messaging for IEC‑61131 PLC Applications

CXMM Message Management Library: Efficient HMI Messaging for IEC‑61131 PLC Applications

 

First steps example

Set the message text to the plc variable udtTextBuffer

It is recommended to store the message text in an csv file and to use the FB PBCL_FileCsvRead from the PLCnextBase library to set the data to the pls variable.

Set text for the sender column

For the sender column set the parameters as follow:
uiSender > 0, wCode = 0, wAddCode = 0

CXMM_udtMessageMgr.udtTextBuffer.arrText[0].uiSender := 12345;
CXMM_udtMessageMgr.udtTextBuffer.arrText[0].wCode    := WORD#16#0;
CXMM_udtMessageMgr.udtTextBuffer.arrText[0].wAddCode := WORD#16#0;
CXMM_udtMessageMgr.udtTextBuffer.arrText[0].strText  := 'My_FB';

Set text for the message column

For the message column set the parameters as follow:
uiSender > 0, wCode > 0, wAddCode > 0

CXMM_udtMessageMgr.udtTextBuffer.arrText[1].uiSender := 12345;
CXMM_udtMessageMgr.udtTextBuffer.arrText[1].wCode    := WORD#16#8001;
CXMM_udtMessageMgr.udtTextBuffer.arrText[1].wAddCode := WORD#16#1001;
CXMM_udtMessageMgr.udtTextBuffer.arrText[1].strText  := 'Not in position';

Example how to use the PBCL_FileCsvRead FB

PBCL_FileCsvRead(
    uiOffset        := UINT#1, 
    strFileName     := strFileNameFileCsvRead, 
    strDataTypes    := 'UINT;WORD;WORD;STRING' , 
    strDelimiter    := ';', 
    udiRowCnt       => udiRowCntFileCsvRead, 
    anyTable        := CXMM_udtMessageMgr.udtTextBuffer.arrText);

CXMM Message Management Library: Efficient HMI Messaging for IEC‑61131 PLC Applications

CXMM Message Management Library: Efficient HMI Messaging for IEC‑61131 PLC Applications

Instantiate the function block CXMM_MessageManager

CXMM_MessageManager(udtMessageMgr := CXMM_udtMessageMgr);

Instantiate the hmi symbol CXMM_MessageDisplay

Connect it to the CXMM_MessageManager function block.

CXMM Message Management Library: Efficient HMI Messaging for IEC‑61131 PLC Applications

CXMM Message Management Library: Efficient HMI Messaging for IEC‑61131 PLC Applications

Instantiate the function block CXMM_SendMessage

CXMM_SendMessage_11(
    xSend           := xSend, 
    uiSender        := UINT#12345, 
    uiSenderType    := UINT#0, 
    wCode           := WORD#1, 
    wAddCode        := WORD#0, 
    enSeverity      := CXMM_enSeverity#Error, 
    udtMessageMgr   := CXMM_udtMessageMgr);

CXMM_MessageDisplay show the message text

CXMM Message Management Library: Efficient HMI Messaging for IEC‑61131 PLC Applications

CXMM Message Management Library: Efficient HMI Messaging for IEC‑61131 PLC Applications

 Download the library: https://github.com/WaldemarSommer22/MessageManagement-iec61131-plcnext.git


Industrial Technology

  1. Efficient Electrical Design for Special Vehicles, Transportation & Automotive with E3.series
  2. 3 Proven Strategies to Optimize Order Management for Retail Success
  3. Revolutionizing Fleet Management: AI & IoT Integration for Smarter Operations
  4. Variable Speed Drives: Keeping Food, Medicine & More Cool in Industrial Refrigeration
  5. Unlocking Industry 4.0: How 5G & LTE Transform IoT in Manufacturing
  6. Mastering IIoT Asset Management: 4 Essential Tips & Common Challenges
  7. Optimize Pipeline Maintenance & Cut Costs with Camcode’s Asset Management Solutions
  8. 48 Essential Inventory & Asset Management Resources for Schools & Educators
  9. RFID in Inventory Management: Advantages, Challenges, and ROI Insights
  10. Comparing Polypropylene and Nylon (Polyamide): Advantages, Disadvantages, and Best Uses