mixing protocols


Thread Starter

Greg Goodman

> Normally devices ignore transmissions they do not understand. If > there are three, four or more devices hanging on a 485 port each > with its own protocol, device 1 will not respond to the protocol > used for device 2, 3 etc. Depends on the protocol. Many protocols specify that a device ignore transmissions not addressed to it, and return error responses or retransmit requests in response to messages that appear to be addressed to it, but which are not valid. If you mix multiple protocols on a line, you'd better make sure they don't conflict. Example: a device with node address 0x1F talks protocol XYZ, which defines message packets in which a start-of-message marker occupies byte 0 and the address occupies byte 1. this device pays attention only to messages addressed to 0x1F, and responds with a NAK to any message so addressed which it is unable to parse. another device on the same serial port talks protocol ABC, whose message packets start with the address in byte 0 and a command code in byte 1. A message to the second device containing command code 31 will result in a NAK message from the first device, as well as (presumably) correct behavior from the second. and heaven forfend if the start-of-message marker in protocol XYZ is a legal address in protocol ABC; any message to our first device might result in a command 0x1F (halt processing and clear memory?) to some other device. (note that most protocols of this ilk will define message structures that include CRC and/or data length, which increases the likelihood that a message will appear to be properly addressed, but be otherwise unparseable.) -- Greg Goodman -- Chiron Consulting -- [email protected] _______________________________________________ LinuxPLC mailing list [email protected] http://linuxplc.org/mailman/listinfo/linuxplc

Jeff Thurman

Greg: I should have expanded on my message. You are correct in the examples you are giving. Personally I have not dealt with these type protocols in the industrial sector (machine controls). I have dealt with them in the commercial sector though. Can you tell me which protocols you are referring too and what type of equipment? You have raised a very valid point. jeff _______________________________________________ LinuxPLC mailing list [email protected] http://linuxplc.org/mailman/listinfo/linuxplc