Selection Of The Relay Board, Data Log - Conrad Electronic 197720 Notice D'emploi

Table des Matières

Publicité

Les langues disponibles

Les langues disponibles

6. Selection of the relay board, data log

 Serial data transmission
Data transmission takes place in line with the RS232 standard with 19200 Baud without
handshake signals, 8 data bits, without parity bit and with one stop bit. The commands are
generated by the control computer (e.g. PC).
For each executed command, the relay board controller returns an answer. Commands may
also be passed on.
Each relay board is addressed via an address. The first board receives its address via the
command "1" (setup initialization). With each additional board, the address increases by 1.
Each command and each response consists of a sequence of 4 bytes. We will call this "frame"
in the following.
 Frame structure
Byte 0
Command
Byte 1
Board address
Byte 2
Data
Byte 3
Check sum (XOR from Byte0, Byte1 and Byte2 )
 Transfer of commands
As a rule, the controller of a relay board only executes commands addressed to it (exceptions
see "Initialization" and "Broadcasting"). It passes on other commands unchanged after
checking for transmission errors.
When cascading several relay boards, time differences in the execution of the
switching operations result due to the data runtime.
 Checking for transmission errors
The check sum in byte 3 results from the exclusive disjunction (XOR) of byte 0, byte 1 and
byte 2.
If the relay board processor detects an error in the received frame, it sends a 4-byte error
message and does not pass the command on. Error response:
255 - own address - x - new check sum (x stands for "without importance")
If a command is sent to a board that does not exist, the message is returned unchanged,
because each board passes on the command that is not intended for it.
31

Publicité

Table des Matières
loading

Ce manuel est également adapté pour:

197730

Table des Matières