EcoStruxure Machine Expert HVAC is the programming software for M171/M172 PLCs
After launching the software, give the project a name and select the device target.
This creates a new project.
The software has 4 perspectives: CONFIGURATION, PROGRAMMING, DISPLAY and COMMISSIONING.
CONFIGURATION: here communication layers between PLC and exterior are defined
Define new EEPROM Parameters: max 100,000 writes, protected from rewrite of same value (e.g. used for Setpoints)
Setup properties: Default, Min, Max, Unit and Format.
Unit and Format are used in Display and Commissioning.
Associate proper Installer type (ModBUS) and IEC type (PLC).
IEC_Type = Installer_Type * Scaler + Offset
Define new Status variables (RAM).
Used e.g. for I/O status.
Define whether the variable will be Read-only or Read/write from ModBUS
Assign Global Variables to the I/Os
A: Analog, D: Digital, I: Input, O: Output, L: Local. E.g. AIL1 = Analog Input Local 1.
Save the project for EEPROM, Status Variables, IOs settings to become effective
PROGRAMMING: here your regulation and control algorithms can be written
Let's add a new program.
Chose programming language, name and assign it to a Task.
The Task for the regulation is the Timed (200ms by default, can go down to 20ms).
Write your code. This is a simple thermostat.
You can get variable names from the database to be faster and avoid mistakes.
You can add Global Variables (RAM variables not published on ModBUS)
Define name, type and Init value.
Compile to generate the code and look for mistakes.
This button compiles the PLC/ PROGRAMMING part only.
This button downloads the PLC/ PROGRAMMING part only.
0 warnings, 0 errors: we can go to the next step!
Now we add a new FBD program to generate a delay in the command output
This is still related to the regulation, so it has to go in the Timed task.
Default libraries include many functions and function blocks.
Drag & Drop to add objects
In this area you can find all the mapped resources (Aux variables).
Compile the PLC part to look for errors.
No warnings, no errors. We can move to the next step!
In DISPLAY you can design the HMI.
Here you have the HMI pages.
Suggested setting for CharDim is 1.
Now we add a Text String.
You can change the string content from here
IMPORTANT: use String Tables for Multilanguage functionality!
Local parameters are already listed.
Use drag&drop to add them.
Here is an example about how to define Enumeratives.
On a specific text object, we can use the enumerative as object format.
Entries that do not need to be changed can have SELECTABILITY = FALSE.
This button compiles the HMI part only.
This button downloads the HMI part only.
This button compiles PLC + HMI + CONFIGURATION.
Build All has finished without any error.
Now let's simulate the PLC logic and the HMI on the device Simulator.
This button runs the Simulator.
This button downloads PLC + HMI + CONFIGURATION.
This is the only download procedure that downloads also the parameters defaults.
The defaults of EEPROM Params and all the read/write ModBUS resources are downloaded.
Here you can change the I/Os status.
Now we change AI1 to test the logic we implemented, with a 5 sec delay.
A temperature below the setpoint turns off the machine.
Cooling mode can also be forced via DI1.