Logic Machine Forum
Modbus profiles examples - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: Modbus profiles examples (/showthread.php?tid=839)

Pages: 1 2 3 4


RE: Modbus profiles examples - Daniel - 18.10.2021

Try first reading via Read test. If it works try using this
https://forum.logicmachine.net/showthread.php?tid=3053&highlight=profile+generator


RE: Modbus profiles examples - tthamm - 08.01.2022

Hello everyone,

does anybody have the profile for the energymeter from ABB (B24 112-100)?

I can´t get it to work. Thanky you!


RE: Modbus profiles examples - admin - 10.01.2022

@tthamm, do you have the communication working via read test? The device documentation is very clear, you only have to convert addresses from hex to decimal for testing.

Try reading Active import with these settings:
- Function: Holding register (#3)
- Address: 20480
- Data type: uint64
- Read swap: Word
The read value is in 0.01KWh. If the value is incorrect then try using different read swap modes.


RE: Modbus profiles examples - tthamm - 23.01.2022

(10.01.2022, 08:07)admin Wrote: @tthamm, do you have the communication working via read test? The device documentation is very clear, you only have to convert addresses from hex to decimal for testing.

Try reading Active import with these settings:
- Function: Holding register (#3)
- Address: 20480
- Data type: uint64
- Read swap: Word
The read value is in 0.01KWh. If the value is incorrect then try using different read swap modes.

@admin, thank you. i always get a "Operation timed out". The Logicmachine have D0, D1 and C. The Abb have A, B, C, i connect D0 = A, D1 = B, C = 0V. Is this correct?


RE: Modbus profiles examples - admin - 24.01.2022

LM does not have D0/D1 markings, but A/B/GND. A is positive, B is negative. Try swapping A/B lines and also check that the serial port settings match.


RE: Modbus profiles examples - gtsamis - 28.01.2022

Hi,

I am trying to connect a Radiant Condesing Boiler to a LM via modbus.
I can read almost every value but i am stuck trying to control it.

Can someone help?

Attached the modus manual
.pdf   MODBUS_BRIDGE_INTF_PROTOCOL_L_00.pdf (Size: 628.07 KB / Downloads: 32)


Thank you in advance


RE: Modbus profiles examples - Daniel - 31.01.2022

What is your profile?
PS. You should create separate thread for this.


RE: Modbus profiles examples - gtsamis - 31.01.2022

(31.01.2022, 08:41)Daniel Wrote: What is your profile?
PS. You should create separate thread for this.

Hi Daniel,
Figure it out using bit mask.
Sorry for the of topic.


RE: Modbus profiles examples - Ian@GWTi - 21.03.2022

Hi All,

Does anyone have a profile for ABB M4M 20 Meter?

M4M 20 MODBUS | ABB

I am currently working on profiles for:
Breathing Buildings NVHR
Condair Dehumidifer
Lindab HRU
RED Air Source Heat Pump
Daikin AC/VAM with RTS-Net modbus interface.

If anyone has profiles for these can you please post.  If not i will post when finished.

Many Thanks


RE: Modbus profiles examples - jmir - 23.03.2022

Hi,

When using a profile and reading blocs of parameters, "read_count" refers to number of 16bit modbus registers or number of registers defined on "datatype"?

I mean if I use something like this:

{"name": "Input_Register_1",
"bus_datatype": "float32",
"type": "inputregister",
"datatype": "float32",
"address": 4,
"read_offset": 0,
"read_count": 4,
"writable": 0,
"value_delta": 1,
"value_multiplier": 1,
"units": "%"
},
{"name": "Input_Register_2",
"bus_datatype": "float32",
"type": "inputregister",
"datatype": "float32",
"address": 4,
"read_offset": 2,
"read_count": 4,
"writable": 0,
"value_delta": 1,
"value_multiplier": 1,
"units": "%"
}


Is this reading input register 4 as 32bit float and register 6 as 32bit float using a single modbus read command? (count is 4 because we're reading registers 4,5,6 and 7)

Or should I define read_count as 2 because I'm reading 2 32bit registers?

Thanks.


RE: Modbus profiles examples - admin - 23.03.2022

Size is always 1 register (16 bits) no matter what the data type is. The system will read the required number of registers based on the data type chosen.

Block read is needed for certain devices that don't allow reading registers directly but only via a large block read. Block read can be useful in large projects since it speeds things up but usually values can be simply read one by one.

See this example on how it should be specified correctly: https://forum.logicmachine.net/showthread.php?tid=3375&pid=21834#pid21834


RE: Modbus profiles examples - jmir - 23.03.2022

(23.03.2022, 14:41)admin Wrote: Size is always 1 register (16 bits) no matter what the data type is. The system will read the required number of registers based on the data type chosen.

Block read is needed for certain devices that don't allow reading registers directly but only via a large block read. Block read can be useful in large projects since it speeds things up but usually values can be simply read one by one.

See this example on how it should be specified correctly: https://forum.logicmachine.net/showthread.php?tid=3375&pid=21834#pid21834

Ok, thanks for your answer!!


RE: Modbus profiles examples - khalil - 15.06.2022

hello every body 
I have GenSet Deep sea Generator PLC, I read the registers. but I have a challenge reading the alarms 
Note:  I am using JSON Profile.

see attached image (Note: Updated)


RE: Modbus profiles examples - Daniel - 15.06.2022

Check this example with bitmask, you have to use the same
https://forum.logicmachine.net/showthread.php?tid=3924&pid=25349#pid25349


RE: Modbus profiles examples - admin - 16.06.2022

You can use Windows calculator for bitmasks. Switch to "Programmer" mode then switch keypad to "Bit toggling" mode. Switch required bits from 0 to 1. The HEX or DEC value will be your bitmask. For HEX you need to add 0x before the number in the profile (for example F becomes 0xF and so on).


RE: Modbus profiles examples - khalil - 16.06.2022

Thank You very much @Daniel and Admin


RE: Modbus profiles examples - Ian@GWTi - 22.07.2022

Hi,

When creating a json file, is there a field i can use to add that can be used to write to bus. See image?
   


RE: Modbus profiles examples - admin - 26.07.2022

You can add "bus_write": true to the mapping entry to achieve this.


RE: Modbus profiles examples - tthamm - 02.10.2022

(24.01.2022, 07:14)admin Wrote: LM does not have D0/D1 markings, but A/B/GND. A is positive, B is negative. Try swapping A/B lines and also check that the serial port settings match.

now the communikation works!

I´ve found the manufactur manual with chapter 9 (Communication with Modbus) inside.

Here are the fields: Quantity, Details, Start reg (hex), Size, Res., Unit, Data type,

for Example:

Quantity: Active import, Details: Tariff 1, Start reg (hex): 5170, Size: 4, Res.: 0,01, Unit: kWh, Data type: Unsigned

When i try reading Active import with these settings:
- Function: Holding register (#3)
- Address: 20480
- Data type: uint64
- Read swap: Word

the Answer is 94425 (i think its 944,25 kWh), that is correct.

but how i have to "translate" for the Logicmachine? I know, that i have to calculate hex into dec (like 5000 in hex is 20480 in dec). In the Modbus Profile Generater are Fields like bus_datatype, datatype, value_custom, read_swap...

Can you give me an example? Thankx


RE: Modbus profiles examples - Daniel - 03.10.2022

Try this:
Code:
{   
      "bus_datatype": "int64",
      "address": 20480,
      "type": "register",
      "units": "kWh",
      "value_multiplier": 0.01,
      "name": "Active import",
      "datatype": "uint64"
    },
Try using profile generator if this is simpler.
https://forum.logicmachine.net/showthread.php?tid=3053&pid=19678#pid19678