Write Port/Socket Failure
I nearly have a complete system that uses shared memory and preforms as both a slave and a server, as well as logging data to a MYSQL database. I ran into a problem which I am hoping to get help with.
The error is a "Write Port/Socket Failure" error and it only occurs when requesting 6 or more registers at a time. It appears to only show up during a 03, 04 read command.
I have not altered any of the libmodbus code, what I did do is build a function that sets up the mb_mapping structure with pointers to the shared memory with the proper offsets.
The error is coming from the write() call to the serial port in the modbus_send() function. What I don't know is if the error is caused by a the data that is sent to the write() function or from inside the write() function.
I realize the data is sparce but as I gather more I will update.
Any help would be appreciated.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- libmodbus Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- jcarroll
- Solved:
- Last query:
- Last reply: