Home AMX User Forum NetLinx Studio

Command Terminators

I'm working on a module for a TOA Amp/Mixer and the RS232 protocol documentation doesn't specify any sort of command terminator. I was curious to hear how often, in these situations, you guys eventualy find that a CR or CR-LF is actually expected but not specified.

If anyone is curious, I'll attach the protocol doc that I'm using.

Cheers,
Matthew

Comments

  • DHawthorneDHawthorne Posts: 4,584
    Nine times out of ten, or better, they specify the terminator, even if it's a simple CR. The only exceptions I have seen are very human-readable protocols, where it is assumed. It seems most of those were designed to be used from a terminal anyway, where it would automatically be put in.

    In the case of your document, the structure of the commands requires no terminator because the data length is specified as part of the command. It's not unusual for such protocols not to have a terminator.
  • AMXJeffAMXJeff Posts: 450
    I was curious to hear how often, in these situations, you guys eventualy find that a CR or CR-LF is actually expected but not specified.

    I would agree, but I would say the precentage is alot larger... 99.9999999%

    The protocol that is described in your manual does not have a termination byte, they use the length byte to determine when the packet is complete. Normally CR or CRLF are used in ascii type of protocols more then hex. This one is a hex protocol.
  • I didn't realize how valuable that data length byte really was until starting to try and parse the buffer. Big time props for helping out on this, AMXJeff. I worked on this last night and was pleased to see your buffer parsing example worked like a charm.

    Cheers up high!
    Matthew
Sign In or Register to comment.