| The Header byte is used to signal the beginning of a command packet. When waiting for a new command, each module will ignore any incoming data until it sees a Header byte. The Module Address byte is the address of the target module. The address can be an individual address, or the group address for the module. (See Group Commands below.) The Command byte is broken up into an upper nibble (4 bits) and lower nibble (4 bits). The lower nibble contains the command value (O - 15), and the upper nibble contains the number of additional data bytes required for that command (O- 15). It is up to the host to insure that the upper nibble matches the number of additional data bytes actually sent. The Additional Data bytes contain the specific data which may be required for a particular command. Many commands have a "control" or "mode" byte in addition to other parameters required for the command. Some commands require no additional data. It is up to the host to make sure that the proper number of additional data bytes is sent for a particular command, and that the upper nibble of the command byte is equal to this number. Once a module receives a complete packet, and the Address byte matches its address, it will verify the checksum and immediately (within O.51 milliseconds) begin to process the command. If there is a checksum error in the command packet or any other sort of communications error (framing, overrun), the command will not be executed, but a status packet will still be returned. If there are no errors, the command will then be executed and a status packet returned. (Note that motion commands will initiate the motion and return a status packet immediately without waiting for the motion to finish.) |