Danfoss How to add MODBUS coils in MCXD User Guide

June 4, 2024
Danfoss

Danfoss How to add MODBUS coils in MCXD

Summary

How to make the MCXD support MODBUS coils.

Description

Following are the steps to support MODBUS coils with MCXD.
Will be allowed to read a single coil or group of 16 coils per task:

  1. Add the functionalities into the “InitDefines.c” file:
    //Enable to use Coils for Modbus Slave
    #define MODBUS_SUPPORTCOILS
    #ifdef MODBUS_SUPPORTCOILS
    #define MODBUS_COILS_OFFSET 50000
    #endif

  2. Add the file “AdditionalCoilTable.c” into the folder… App

  3. Edit “AdditionalCoilTable.c” setting the boolean variables to the coils:
    a. For “Alarms”: the variables’ name are in the column “Variable name” in the tab called “Alarms”

    b. For “Digital Input”: the variables’ name are in the column “Name” in the tab called “Digital Input”
    c. For “Digital Output”: the variables’ name are in the column “Name” in the tab called “Digital Output”
    d. For “Hot Spot”: the variables’ name is “ MyApp. Hot spot name”

  4. Edit the “main.c” file by adding “TTimer MainLoopTimer” ; just before the instruction:
    #ifdef MODBUS_SUPPORTCOILS
    #include “AdditionalCoilTable.c”
    #endif

  5.  Edit the “main.c” file by adding “IOMng.Run( )”; just before the instruction: #ifdef MODBUS_SUPPORTCOILS SetValuesOfCoils( ); #endif

DanfossA/S
Climate Solutions •danfoss.com • +45 7488 2222

Any information, including, but not limited to information on selection of product, its application or use, product design, weight, dimensions, capacity or any other technical data in product manual s, catalogues descriptions, advertisements, etc. and whether made available in writing, orally, electronically, online or via download, shall be considered informative, and is only binding if and to the extent, explicit reference is made in a quotation or order confirmation. Danfoss cannot accept any responsibility for possible errors in catalogues. brochures, videos and other material.
Danfoss reserves the right to al ter its products without not ice. This also applies to products ordered but not delivered provided that such al terations can be made without changes to form, fit or function of the product.
All trademarks in this material are property of Danfoss A/Sor Danfoss groupcompanies. Danfoss and the Danfoss logo are trademarks of Danfoss A/5. All rights reserved.

Documents / Resources

| Danfoss How to add MODBUS coils in MCXD [pdf] User Guide
How to add MODBUS coils in MCXD, MODBUS coils in MCXD, coils in MCXD
---|---

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

Related Manuals