This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Convert int16 to float16
#4
(29.02.2020, 09:24)Daniel. Wrote: What is the point of using script when profile work?
I have 5 ventilation controllers. There is about 130 modbus points what I need to read per controller. From that, 100 is alarm points. If there is A or B alarm, I will read alarm points also. (A and B alarm is sum of all these) 
And ventilation controller can handle 10 answers per 1 fast request.

So it's quite messed up system on there but I can take control via scripting.

(02.03.2020, 07:42)admin Wrote: float16 is supported by the modbus mapper. Just use "datatype": "float16" and it will work.
Actually this way what I wrote it will work...

Now i'm scripting. I will add screenshot but answer is 65523 with minus degrees. If outside temp is over 0 then it will be correct number.
Also my variable is in 2 byte floating point format but grp.update gives 6552.3 or something like that.

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
Convert int16 to float16 - by fleeceable - 28.02.2020, 13:23
RE: Convert int16 to float16 - by Daniel - 29.02.2020, 09:24
RE: Convert int16 to float16 - by fleeceable - 02.03.2020, 14:26
RE: Convert int16 to float16 - by admin - 02.03.2020, 07:42
RE: Convert int16 to float16 - by Daniel - 02.03.2020, 15:33
RE: Convert int16 to float16 - by fleeceable - 02.03.2020, 16:58
RE: Convert int16 to float16 - by admin - 02.03.2020, 15:52
RE: Convert int16 to float16 - by Daniel - 02.03.2020, 17:10
RE: Convert int16 to float16 - by admin - 02.03.2020, 19:03

Forum Jump: