hi…
i am implementing Modbus RTU master on RS232 which read holding register from slave and receiving the response.
can anyone help me to get the code for it.
regards,
hemant sharma
hi…
i am implementing Modbus RTU master on RS232 which read holding register from slave and receiving the response.
can anyone help me to get the code for it.
regards,
hemant sharma
hi,
I have go though the “main.cpp” file.As per code in while loop it seems that in “eMBPoll” is continuous monitoring for receving for command.
but i have also need to send read holding register command and than wait for response.
how can i do that…how sending part is handles?
while(true)
{
#if MB_TCP_ENABLED == 1
Net::poll();
#endif
if(tm.read()>.5)
{
led1=!led1; //Show that we are alive
tm.start();
}
eStatus = eMBPoll( );
/* Here we simply count the number of poll cycles. */
usRegInputBuf[0]++;
}
return 0;
}
The same implementation is available in below link …that is also working as slave .
but i want as master which send command and receive response