Residential Control Systems TXB16 Manual do Proprietário Página 191

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 329
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 190
Chapter 16 Serial Interface 177
serial device the controller is communicating with is using ASCII format, this will not be a problem (as
binary data won't be used).
Up to 254 characters can be included in a single data string.
Before you use this serial input capability, it's important to understand exactly how the controller handles
incoming data. Otherwise, errors or data loss could occur in your application. This section describes the
serial receive process.
1) When the first serial character is received, the controller checks to see if it's a comma. If so, it is
interpreted as a command (i.e., this is "Command Data"). The serial interface protocol
documentation describes how commands are handled. The following steps are not applicable.
Any other character (other than the prohibited DC1 and DC3 characters) are interpreted as the first
character of a new incoming data string, called "User Data". At this point, the "User Data" is
considered "In Process", and you can check for this condition in an If-Then statement if necessary.
2) Subsequent incoming characters are added to the end of the "User Data" string.
3) When the data is terminated (as explained below) the incoming data is considered "Complete". You
can check for this condition in an If-Then statement if necessary.
4) When the data is complete, the controller executes any actions you've specified in the "Serial Data
Input" event. This is where you will check the "User Data" string and do whatever you need to with
it.
5) While the controller is performing the "Serial Data Input" event actions, NO FURTHER SERIAL
DATA WILL BE READ IN. Any incoming characters will be ignored. This includes commands that
might come in from the software running on the PC.
6) When the controller finishes the "Serial Data Input" event actions you defined, it clears the "User
Data" input string. Thereafter, you will not be able use the string. The controller is now ready to
receive more serial input data (either commands or user data).
Data Terminator
HomeVision needs to know when the incoming serial data is complete, or "terminated", so it knows when to
take action on it. You can set HomeVision to use either of two methods:
1) Carriage return:
Reception is terminated when a carriage return (a binary value of 13) is received.
It is also terminated if there is a one second gap after a character (this is necessary to prevent the
controller from locking up if the data does not contain a carriage return). This is the default method
and works well for receiving ASCII data.
2) 50ms timeout:
Reception is terminated when a gap of 50 milliseconds or longer occurs after a
character. It is not
terminated by a carriage return. This allows reception of binary data.
Select the method to use from the "Controller Settings" screen under the "Configure" menu.
Note that HomeVision is limited to receiving 254 characters. If this limit is reached before it is terminated by
one of the two above methods, it will be immediately terminated (as there is no more room to store the
incoming data).
Vista de página 190
1 2 ... 186 187 188 189 190 191 192 193 194 195 196 ... 328 329

Comentários a estes Manuais

Sem comentários