{"action":"opened","issue":{"url":"https://api.github.com/repos/ljean/modbus-tk/issues/60","repository_url":"https://api.github.com/repos/ljean/modbus-tk","labels_url":"https://api.github.com/repos/ljean/modbus-tk/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/ljean/modbus-tk/issues/60/comments","events_url":"https://api.github.com/repos/ljean/modbus-tk/issues/60/events","html_url":"https://github.com/ljean/modbus-tk/issues/60","id":162968320,"number":60,"title":"How to read floats?","user":{"login":"nikoluis","id":20124024,"avatar_url":"https://avatars.githubusercontent.com/u/20124024?v=3","gravatar_id":"","url":"https://api.github.com/users/nikoluis","html_url":"https://github.com/nikoluis","followers_url":"https://api.github.com/users/nikoluis/followers","following_url":"https://api.github.com/users/nikoluis/following{/other_user}","gists_url":"https://api.github.com/users/nikoluis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikoluis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikoluis/subscriptions","organizations_url":"https://api.github.com/users/nikoluis/orgs","repos_url":"https://api.github.com/users/nikoluis/repos","events_url":"https://api.github.com/users/nikoluis/events{/privacy}","received_events_url":"https://api.github.com/users/nikoluis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-29T16:20:36Z","updated_at":"2016-06-29T16:20:36Z","closed_at":null,"body":"Hello\r\n\r\nI'm new to Python, however it's an easy language. I'm playing with the examples. No problems. At first, I tried the minimalmodbus but i found some benchmarks that show that modbus-tk is the fastest of all. In my environment, I want to read around 100 values from a device. These values are not continuous. I have to read from address 1002 then 1010, then 1050 etc, so from a loop i read all the registers one by one. I have setup the timeout to 0.1. It's very fast, no errors compared to the minimalmodbus which occassionaly presented CRC errors. However, the minimalmodbus has a read_float method which returns the actual value. The modbus-tk has a  execute method which returns numbers which do not make sense to me. For example i want to read a float from address 1002. It is a temperature. Based on the examples i should read 2 registers. I run the following command:\r\n\r\n`logger.info(master.execute(1, cst.READ_HOLDING_REGISTERS, 1002, 2))`\r\n\r\nbut the output is (16880, 13990). The list of two numbers make sense, since i requested 2 registers. But how i can convert these to a float (my temperature)?\r\n\r\nThanks\r\n/Nick"}}
{"actor":{"display_login":"nikoluis"}}