sourceperl / pyModbusTCP

A simple Modbus/TCP library for Python
MIT License
297 stars 104 forks source link

Passing a list which contains integer and float value to write_multiple_registers #10 #39

Closed Gokila02 closed 2 years ago

Gokila02 commented 3 years ago

Hi all,

I am having list of data with the data types of integer and float. I splitted the list of data's into two lists, one list containing integers and another list containing float when i try to passing the two lists (integers and float) into write_single_register and write_multiple_registers respectively. integer list = [202104001,15540,1196955] float list = [147.91,074.23,050.23,221.20,110.11,110.23,005.00,055.10,220.50]

i did not read the exact output.

For integer output:

For float output:

Please suggest me, how to write and read the integer and float datas

sourceperl commented 2 years ago

You can have a look at https://pymodbustcp.readthedocs.io/en/latest/quickstart/index.html#utils-module-modbus-data-mangling