Comments (4)
Hi @Nickyy-b,
Could you please provide more insight on how things are wired/connected?
I also believe since the Pro Mini only has a single Serial
instance, any sketches should avoid Serial.println(...)
statements and let the Modbus library have full control of the Serial port.
from arduinomodbus.
Thanks for replying, sorry for the delay in returning.
I connected the client (Mega) and the server (Pro mini) directly Rx to Rx and Tx to Tx, that programming I attached is from mega, and the Serial window is the answer from Pro mini (server) returns to mega. The programming of the server is modified only with a char that makes a led flash, just this, I'm not using serial.print, strangely only this function of reading a single coil is returning me -1, the others read / change multiple registers / Coils work normally, I can change to read less than 10, 3 for example, but ModbusRTUClient.coilread returns me -1, can you help me?
from arduinomodbus.
@Nickyy-b please share the exact sketches you are using. Are you able to also use a logic analyzer to trace what is being sent and received on the wire?
from arduinomodbus.
The codes !!
Edited.zip
What didn't catch was the function in "if serial == d", this function returns me -1. Do you think I can replace it with the requestFrom function or RTU.beginTransmission, without any problem?
from arduinomodbus.
Related Issues (20)
- Add support for UNO R4 WiFi board HOT 1
- Documentation of return values in ModbusServer.h and Arduino Reference does not match source code
- Porting ArduinoModbus Library to Raspberry Pi Pico without Arduino Core HOT 1
- Modbus RTU over TCP Support for Arduino Opta HOT 1
- Question about directly accessing holding register data array via union
- Larger reads sometimes time out at slower baud rates on RP2040 HOT 10
- Not able to read Holding registers more than 15. RX Buffer issue? HOT 6
- Incorrect conversion of seconds and micro seconds to milliseconds HOT 1
- Not able to decode ModbusTCPServer.Poll(); function to get the Function code for read or write Operation.
- Documentation Check HOT 1
- Race condition: ModbusRTUServer.begin() sometimes quietly rejects config
- Add support for Modbus RTU over UDP HOT 2
- How to remove useless PINs in RS485? HOT 1
- Programming issue? timeout without delay within the code HOT 2
- Does this library support Modbus TCP Security?
- Arduino modbus keywords sample codes requset HOT 1
- Clarification regarding RS485 PORT HOT 1
- Modbus TCP Master AND Modbus RTU master - At the same time ?
- ModbusClient.requestFrom() crashes Finder Opta if id > 247
- ModbusRTUClient.holdingRegisterWrite -> Invalid argument HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinomodbus.