We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我是在nodejs中使用 mdbClient.connectTCP方法连接设备后,对于设备保持寄存器HR来说,如何读取float,short,word等不同类型的数据,以及如何设置对应的registerLength寄存器数量,在线求解
The text was updated successfully, but these errors were encountered:
const startAddr = 80 const len = 5 // startAddr 获取寄存器的起始号 // len 获取寄存器个数 client.readHoldingRegisters(startAddr, len).then(res => { // data 为modbus-serial包对buffer解析的数据 [1,28,6,0,11] // buffer 为原始的buffer数据 const { data, buffer } = res // 原始的buffer就自己对数据进行处理 https://nodejs.cn/api-v18/buffer.html })
Sorry, something went wrong.
自己写代码实现。 modbus协议本身不提供数据类型处理。
No branches or pull requests
我是在nodejs中使用 mdbClient.connectTCP方法连接设备后,对于设备保持寄存器HR来说,如何读取float,short,word等不同类型的数据,以及如何设置对应的registerLength寄存器数量,在线求解
The text was updated successfully, but these errors were encountered: