广州大彩串口屏论坛_大彩开发者交流论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 8465|回复: 13

frame repetition

[复制链接]

19

主题

52

帖子

261

积分

中级会员

Rank: 3Rank: 3

积分
261
发表于 2022-9-23 04:52:07 | 显示全部楼层 |阅读模式
VTFT have option who turn on frame repetition?. I search it but not find.
I have some slave who goes to sleep when only detect that I talk with other device. Now I need to resend frame several time for wake up.
回复

使用道具 举报

2

主题

1253

帖子

1万

积分

论坛元老

Rank: 8Rank: 8

积分
12541
发表于 2022-9-23 08:58:51 | 显示全部楼层
There is no property setting for frame repetition, and frame repetition will only be resent after the timeout time is exceeded after the command is sent from the screen.
Easy doesn't enter into Grown-up life
成年人的生活里面没有“容易”二字
回复

使用道具 举报

2

主题

1253

帖子

1万

积分

论坛元老

Rank: 8Rank: 8

积分
12541
发表于 2022-9-23 08:59:27 | 显示全部楼层
Maybe you can describe what kind of functionality you want to achieve
Easy doesn't enter into Grown-up life
成年人的生活里面没有“容易”二字
回复

使用道具 举报

19

主题

52

帖子

261

积分

中级会员

Rank: 3Rank: 3

积分
261
 楼主| 发表于 2022-9-23 15:51:52 | 显示全部楼层
After timeout display will back to send all data who I have on actual screen.  If in slave some modbus register not respond, then display leave it and ask next register who is in queue. I want to made it that if some register not respond, then display try to ask it again (for example 3 times), and after this go to next register.
In lua it's not big problem to write it, but some data transmision is set from VTFT tool.
回复

使用道具 举报

2

主题

1253

帖子

1万

积分

论坛元老

Rank: 8Rank: 8

积分
12541
发表于 2022-9-23 16:54:22 | 显示全部楼层
terefere 发表于 2022-9-23 15:51
After timeout display will back to send all data who I have on actual screen.  If in slave some modb ...

If so, I suggest you use lua script to send modbus commands instead of VTFT tool
Easy doesn't enter into Grown-up life
成年人的生活里面没有“容易”二字
回复

使用道具 举报

2

主题

1253

帖子

1万

积分

论坛元老

Rank: 8Rank: 8

积分
12541
发表于 2022-9-23 16:57:36 | 显示全部楼层
terefere 发表于 2022-9-23 15:51
After timeout display will back to send all data who I have on actual screen.  If in slave some modb ...

Delete all the modbus variables bound in the control, and access these registers through the modbus api in the lua script. The read data can be set to the text control using set_value/set_text. At the same time, the script also supports modifying the slave ID.
Easy doesn't enter into Grown-up life
成年人的生活里面没有“容易”二字
回复

使用道具 举报

19

主题

52

帖子

261

积分

中级会员

Rank: 3Rank: 3

积分
261
 楼主| 发表于 2022-9-23 18:27:23 | 显示全部楼层
Is more to job, but It seem's that I have no other way.. Or I need to made some simple device who will block frame with other address.

Ok, thanks for response.
回复

使用道具 举报

19

主题

52

帖子

261

积分

中级会员

Rank: 3Rank: 3

积分
261
 楼主| 发表于 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
  1. --**********************************************************************************************
  2. function screen_manin_hp_config(ScreenActual, value)

  3. local MD_BUF= {2,2}
  4.         -- dummy read for wake up slave
  5.         --MD_BUF = mb_read_reg_03(HP_SLAVE_ADR,HP_DUMMY_ADR,1)
  6.         --mb_write_reg_06 (0,0,2222)

  7.         MD_BUF = mb_read_reg_03(HP_SLAVE_ADR,HP_HEATPUMP_MODE_ADR,1)
  8.         if (MD_BUF ~=nil) then
  9.                 HPHeatPumpMode = MD_BUF[1]

  10.                 if (HPHeatPumpMode == 0) then set_text(ScreenActual,3,"CWU") end
  11.                 if (HPHeatPumpMode == 1) then set_text(ScreenActual,3,"BUFOR") end
  12.                 if (HPHeatPumpMode == 3) then set_text(ScreenActual,3,"CWU+BUFOR") end
  13.                 if (HPHeatPumpMode == 2 or HPHeatPumpMode == 4) then set_text(ScreenActual,3,"???") end
  14.         end

  15.         MD_BUF = mb_read_reg_03(HP_SLAVE_ADR,HP_PUMP_MODE_ADR,1)       
  16.         if (MD_BUF ~=nil) then
  17.                 HPPumpMode = MD_BUF[1]

  18.                 if (HPPumpMode == 0) then set_text(ScreenActual,3,"CWU") end
  19.                 if (HPPumpMode == 1) then set_text(ScreenActual,3,"BUFOR") end
  20.                 if (HPPumpMode == 3) then set_text(ScreenActual,3,"CWU+BUFOR") end
  21.                 if (HPPumpMode == 2 or HPPumpMode == 4) then set_text(ScreenActual,3,"???") end
  22.         end
  23. end
  24. --**********************************************************************************************
复制代码


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

19

主题

52

帖子

261

积分

中级会员

Rank: 3Rank: 3

积分
261
 楼主| 发表于 2022-9-24 04:42:20 | 显示全部楼层
本帖最后由 terefere 于 2022-9-24 04:47 编辑

Ok, I check many way. It look's like u have some bug in LUA api level. At finish I made this screen and modbus comunication from VTFT tool. Here timming is the same who I set in protocol settings, and I not see any frame overwrite. Everything is fine and clear.

Pls prepare and connect some slave who response with 25ms delay, next, in LUA try to read some register two time's (one after one). First slave answer will be overwriten by second mb_read and both mb_read function will return nil. Some timeout work's wrong from your LUA api.
Many device have longer delay in response so this will touch not only me. Pls check it, I made first order for 100pcs and your display wait here- two meters from me.
回复

使用道具 举报

2

主题

1253

帖子

1万

积分

论坛元老

Rank: 8Rank: 8

积分
12541
发表于 2022-9-26 19:08:04 | 显示全部楼层
You can test with this routine with modbus slave

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
Easy doesn't enter into Grown-up life
成年人的生活里面没有“容易”二字
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|广州大彩串口屏论坛_大彩开发者交流论坛

GMT+8, 2024-4-30 09:30 , Processed in 0.059069 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表