I have implemented MODBUS master slave communication. I have implemented fun 6, 16 & 3. I set 1 minute as response time. Now problem is that I want to send query at 500 ms. But because of this 1 second response time, I need to wait till 1 sec to send the second query. How I can send query at every 500 ms keeping response time as 1 sec.
Is it possible to send new query, if we are still waiting for response of our previous query as well?
How to communicate with slower device over MODBUS?
See section 2.1 of the MODBUS over serial line specification and implementation guide V1.02 where
The master node initiates only one MODBUS transaction at the same time.
This should inform any decision on how you sequence the commands. The other specification documents on the site are also helpful to ensure your implementation is conforming.
You would probably save yourself several person-months by using an existing open implementation. There are a number described at Modbus Technical Resources.