如何解决ModbusSlaveException:错误代码= 3? [英] How to resolve ModbusSlaveException: Error Code = 3?

查看:2734
本文介绍了如何解决ModbusSlaveException:错误代码= 3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Modbus项目,在从设备读取时收到错误代码3.如果有人知道问题出在哪里以及如何解决,请帮忙.

I am having a modbus project where i am getting error code 3 while reading from device. If anyone knows what is the problem and how to resolve please help out.

net.wimpi.modbus.ModbusSlaveException: Error Code = 3

推荐答案

异常代码3为非法值",这意味着您在请求中提供的值之一是非法的.这不会是无效地址,因为它是异常代码2(非法地址").这意味着您最有可能读取的寄存器数量小于或等于0或大于每个请求可以读取的最大寄存器数量-通常为125个左右.

Exception code 3 is "Illegal value", and it means that one of the values you provided in the request is illegal. This won't be an invalid address as that is exception code 2 ("Illegal address"). Which means that most likely your count of registers to read is either less than or equal to 0 or greater than the maximum number of registers which may be read per request -- typically 125 or so.

这篇关于如何解决ModbusSlaveException:错误代码= 3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆