User Guide
MCXDesign visual programming tool
www.danfoss.com
User Guide | MCXDesign visual programming tool
Contents |
|
|
|
Table of new contents.................................................................................... |
3 |
||
1.0 MCXDesign setup.................................................................................... |
4 |
||
2.0 MCXDesign first steps........................................................................... |
4 |
||
2.1 |
Run |
................................................................................................... |
4 |
2.2 |
MCXDesign project........................................................................ |
4 |
|
|
2.2.1 MCXShape and MCXDesign............................................ |
5 |
|
|
2.2.2 |
Open a project..................................................................... |
5 |
|
2.2.3 Create a new project.......................................................... |
5 |
|
|
2.2.4 Create a new library........................................................... |
6 |
|
|
2.2.5 |
Open a library....................................................................... |
6 |
|
2.2.6 Import an existing library................................................ |
6 |
|
|
2.2.7 Update an existing project |
|
|
|
|
made with a previous version of MCXDesign........... |
7 |
3.0 MCXDesign workbench........................................................................ |
7 |
||
3.1 |
Area 1 - Resources/Components/Projects............................. |
7 |
|
|
3.1.1 |
Resources............................................................................... |
7 |
|
3.1.2 |
Components......................................................................... |
8 |
|
3.1.3 |
Projects................................................................................ |
10 |
3.2 |
Area 2 - Working area.................................................................. |
10 |
|
|
3.2.1 |
”Electric Wiring” view...................................................... |
11 |
|
3.2.2 |
”Logic” view........................................................................ |
11 |
|
3.2.3 |
”User Interface” view....................................................... |
11 |
3.3 |
Area 3 – Property window........................................................ |
12 |
|
4.0 Debugger |
................................................................................................ |
13 |
|
5.0 HOW TO... |
................................................................................................ |
14 |
|
5.1 |
HOW TO create the PK application file for MCX................ |
14 |
|
5.2 |
HOW TO manage alarms........................................................... |
14 |
|
5.3 |
HOW TO add a resource ............................................................ |
14 |
|
5.4 |
HOW TO create a special component................................... |
16 |
|
|
5.4.1 HOW TO create a Hotspot............................................. |
16 |
|
|
5.4.2 HOW TO create a Component..................................... |
16 |
|
5.4.3 HOW TO create a Brick.................................................... |
17 |
|
5.4.4 HOW TO create a Box...................................................... |
18 |
|
5.4.5 HOW TO create a Frame................................................. |
19 |
|
5.4.6 HOW TO create a Screen................................................ |
19 |
5.5 |
HOW TO change the blocks’ execution order.................... |
19 |
5.6 |
HOW TO manage commands.................................................. |
20 |
5.7 |
HOW TO create your User Interface....................................... |
20 |
|
5.7.1 HOW TO create a Screen................................................ |
20 |
|
5.7.2 HOW TO create a loop of screens............................... |
23 |
|
5.7.3 HOW TO associate a screen to a menu line............ |
23 |
|
5.7.4 HOW TO manage Icons.................................................. |
24 |
|
5.7.5 System ON/OFF................................................................ |
25 |
5.8 |
HOW TO configure I/Os.............................................................. |
25 |
|
5.8.1 Analogue Input................................................................. |
27 |
|
5.8.2 Digital Input and Digital Output................................ |
28 |
|
5.8.3 Analogue Output............................................................. |
28 |
5.9 |
HOW TO add an expansion....................................................... |
29 |
5.10 |
HOW TO search for a resource................................................. |
30 |
5.11 |
HOW TO manage Persistent (Eeprom) variables............... |
30 |
5.12 |
HOW TO manage internal EEV driver |
|
|
(for MCX061V and MCX152V).................................................. |
32 |
5.13 |
HOW TO make a MODBUS master application.................. |
33 |
5.14 |
HOW TO enable MODBUS Slave |
|
|
on the second RS485 when available................................... |
34 |
5.15 |
HOW TO enable MODBUS TCP communication on |
|
|
MCX15-20B2 controllers............................................................ |
34 |
5.16 |
HOW TO manage Datalogging on......................................... |
34 |
|
MCX15-20B2 controllers............................................................ |
34 |
5.17 |
HOW TO edit project configuration files.............................. |
34 |
6.0 Release a Project (authorized users only)................................ |
35 |
|
7.0 FAQ |
............................................................................................................ |
35 |
2 | BC326629593205en-000101 |
© Danfoss | DCS (vt) | 2019.12 |
User Guide | MCXDesign visual programming tool
Table of new contents |
Manual |
MCXDesign |
|
|
|
|
Software |
|
New Contents |
||
|
Version |
|
|||
|
Version |
|
|
|
|
|
|
|
|
|
|
|
Y2 |
V2.01 |
5.11 |
HOW TO manage Persistent (Eeprom) variables |
|
|
|
|
5.9 |
HOW TO add an expansion |
|
|
|
|
5.8 |
HOW TO configure I/Os: |
|
|
|
|
|
Note about physical input/output and virtual functions. |
|
|
|
|
5.12 |
HOW TO manage internal EEV driver (for MCX061V and MCX152V) |
|
|
|
|
5.13 |
HOW TO make a MODBUS master |
|
|
|
|
6.0 |
Release a Project (authorized users only) |
|
|
|
|
|
For releasing a project use the menu Tools Release |
|
|
|
|
|
|
|
|
|
|
For a detailed description on how to use it, refer to the help online FAQ: |
|
|
|
|
added some Q/A. |
|
|
|
Updated figures |
||
Y3 |
V3.00 |
2.2 |
MCXDesign project |
|
|
|
3.1.1 |
Resources |
|
|
|
3.1.3 |
Project |
|
|
|
5.4.1 |
HOW TO create a Hotspot |
|
|
|
5.5 |
HOW TO change the blocks’ execution order |
|
|
|
5.7.1 |
HOW TO create a Screen |
|
|
|
5.7.4 |
HOW TO manage Icons |
|
|
|
5.8 |
HOW TO configure I/Os |
|
|
|
5.8.1 |
Analogue Input |
|
|
|
5.13 |
HOW TO make a MODBUS master application |
|
|
|
6.0 |
Release a Project (authorized users only) |
|
|
|
|
For releasing a project use the menu Tools Release |
|
|
|
|
|
|
|
|
|
For a detailed description on how to use it, refer to the help online FAQ. |
This version |
V4.00 |
6.0 |
Release a Project (Repository) |
|
|
5.15 |
HOW TO enable MODBUS TCP communication on MCX15-20B2 controllers |
|
|
5.16 |
HOW TO manage Datalogging on MCX15-20B2 controllers |
|
|
5.4.4 |
HOW TO create a Box: brick Skipbox |
|
|
5.8 |
HOW TO configure I/Os: Easy switch among MCX15-20B-PV2-B2 models |
|
|
5.8.1 |
Analogue Input: New AIs type |
|
|
5.17 |
HOW TO edit project configuration files |
© Danfoss | DCS (vt) | 2019.12 |
BC326629593205en-000101 | 3 |
User Guide | MCXDesign visual programming tool
1.0 MCXDesign setup |
1. From www.danfoss.com/mcx download the MCXDesign programming tool |
|
2. Run MCXDesign setup and follow the indications (it is a good idea to keep the proposed installation |
|
folders) |
There is no need to install any other element, as all the necessary software tools are automatically installed.
2.0MCXDesign first steps
2.1Run
To run MCXDesign double click on the icon on the desktop or select MCXDesign in the MCXTools folder of the Start Menu folder.
If you do not have a licence you have three months’ free trial from the installation date. The expiry date is displayed in the bottom right corner of the ”About” window that you can view by pressing “About” menu.
2.2 MCXDesign project |
A project in MCXDesign is made of: |
|
• MCXDesign project file (e.g. DemoApp.mcxb) and its backup (e.g. DemoApp.mcxb_bk) |
|
• MCXShape configuration file (e.g. DemoApp.mcxs) |
|
• Folder ”App” with application source files, libraries and icons |
|
• Folder ”Libs” with all the libraries of graphic elements used in the project |
|
• Folder ”MyKFiles” with the file to be loaded into the MMIMYK accessory to transfer the application |
|
software into the MCX controller |
|
• Folder “Images”: not used |
|
• Other files (*.bat) used by MCXDesign |
4 | BC326629593205en-000101 |
© Danfoss | DCS (vt) | 2019.12 |
User Guide | MCXDesign visual programming tool
2.2.1 MCXShape and |
• |
You can toggle between MCXDesign and MCXShape by pressing the command ”MCXShape” or |
||
MCXDesign |
|
”MCXDesign” in the right part of the menu bar. |
||
|
• |
Refer to the specific documentation for information about MCXShape usage |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2.2.2 Open a project |
To open an existing project: |
|
• Go to MCXDesign |
|
• Select ”File Open” and select the *.mcxb file (e.g. DemoApp.mcxb) |
|
• A backup copy of the *.mcxb and *mcxs file is automatically created into the Backup folder. The last |
|
five back-up copies are maintained. |
2.2.3 Create a new project |
To create a new project: |
|
• Go to MCXDesign |
|
• Select ”File New” |
|
• Select the icon for the type of application you are interested in: MCX with LCD display, MCX with |
|
LED display, LCX06C |
|
• Give a name to the new project and select the working folder (in a local path) where you have all the |
|
projects |
•Click on ”Create New Project”. This opens a new project with some elements already managed, as per our default template (menu, few parameters, keyboard, alarms, alarm history, a few virtual functions just as an example) in order to help you to get started.
© Danfoss | DCS (vt) | 2019.12 |
BC326629593205en-000101 | 5 |
User Guide | MCXDesign visual programming tool
2.2.4 Create a new library |
A library is a collection of graphical logic blocks. To create a new library: |
|
• Go to MCXDesign |
|
• Select ”File New” |
|
• Select the icon ”Library” |
|
• Give a name to the new library folder in ”Project Name” and select the ”Libs” folder of the project |
|
where you want to file the library. |
|
Note: It is mandatory to have all the libraries in the ”Libs” folder. |
|
A new folder with the name of your library is created inside the ”Libs” folder. |
|
This folder will store all the files related to the elements of your library. |
|
• Create the elements (bricks or components) of your library (see 3.1.2 Components) |
|
• Save and reopen the project which the library belongs to in order to see the changes |
2.2.5 Open a library |
To open an existing library: |
|
• Go to MCXDesign |
|
• Select ”File Open” |
|
• Select the *.mcxlib type of files |
|
• Select the desired library in the ”Libs” folder of your project (e.g. MyLib.mcxlib) |
2.2.6 Import an existing library |
• Go to MCXDesign |
|
• Select ”File Add Library” and browse to the folder where the library is stored. The library will be |
|
automatically copied into the ”Libs” folder of the current project. The project is then reloaded in |
|
order to make the new library available. |
|
Note: Libraries can be copied from one project to another simply by copying the related folder from |
|
the ”Libs” folder of one project to the ”Libs” folder of the another. |
6 | BC326629593205en-000101 |
© Danfoss | DCS (vt) | 2019.12 |
User Guide | MCXDesign visual programming tool
2.2.7Update an existing project made with a previous version of MCXDesign
To open and update an existing project made with a previous version of MCXDesign:
•Go to MCXDesign
•Select “File Open” and select the *.mcxb file of the existing project (e.g. DemoApp.mcxb)
•Select“File Open”and select“Update System“ libraries to update the system libraries in the project. It is recommended to make a copy of the project before updating the system libraries.
Note: That the InitDefines.c file is updated in a smart way, keeping the customization you did.
3.0 MCXDesign workbench
The MCXDesign working area is made of three parts.
3.1Area 1 - Resources/ Components/Projects
3.1.1 Resources |
List of all the available resources for the project: parameters, alarms, virtual functions, status variables, |
|
|
strings, icons, parameter and alarm unique identifiers. |
|
|
|
|
|
|
|
|
|
|
© Danfoss | DCS (vt) | 2019.12 |
BC326629593205en-000101 | 7 |
User Guide | MCXDesign visual programming tool
Resources are created with MCXShape and MCXDesign.
•To add Parameters, Alarms and Strings, select ”MCXShape” and add them from there (see 5.3 HOW TO add a Resource)
•To add Virtual Functions for I/Os, right-click over the desired Virtual Functions type on the Resources panel of MCXDesign and fill in the form with the relevant information.
|
• To add Status Variables just add a Hotspot to the Logic sheet (see 3.1.2 Components) |
|
3.1.2 Components |
List of all the available components for designing your application software. |
|
|
Components are grouped into libraries. There are some libraries delivered together with MCXDesign |
|
|
and some others are related to a project and are loaded when the project is open. |
|
|
|
|
|
|
|
|
|
|
8 | BC326629593205en-000101 |
© Danfoss | DCS (vt) | 2019.12 |
User Guide | MCXDesign visual programming tool
•Red icons: basic logic blocks (e.g. AND, OR, etc.)
•Green icons: advanced logic blocks
•Blue icons: basic drawing tools, and some special components
•For each component there is an online help which explains its features. To access the online help, select the component and press F1.
There are some special blocks in the CoreLib library that need a special description for their specifics and importance in building the control strategy.
The special components are as follows:
|
A ”Hotspot”is a variable in RAM that is automatically exported to CAN and MODBUS networks. |
|
Hotspot are also used to define input and output of the logic blocks and internal status |
Hotspot |
variables. |
See 5.4.1 HOW TO create a Hotspot. |
|
|
A Component is an element used to create a new component made of basic logic blocks. |
|
A component is a part of a library which can be reused through all your projects. |
Component |
A component is marked with a wall icon in the upper right corner. |
Brick
Box
Frame
Screen
See 5.4.2 HOW TO create a Component.
A Brick is a component whose strategy is written in C++.
A Brick is a part of a library and can be reused through all your projects. A Brick has no icon in the upper right corner.
See 5.4.3 HOW TO create a Brick.
A Box is a way of grouping together a part of logic made not only by bricks or components but also including parameters, input and output.
A Box is not part of a library but is a part of your project. To reuse a Box in other projects you can simply cut and paste it.
A Box is marked with a box icon in the upper right corner.
See 5.4.4 HOW TO create a Box.
A Frame is a way of defining a comment to a piece of logic and is useful for describing its features.
See 5.4.5 HOW TO create a Frame.
A Screen is a special component available only in the User Interface view. It is used to create loops of user interface screens.
See 5.4.6 HOW TO create a Screen.
© Danfoss | DCS (vt) | 2019.12 |
BC326629593205en-000101 | 9 |
User Guide | MCXDesign visual programming tool
3.1.3 Project |
List of all the libraries that are used in the project. |
|
|
|
|
|
|
|
To add or remove a library, access the ”Libs” project folder where all the libraries are stored.
You can also add a library from menu “File Add Library…”
3.2 Area 2 - Working area Space where you can design the I/O Configuration, the control logic and the user interface of your application.
Drag and drop here the elements taken from the ”Resources” and ”Components” groups.
Note:
•Ctrl + scroll wheel of your mouse to zoom
•Hold the mouse scroll wheel to move the drawing
•To delete a line, move the end of the line away from its connection point
•To add a line, drag the mouse from left (output of a component) to right (input of another component)
MCXDesign is made up of three views:
•”Electric Wiring” view for designing the Input/Output configuration
•”Logic” view for designing the control logic
•”User Interface” view for designing the User Interface
10 | BC326629593205en-000101 |
© Danfoss | DCS (vt) | 2019.12 |
User Guide | MCXDesign visual programming tool
3.2.1 ”Electric Wiring” view
Define the type of each MCX’s physical input and output and assign a virtual function to it.
For more info see 5.8 HOW TO configure I/Os.
3.2.2 ”Logic” view
|
Connect the elements together in the ”Logic” view to design your control logic. |
3.2.3 ”User Interface” view |
Place and eventually connect the screen elements in the ”User Interface” view to design your user |
|
interface. |
|
See 5.7 HOW TO create your User Interface. |
|
MENU and KEYBOARD |
|
The menu appearance and the usage of some keys are defined by a standard template and cannot be |
|
modified using MCXDesign. |
|
The menu elements and their position in the menu tree are defined with MCXShape. |
Main keys’ function in the main screen
•UP, DOWN, RIGHT, LEFT are used to navigate through the loop of screens according to what is defined in MCXDesign
•ENTER to access the Main Menu
•X to access the Alarm Screen with the alarms list
•UP held for 3s to switch the unit ON or OFF
In the Alarm Screen
•X to exit
•ENTER held for 3s to reset manual alarms
© Danfoss | DCS (vt) | 2019.12 |
BC326629593205en-000101 | 11 |