|

楼主 |
发表于 2022-9-23 22:12:26
|
显示全部楼层
本帖最后由 terefere 于 2022-9-24 04:54 编辑
Next problem, my slave have 25ms delay in response. I see that this response is overwriten by next mb_read function (at one screen I need to show several register). Change timing in protocol settings in VTFT not fix it
- --**********************************************************************************************
- function screen_manin_hp_config(ScreenActual, value)
- local MD_BUF= {2,2}
- -- dummy read for wake up slave
- --MD_BUF = mb_read_reg_03(HP_SLAVE_ADR,HP_DUMMY_ADR,1)
- --mb_write_reg_06 (0,0,2222)
- MD_BUF = mb_read_reg_03(HP_SLAVE_ADR,HP_HEATPUMP_MODE_ADR,1)
- if (MD_BUF ~=nil) then
- HPHeatPumpMode = MD_BUF[1]
- if (HPHeatPumpMode == 0) then set_text(ScreenActual,3,"CWU") end
- if (HPHeatPumpMode == 1) then set_text(ScreenActual,3,"BUFOR") end
- if (HPHeatPumpMode == 3) then set_text(ScreenActual,3,"CWU+BUFOR") end
- if (HPHeatPumpMode == 2 or HPHeatPumpMode == 4) then set_text(ScreenActual,3,"???") end
- end
- MD_BUF = mb_read_reg_03(HP_SLAVE_ADR,HP_PUMP_MODE_ADR,1)
- if (MD_BUF ~=nil) then
- HPPumpMode = MD_BUF[1]
- if (HPPumpMode == 0) then set_text(ScreenActual,3,"CWU") end
- if (HPPumpMode == 1) then set_text(ScreenActual,3,"BUFOR") end
- if (HPPumpMode == 3) then set_text(ScreenActual,3,"CWU+BUFOR") end
- if (HPPumpMode == 2 or HPPumpMode == 4) then set_text(ScreenActual,3,"???") end
- end
- end
- --**********************************************************************************************
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|