Pregunta

I'm doing an application that uses the Modbus ASCII protocol (RS485).

A client will communicate with a PLC service that will talk to the PLC through the serial port.

I'm not sure whether there is any limitation about sending one command each time or if I need to wait for the response to come back from the PLC before sending the next command.

That will affect the architecture of the PLC service because if only one instruction can be processed at a time the design of my class will support one async method call and will expose IsBusy property. Otherwise I'll have to support concurrent method calls and pass in the stateId for each call (I'll be using EAP: Event-based Asynchronous pattern)

Thanks in advance.

¿Fue útil?

Solución

The protocol is synchr. like comli so yes you can only send one command and must wait for a reply - I also doubled checked some old code just to be sure, been ages...

You can also read more about the protocol here

Otros consejos

The Modbus protocol handles one command at a time, so wait until you have a response and then send the next command.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top