Hi there,
I need to send a Write_Single_Register in a modbus master only once.
I have a custom console application written with c language and I am not being able to find out how can I achieve this.
Is it possible? How can I do this?
Send Write Single Register by c code in Modbus
Re: Send Write Single Register by c code in Modbus
Hi, this is an interesting requirement. This feature is not implemented. We have put it in our backlog as a feature request.
Re: Send Write Single Register by c code in Modbus
That's great news.
How can I follow the development? do you have a roadmap for it?
How can I follow the development? do you have a roadmap for it?
Re: Send Write Single Register by c code in Modbus
Any news about this development?
Re: Send Write Single Register by c code in Modbus
Hi Plima,
Here is a possible solution since we have not yet finalized on this feature request.piModbusMaster uses statically linked libmodbus library.
https://libmodbus.org/documentation/
In this case you can do as following:
1) piMaster service should not be running directly on startup
/lib/systemd/system/pimodbus-master.service
2) Start your required C application first to execute Write_Single_Register using the libmodbus API
https://libmodbus.org/documentation/
3) Then start piModbusMaster
sudo systemctl start pimodbus-master.service
Best Regards,
Amar
Here is a possible solution since we have not yet finalized on this feature request.piModbusMaster uses statically linked libmodbus library.
https://libmodbus.org/documentation/
In this case you can do as following:
1) piMaster service should not be running directly on startup
/lib/systemd/system/pimodbus-master.service
2) Start your required C application first to execute Write_Single_Register using the libmodbus API
https://libmodbus.org/documentation/
3) Then start piModbusMaster
sudo systemctl start pimodbus-master.service
Best Regards,
Amar
KUNBUS