Modbus to Comm port


johnburke

Recommended Posts

I have some Modbus questions.

When Modbus equipment like PLC's and meters are connected to a comm port on a pc, (no netburner) is the data constantly streaming to the comm port or must the pc acting as master, constantly send commands to the devices in order to make them send data. This seems like a fundamental question to me but i have not found an answer to it yet.

If you can point me to some great books and or sites it would be very helpful.

Thanks,

John

Link to comment
Share on other sites

Alas I don't know any great books. I've only really read the Modbus protocol spec, which probably won't help. Anyhow, Modbus, and most protocols, are a poll/response protocol, meaning the Master (the DAQBridge or DAQFactory for example) sends a query to a device (slave), and the device responds. The slave never sends anything without a query.

There are devices that will stream data, but these are typically one or two data point devices like bench top scales. A GPS with serial comms also will stream. Every PLC or RTU I've ever seen has been Poll / Response only. Note that any multidrop (485/422) capable device must be poll/response or there would be collisions on the serial line.

Link to comment
Share on other sites

No. With the exception of the fact that RS485/422 supports multidrop, TCP vs serial is a transport layer issue, not a protocol issue. Your original question concerning poll/response vs continuous stream is purely a protocol related issue. You can do both poll/response and stream on both transport layers. In fact, DAQFactory splits the transport layer from the protocol layer precisely for this reason, thus allowing you to apply any protocol to any transport layer. For example, you can do Modbus RTU, which is traditionally a serial protocol, over Ethernet. This would be useful, for example, if you had a serial to Ethernet converter installed and didn't want to use virtual comm port software (which I recommend not using).

Link to comment
Share on other sites

Kind of. But the configuration is different. TCP is star configuration, meaning each device has a separate wire going back to a switch or hub, and each gets a unique IP address instead of a unique Modbus ID. You can't chain TCP devices together like you can with 485, and have to home-run each device to some extent. Addressing is also handled by the transport layer, not the protocol. In 485, the transport layer knows nothing of the addressing which is handled by the protocol which means you often can't combine multiple protocols on a single 485 chain.

Note that I'm not talking about using a TCP->485 converter. In this case you have one Ethernet cable running to a converter, and then 485 cable after that. In this case, you can daisy chain the 485 devices beyond the converter because its just 485 then. Then you have a single IP for the converter and different Modbus ID's for the devices on the 485 chain.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.