Hello
Is my first post so…have mercy , also bad english gramma
I read the forum and tutorials over 2 week , i’m feel dumb. I’m hardware engineer, i write 10-15 years ago ASM, ladder, C for dsp microcontrollers but… what’s here mess me up .
I install openHAB2 on windows , service started, link to myopenhab.org , link to Echo dot , tested demo, editing over visual studio code , i understand something on all file what and how they act , “less on things, they don’t exist in demo” , over all i keep reading .
I want to use openHAb to read/write fatek registry with Echo dot , for moment just to communicate over TCP/UDP. I managed to finish that but i cant read the 32 bit register as float . I read it , but the value is not real. I can read only decimal correctly. The PLC is used to control entire house with homemade HVAC and other devices rs485 also combined with weintek HMI .
I want only to read/write registry and virtual contact correctly , the ladder is not a issue is written by me.
https://prnt.sc/2MYaJXP3i4D8
.binding
fatekplc:plc1.connectionUri = udp://192.168.1.3?plcId=1&timeout=1000
.sitemap
Frame label="PLC control" {
Group item=plc icon="receiver"
}
addons
binding = astro, fatekplc1, samsungtv, amazonechocontrol
ui = basic, paper, homebuilder, habmin
transformation = javascript, map, regex
misc = openhabcloud, ruleengine
.items
Group plc "PLC" <computer>
DateTime plc_init "Init [%1$ty-%1$tm-%1$td %1$tH:%1$tM:%1$tS]" (plc) { fatekplc="plc1:R3505:R3504:R3503:R3502:R3501:R3500:refreshStep=60" }
DateTime plc_poweron "Power on [%1$ty-%1$tm-%1$td %1$tH:%1$tM:%1$tS]" (plc) { fatekplc="plc1:R11:R10:R9:R8:R7:R6:refreshStep=60" }
//Item ... { fatekplc ="fatek_binding" }
Number plc_scan_curr "Scan current [%d ms]" (plc) { fatekplc="plc1:R4136" }
Number plc_scan_min "Scan min [%d ms]" (plc) { fatekplc="plc1:R4138" }
Number plc_scan_max "Scan max [%d ms]" (plc) { fatekplc="plc1:R4137" }
Number plc_R300 "Value R300 [%d -- este multiplicat cu x10]" (plc) { fatekplc="plc1:R300:refreshStep=2" }
Number Weather_Temperature "Outside Temperature [%.1f °C]" (plc) { fatekplc="plc1:[+]R6:refreshStep=2" }
As example what mess me up is %.1f
and show me correct the decimal value plus .x
https://prnt.sc/433oREOIb0Ny
Also some values going crazy after so may try " in dark "
Number Weather_Temperature "Outside Temperature [%.1f °C]" (plc) { fatekplc="plc1:[+]DD26[F]:refreshStep=2" }
I dont to someone to write code for me , i know how hard it is , i ask only for some real examples how to do that because i don’t really get what’s here Fatek binding
I have different registry in different formats , because i use them for conversions in ladder
but here in openHAB to be honest i don’t know to do a simple math
on .things issue i will go in after .
Thanks to everyone for moment