MCXDesign Visual Programming Tool

User Guide

Table of Contents

1.0 MCXDesign setup

To set up MCXDesign:

  1. Download the MCXDesign programming tool from www.danfoss.com/mcx.
  2. Run the MCXDesign setup and follow the on-screen instructions. It is recommended to use the default installation folders.

The setup automatically installs all necessary software tools.

2.0 MCXDesign first steps

2.1 Run

To run MCXDesign, double-click the MCXDesign icon on the desktop or select it from the Start Menu's MCXTools folder.

A three-month free trial is available upon installation. The expiry date is shown in the "About" window.

2.2 MCXDesign project

A project in MCXDesign consists of:

2.2.1 MCXShape and MCXDesign

You can switch between MCXDesign and MCXShape using the respective commands in the menu bar. Refer to MCXShape documentation for usage details.

2.2.2 Open a project

To open an existing project:

2.2.3 Create a new project

To create a new project:

Clicking "Create New Project" opens a pre-configured project with elements like menus, parameters, alarms, and virtual functions to help you get started.

2.2.4 Create a new library

To create a new library:

Note: All libraries must reside in the "Libs" folder.

2.2.5 Open a library

To open an existing library:

2.2.6 Import an existing library

To import a library:

Libraries can also be copied between projects by copying their respective folders.

2.2.7 Update an existing project made with a previous version of MCXDesign

To update a project from a previous MCXDesign version:

It is recommended to back up the project before updating libraries. The InitDefines.c file is updated intelligently, preserving customizations.

3.0 MCXDesign workbench

The MCXDesign working area is divided into three parts:

3.1 Area 1 - Resources/Components/Projects

3.1.1 Resources

This area lists all available resources for the project, including parameters, alarms, virtual functions, status variables, strings, icons, and unique identifiers for parameters and alarms.

Resources are created using MCXShape and MCXDesign. Parameters, alarms, and strings are added via MCXShape. Virtual functions for I/Os and status variables are added in MCXDesign.

To add Status Variables, a Hotspot can be added to the Logic sheet.

3.1.2 Components

This section lists all available components for application design, grouped into libraries. Some libraries are delivered with MCXDesign, while others are project-specific.

Components are elements used to create new components from basic logic blocks and can be reused across projects. They are marked with a wall icon in the upper right corner.

Bricks are components with logic written in C++. They are part of a library and have no icon in the upper right corner.

Boxes group logic, parameters, inputs, and outputs. They are part of a project and can be reused by cutting and pasting. Boxes are marked with a box icon.

Frames are used for commenting logic and describing features.

Screens are special components in the User Interface view for creating loops of user interface screens.

3.1.3 Project

This lists all libraries used in the project. Libraries can be added or removed via the "Libs" project folder or through "File → Add Library...".

3.2 Area 2 - Working area

This is where you design the I/O configuration, control logic, and user interface. Elements are dragged and dropped from the "Resources" and "Components" groups.

Navigation within the working area:

MCXDesign offers three views:

3.3 Area 3 - Property window

This window displays the properties of selected elements or the project. Properties can be edited directly.

4.0 Debugger

The Debugger can be run by clicking the DEB button in the toolbar. Click the button again to stop it.

When the Debugger is active:

Note: Stop the Debugger before modifying control logic. User Interface data values are visible in the correct context on the simulator.

5.0 HOW TO...

5.1 HOW TO create the PK application file for MCX

There are two methods:

  1. Click the "Save and Compile" button on the MCXDesign toolbar.
  2. Generate and compile from MCXShape.

The PK file is created in the BIN folder. You can run the simulator or debugger from MCXShape.

5.2 HOW TO manage alarms

Alarms are configured in MCXShape, where you set the alarm name, reset type, delay, and actions. These settings are retained when an alarm is dragged into the logic area. You only need to define the trigger condition.

5.3 HOW TO add a resource

Resources can be added from MCXShape (parameters, alarms, strings) or MCXDesign (virtual functions for I/O, status variables).

To add a new resource from MCXShape:

To add a new resource from MCXDesign:

Note: When adding a resource, define a unique variable name using suggested conventions (e.g., Params_***, AL_***, DESCR_***, AI_***, AO_***, DI_***, DO_***).

5.4 HOW TO create a special component

5.4.1 HOW TO create a Hotspot

A Hotspot is a RAM variable exported to CAN and MODBUS networks. It can also define inputs/outputs for logic blocks and internal status variables.

Steps to add a hotspot:

  1. Drag the hotspot to the working area.
  2. Assign a name and DataType in the Property window.
  3. Assign a type (Input, Output, Instance) in the Property window.
  4. Connect the hotspot to a component by drawing a line.

To disconnect, select the hotspot, right-click, and choose "Delete Hotspot Connection".

5.4.2 HOW TO create a Component

A Component is a reusable element made of basic logic blocks, part of a library, and marked with a wall icon.

Steps to create a Component:

  1. Open or create a library.
  2. Drag a component into the working area and double-click to edit its logic.
  3. Place necessary hotspots.
  4. Design the logic.
  5. Exit component creation mode.
  6. Name the component in the Property window.
  7. Save and reopen the project.

5.4.3 HOW TO create a Brick

A Brick is a component with C++ logic, part of a library, and without an icon.

Steps to create a Brick:

  1. Open or create a library.
  2. Drag a Brick into the working area and double-click to edit its logic.
  3. Name the Brick (e.g., MyNewBrick). Ensure the name is a valid C class name.
  4. Place necessary hotspots for inputs/outputs.
  5. Add Persistent variables if needed.
  6. Exit Brick creation mode.
  7. Save and generate code.
  8. Edit the library's *_Brick.c file with a C++ editor.

Note: The *_Template.c file is for reference; all logic should be in the *_Brick.c file.

5.4.4 HOW TO create a Box

A Box groups logic, parameters, inputs, and outputs. It's part of a project and can be reused by copying.

Steps to create a Box:

  1. Drag a Box component into the working area.
  2. Select elements to include in the Box, or create logic within the Box.
  3. Cut or copy selected elements.
  4. Double-click the Box to open it.
  5. Paste elements or create new logic inside.
  6. Exit Box creation mode.

Boxes can contain EnableDisableBox or SkipBox bricks for conditional compilation or execution.

5.4.5 HOW TO create a Frame

A Frame is used for commenting logic and describing features.

Steps to create a Frame:

  1. Drag and drop the Frame element.
  2. Resize and position the Frame.
  3. Define appearance, Description, and FillColor in the Property window.

5.4.6 HOW TO create a Screen

A Screen is a component in the User Interface view for creating loops of user interface screens. It can contain a display screen and logic.

Steps to create a Screen:

  1. Drag the Screen component from the CoreLib library.
  2. Double-click the Screen to open it.
  3. Drag User Interface components into the Screen working area.

5.5 HOW TO change the blocks' execution order

To view or change the execution order of blocks:

5.6 HOW TO manage commands

Use the MCXCommand element from the LibMCX library to send commands to blocks. Connect it to the block's input. In MCXShape, define the command's OUT Code to match the MCXCommand name.

5.7 HOW TO create your User Interface

5.7.1 HOW TO create a Screen

Screens are used for user interfaces and can be linked to menu lines via MCXShape. Define the screen's name in the "OUT Code" property of the menu line.

Steps to create a Screen:

  1. Drag the Screen component from the CoreLib library.
  2. Double-click the Screen to open it.
  3. Drag and drop User Interface components into the Screen working area.

The main screen is defined by "MainForm" in the Property window. A MainForm is mandatory.

5.7.2 HOW TO create a loop of screens

Connect screens using UP, DOWN, LEFT, RIGHT keys. Draw connection lines from the key's hotspot to the input hotspot of the next screen.

5.7.3 HOW TO associate a screen to a menu line

In MCXShape, edit or create a menu line. In the "OUT Code" field, enter the name of your screen created in MCXDesign.

5.7.4 HOW TO manage Icons

Drag the VarImage component into the Screen. To use existing images, select them from the "Icon-image List". To add new images, use "File → Add Image to Project...". Connect the desired icon to the IconIndex input of the VarImage element. Use the IconStatus input to control visibility.

Images can be edited with a Bitmap editor or by modifying the "images.xml" file.

5.7.5 System ON/OFF

The "System ON/OFF" variable is required for UI functionality, even if not connected.

5.8 HOW TO configure I/Os

Go to the Electric Wiring View. Select the MCX type from the Components panel and drag it into the working area.

5.8.1 Analogue Input

Various Analogue Input types are available, including NTC, PT1000, 4-20 mA, 0-20 mA, 0-1V, 0-5V, 0-10V, and ON/OFF. Specific types like PT1000_HR are available for certain MCX models. Custom NTC and PT1000 tables can be added.

Analogue input properties like Name, Type, Description, Function, Decimals, Minimum, Maximum, Percent, Overrange, and Board type must be set.

5.8.2 Digital Input and Digital Output

Objects are available for Normally Open (NO) and Normally Closed (NC) contacts. Polarity can be inverted by right-clicking.

5.8.3 Analogue Output

Available Analogue Output types include 0-1V, 0-5V, 0-10V, EXV (Electronic Expansion Valve), PWM (Pulse Width Modulation), PPM (Pulse Position Modulation), and FREQ (Frequency Modulation).

5.9 HOW TO add an expansion

MCX and expansions connect via CANbus. Ensure they have different CAN IDs and the same baud rate. Activate R120 Ohm line termination on the first and last network elements.

Steps to add an expansion:

  1. Go to the Electric Wiring View.
  2. Select the expansion type from the MCXExpansions section and drag it into the working area.

Note: LCX06C does not support expansions. MCX061V and MCX152V can be used as I/O expansions, excluding their EXV output.

Configure expansion I/Os like a normal MCX. Use the ExpansionManager brick from the ExpansionControlLib library in the Logic view. Connect the ERROR pin to an alarm (e.g., AL_Exp_NoLink) to detect communication loss.

5.10 HOW TO search for a resource

Use the search button on the toolbar to find resources. The result lists views where the resource is used. Press "Search Next" to highlight it.

5.11 HOW TO manage Persistent (Eeprom) variables

Persistent variables are stored in non-volatile memory and can only be created within a Brick. They load at startup and save when the "Save" variable is set to 1. The value is assigned to the "Data" variable.

Example: Add a persistent variable named DATA to a brick. Exit Brick creation mode, save the library. The resulting code template (_Brick_Template.c) shows how to manage these variables.

5.12 HOW TO manage internal EEV driver (for MCX061V and MCX152V)

Download the "DemoEXV" application for an example. Key steps include selecting the MCX model, configuring the stepper motor output (EXV1/EXV2) to AO_EXV, defining the virtual function (Stepper Motor Position), and using the StepperMotorDriver brick in the Logic View.

5.13 HOW TO make a MODBUS master application

Download the "DemoMODBUSMaster" application for an example. On MCX with one RS485 port, add `#define NO_COM` to `InitDefines.c` to use the serial port as MODBUS master. This disables the MODBUS slave functionality.

The MCXMODBUSMasterLib library contains bricks for building MODBUS master applications:

5.14 HOW TO enable MODBUS Slave on the second RS485 when available

Add `#define ENABLE_MODBUS_SLAVE_COM2` to the `App/InitDefines.c` file and use the `MODBUSSlaveCOM2` brick.

5.15 HOW TO enable MODBUS TCP communication on MCX15-20B2 controllers

Use MCXDesign v4.02 or greater. Add `#define ENABLE_MODBUS_SLAVE_COM3` to `App/InitDefines.c` and use the `MODBUSSlaveCOM3` brick.

5.16 HOW TO manage Datalogging on MCX15-20B2 controllers

Use MCXDesign v4.02 or greater. Add `#define EVENT_HISTORY_NOTIFIER_V2` and `#define EVENT_HISTORY_SAVE_PARAMS_CHANGE` to `App/InitDefines.c` and use bricks from the `LogLibrary_v1.04.0000` library.

5.17 HOW TO edit project configuration files

The `InitDefines.c` file can be edited directly from MCXDesign using the provided button. Other files can be edited using the button below. Editor settings are in "Tools → Program Settings".

6.0 Release a Project (authorized users only)

To release a project, use the menu "Tools → Release". Refer to the help online for detailed instructions.

7.0 FAQ

Q: Is it possible to change the size of characters displayed in custom screens?

A: Yes, use the `FontSize` property of the `VarText` component.

Q: Is MCXDesign able to manage Chinese fonts?

A: Yes. Korean and Japanese fonts are also supported.

Q: Is MCXDesign able to manage an I/O Expansion?

A: Yes, from version 2. See section 5.9.

Q: How do I program the function associated to each key?

A: Key functions are defined by the MCX default template. MCXDesign allows defining which arrow keys are used for screen loop navigation.

Q: Is the size of an application developed with MCXDesign greater than an application developed using C++?

A: Not necessarily, especially if critical parts are managed with bricks (C++ logic).

Q: Can existing applications written in C++ be imported into MCXDesign?

A: No, they need to be rewritten. However, C code from subroutines can be copied into Bricks.

Q: Is LCX managed by MCXDesign?

A: Yes, from version 2.

Q: Are hotspots writable via MODBUS?

A: Yes, but they must be connected only to a block's input to avoid overwriting by the block output. "Free" hotspots not connected to blocks can be used by the User Interface; ensure the INPUT property is set in the hotspot properties.

Q: How to know the address map of variables exported to MODBUS?

A: Use the "Print Variable List" function in MCXShape's Print menu.

PDF preview unavailable. Download the PDF instead.

DOC327240236993 Adobe PDF Library 15.0 Danfoss A/S

Related Documents

Preview Danfoss AK-ST 500 Service Tool User Guide
User guide for the Danfoss AK-ST 500 Service Tool, detailing its features, installation, configuration, and operation for ADAP-KOOL® refrigeration controllers.
Preview Danfoss Optyma Plus Controller Modbus Parameter List
A programming guide detailing the basic Modbus parameters for the Danfoss Optyma™ Plus controller used in condensing units. This document lists read-only and read/write parameters for software versions 3.10 to 3.7x, including parameter codes, descriptions, data types, and value ranges.
Preview Danfoss AK-CC55 Single Coil Programming Guide: Basic Modbus Parameter List
A comprehensive guide detailing the Modbus parameter list for Danfoss AK-CC55 Single Coil controllers, including parameter descriptions, values, types, and settings for Modbus RTU communication.
Preview Danfoss AK-CC55 Compact: Basic Modbus Parameter List and Programming Guide
Comprehensive parameter list and programming guide for the Danfoss AK-CC55 Compact case controller, detailing Modbus RTU communication settings and parameters for optimal system configuration.
Preview Danfoss MCX06D Electronic Controller: Features, Specifications, and Installation
Detailed information on the Danfoss MCX06D electronic controller, covering general features, technical specifications, I/O capabilities, communication interfaces (CANbus, Modbus RS485), installation guidelines, warnings, and product part numbers.
Preview Danfoss ERC 111 Bottle Cooler Controller User Manual
User manual for the Danfoss ERC 111 controller, designed for bottle coolers and refrigeration units. Provides detailed information on features, installation, programming, and troubleshooting.
Preview Danfoss VLT® HVAC Basic Drive FC 101 Design Guide - Technical Manual
Comprehensive design guide for the Danfoss VLT® HVAC Basic Drive FC 101, detailing its features, installation, programming, and applications in HVAC systems for optimal energy efficiency and performance.
Preview Danfoss EKA 201 Mass Programming Key Installation Guide
Installation guide for the Danfoss EKA 201 mass programming key, detailing how to program controllers in bulk. Covers controller compatibility, file transfer, and LED indications.