Hi again,
With a little bit of trial and error and some reading i finally manage to fully understand what both of you were saying, thanks again :)
In order to help people in the future I'll leave the required steps in order to read data in Mervis from a IME Conto D2 using the RS-485 on a Unipi:
Set the IME meter communication parameters to 19200 baud rate, 8N1
Read 2.8.3 from
https://files.unipi.technology/s/public/download?path=%2FSoftware%2FMervis%2FDocumentation&files=Mervis Step-by-Step Manual.pdf as mentioned by
@tomas_hora
Set the UART_config initial value to 14 (Check the Mervis step by step manual in order to understand why)
Create a Modbus channel and set:
Link Protocol to Serial
Integration mode to True
Max. Telegram Duration 125ms
Max. Telegram Duration (Commissioning) 500ms
Port Number Modbus.Neuron.XXXX:RS485
Baud rate 19200
Data Bits 8
Parity None
Stop Bits One
Create a Device in the newly created channel
Set the Device Address in the Modbus device parameters (this should be set to the same address as the one set in the meter, in my case address 1)
Create a new group in the newly created device
Set the following parameters in the Modbus Group Parameters
Starting Element to 8193 (should be 8192 which is 0x2000 in hex but Mervis some how sends 0x1FFFF maybe some bug?)
Function to F03 Read Holding Register
Number of elements to 16
After this you have to map the variables according to
http://www.imeitaly.com/protocolli/PR121.pdf, as example i'll leave how to do it for the voltage
Add I/O
For the new IO set:
Group to the group you've created earlier
Comm. Value Mapped Type - Builtin
ST Type - dword
Transform - Linear
Parameter K - 0.001
Data Offset - 0
MultiByte length - 4
MultiByte Order - 1234
For the other parameters just check the previous document and change the Data Offset and MultiByte length accordingly.
If you run into trouble check the @Giamba last post, use Port Monitor in debug mode to check whats wrong.