How to make non-blocking calls in libmodbus?
Hi
I am using Libmodbus to link an embedded processor running an RTOS to a PLC.
I need to use the read_register call() and preset_register() function calls to read and set contents of the holding register area in the PLC.
How can I make non blocking function calls so that the modbus packet is sent to the PLC immediately and the function returns to the caller rather then wait for a response packet from the PLC which will generally occur at the end of a scan period.
I would like to send a read_register() packet followed by a preset_registers() packet, continue processing for a period and then readback the modbus response packets.
Any help would be appreciated.
Thanks in advance
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- libmodbus Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Abid for more information if necessary.