没有合适的资源?快使用搜索试试~ 我知道了~
MATLAB - Modbus TCP客户端的使用 (2).docx
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 168 浏览量
2023-10-22
11:35:22
上传
评论
收藏 13KB DOCX 举报
温馨提示
试读
3页
MATLAB - Modbus TCP客户端的使用 (2).docx
资源推荐
资源详情
资源评论
函数列表
函数 说明
modbus 创建 MODBUS 对象
read 从 MODBUS 服务器读取数据
write 对连接的 MODBUS 服务器执行写操作
writeRead 在单个 MODBUS 事务中对一组保持寄存器执行写然后读操作
maskWrite 在保持寄存器上执行掩码写入操作
instrhwinfo 有关可用硬件的信息
clear 从 MATLAB 工作区中删除仪器对象
配置说明
Property Transport Type Description
‘DeviceAddress’TCP/IP only IP address or host name of MODBUS
server, for example, ‘ 192.168.2.1 ’ . Required during object creation if
transport is TCP/IP.m = modbus('tcpip', '192.168.2.1')
Port TCP/IP only Remote port used by MODBUS server. The default is
502. Optional during object creation if transport is TCP/IP.m = modbus('tcpip',
'192.168.2.1', 308)
‘Port’ Serial RTU only Serial port MODBUS server is connected to, for
example, ‘ COM1 ’ . Required during object creation if transport is Serial
RTU.m = modbus('serialrtu','COM3')
Timeout Both TCP/IP and Serial RTU Maximum time in seconds to wait
for a response from the MODBUS server, specified as a positive value of type
double. The default is 10. You can change the value either during object
creation, or after you create the object.m.Timeout = 30;
NumRetries Both TCP/IP and Serial RTU Number of retries to perform if
there is no reply from the server after a timeout. If using the Serial RTU transport,
the message is resent. If using the TCP/IP transport, the connection is closed
and reopened.m.NumRetries = 5;
‘ByteOrder’ Both TCP/IP and Serial RTU Byte order of values written to
or read from 16-bit registers. Valid choices are ‘big-endian’ and ‘little-
endian ’ . The default is ‘ big-endian ’ , as specified by the MODBUS
standard.m.ByteOrder = 'little-endian';
‘WordOrder’Both TCP/IP and Serial RTU Word order for register reads
and writes that span multiple 16-bit registers. Valid choices are ‘big-endian’
and ‘ little-endian ’ . The default is ‘ big-endian ’ , and it is device-
dependent.m.WordOrder = 'little-endian';
BaudRate Serial RTU only Bit transmission rate for serial port
communication. Default is 9600 bits per seconds, but the actual required value
is device-dependent.m.Baudrate = 28800;
DataBits Serial RTU only Number of data bits to transmit. Default is 8,
which is the MODBUS standard for Serial RTU. Other valid values are 5, 6, and
7.m.DataBits = 6;
Parity Serial RTU only Type of parity checking. Valid choices are ‘none’
(default), ‘even’, ‘odd’, ‘mark’, and ‘space’. The actual required
资源评论
2301_77550592
- 粉丝: 17
- 资源: 7164
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功