迪文科技论坛

 找回密码
 立即注册
搜索
查看: 243|回复: 1

[Question]Is it possible to add in DWINOS Modbus ability to change slave ID

[复制链接]

6

主题

9

回帖

325

积分

中级会员

Rank: 3Rank: 3

积分
325
发表于 2025-11-18 23:43:59 | 显示全部楼层 |阅读模式
Is it possible to somehow modify the DWINOS code for Modbus UART4/5 in order to dynamically (or at least after restarting the DWIN kernel) change the slave id and baudrate? For example, so that the registers in RAM are 0x7000 and 0x7001, it is possible to write the current slave id and baudrate for UART4 or 5?I'm using DMG80480C070_15WTR. I am trying to work with OSBuild3.0.2.6. But I can try to work with C51.
回复

使用道具 举报

0

主题

559

回帖

3191

积分

论坛元老

Rank: 8Rank: 8

积分
3191
发表于 2025-11-19 13:21:50 | 显示全部楼层
The COMSET command can be used to set the serial port baud rate. For example, to set the baud rate of serial port 4 to 9600, 2580 = 4800/9600 = 2688 (0x0A80), use the command: COMSET 0x40, 0x0A80.The slave ID is set in the instruction configuration, so you can directly modify the corresponding configuration. For example, if the first instruction starts at address 0x8000, you can simply change it to address 0x8000,5A 01 to 5A 02.
http://inforum.dwin.com.cn:20080 ... amp;_dsign=768a43dc
回复

使用道具 举报

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

本版积分规则

QQ|Archiver|手机版|小黑屋|迪文科技论坛 ( 京ICP备05033781号-1 )

GMT+8, 2026-7-26 12:33 , Processed in 0.035572 second(s), 22 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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