en
cz

MW240B for controlling blinds - news

FW v20 (4/27/2023)

Since FW v20, new registers r.25 and r.26 have been added to the MB map, which mirror r.17. This change helps easier (more natural) use in Domat IDE (Merbon IDE). It is no longer necessary to use bit decomposition and composition. Register 25 is written as coils / individual bits, register 26 is written as registers / uint - see Modbus table. It is recommended to use this method.

FW v21 (11/29/2023)

Several significant features have been added in FW v21:

  • Different crossing times for the up direction and different for the down direction. In practice, the problem manifested itself, especially with longer and larger blinds, that the real crossing time (Whole position time) down was not as long as up. This caused more frequent recalibration. Therefore, a new whole position time up register (r. 27 LSB) was added. The old register is used only for the down direction (r. 19 LSB).
  • The rotation of the slats does not have to be entered only by the number of tilts, but also by percentage (0 - 100%). (See register 24).
  • The post-rotation function adds to user comfort. The blinds retain their original tilt of the slats even after changing the position of the blinds. In practice, it works in such a way that if, for example, you have it half-closed (r. 26 = 50%) and slightly darkened (r. 27 MSB = 30%), the sun will move and you only need to close the blinds, for example to (r. 26 = 75%) and leave the blackout at (r. 27 MSB = 30%), you hold the button down for a long travel and after stopping at the desired position, the blind will automatically rotate back to (r. 27 MSB = 30%). This function needs to be activated, see r. 18 LSB bit 2.

Installation and recovery

When installing blinds, the MW240-B module must first be configured via the ModComTool program:

Method:

  • set the unique Modbus line address of the module (Address),
  • in order for the MW240B module to be used for blind control purposes, it is necessary to activate this function by setting bit 7 in reg. 5 MSB (Allow function),
  • then measure (or read from the catalog sheet of the blinds) the time it takes to move from one extreme position to the other and back (Whole position time up / down) and write it down in r. 27 LSB and r. 19 LSB,
  • determine the desired movement time when the button is pressed briefly (Move short time) r. 20 LSB, this will result in how many different slat tilt angles can be achieved,
  • you can optionally enable the post-rotation function r. 18 LSB bit 2. This follows only after a long press from the user and after the end of the movement it rotates the slats to the position before the start of the movement,
  • it is optionally possible to set what should happen when communication with the PLC fails (tab Relay action, Offline action),
  • at the end write the values to EEPROM (Write all to EEPROM) and reset the module.

You can find more information about the setting options in the Modbus table of the module.

Project in Merbon IDE

  • create a new project,
  • assign PLC,
  • assign a channel (Modbus serial protocol),
  • copy a new device from the example project (MW240-B_vzor) and copy as many devices as you have physically connected to the channel,
  • change device addresses as described in the previous paragraph (ModComTool),
  • all necessary variables are already pre-mapped in this created device library in the data point properties select Target project (SWAutogen),
  • switch the assembly to Full mode and copy the function block Manual_control_block.FunctionBlock.st and MW240_queue.FunctionBlock.st to your project, in the properties of the block, select Include in compilation and Show in explorer,
  • after compiling the assembly you will find the block in the FUPLA blocks tab, from there you can normally drag it into your main.fbd program and work with it like any other block.

Block inputs only respond to leading edges. They therefore expect short pulses that activate individual sequences of commands. You create these short pulses by self-triggering (astable flip-flop) the value of the variable, when activating the variable to log. 1, the block enters an unstable state, and after the delay block time is calculated, the value of the same variable is dropped to log. 0 - see main.Program.fbd in the sample project.

It is possible to connect the inputs of individual blocks to each other and thereby create individual groups that will respond to individual commands identically (e.g. Wind = pull everything up).

The MW240_queue function block creates a command queue, which is newly supported by the MW240-B firmware. Here you set the desired position and tilt of the blinds and then execute the command with Start_IN. The blinds move to the desired position and then tilt to the desired angle.

Manual_control_block function block. It is a multifunctional block for changing the position, changing the angle of the slats and tilting (button) and stopping the blinds.

Change position - set Req_position and then Start_in to execute the command.

Tilt - set Req_slat_position and then Start_in_2 to execute command. Executed if command_position = current_position. (I tried to do it automatically but it's not well tested)

Stop and tilt - run Enable mb command and disable local (user) buttons.

Press the stop button to stop the blinds. It turns off automatically (it works like o button), just set Tilt_up/Tilt_down to rotate one step up/down. Automatic shutdown (functions as a button).

Common errors: If the project cannot be compiled, Autogen may be set incorrectly. This happens when copying device libraries between projects. To fix, reopen the MW240-B device on the Modbus channel and select the correct target project (SWAutogen) in the data points properties. This can also be done en masse in the context menu of the device.

Files for download