NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » Modbus Master
November 10, 2011 by doughowlett ![]() |
I'm trying to write a Modbus master routine for the Nerdkit and interface it with other Modbus Slaves. I'm using the USART TX and RX pins with my setup given below. As a first attempt I'm piecing together a known array of bytes and sending them to a plc, requesting that one register be sent back. This string works fine from Modbus Poll on a PC. The request is sent and the PLC returns the information back to the PC. So I know the bytes being sent and the bytes being received. When I try to send this from the Nerdkit the string appears to be ok on a scope, but the TX com line is set to an idle "high" state which is different from the output I observed from the PC and ModPoll. I don't know if this is a problem but I'm not getting anything returned from the PLC. Therefore I'm assuming the PLC is not getting the data correctly. Both the USART and PLC setup is for 19,200 8N1. Does anyone have any Modbus experience or any suggestions.
|
---|
Please log in to post a reply.
Did you know that essentially all power supplies' voltages drop when current is drawn from them? Learn more...
|