Configuration mode: ds2 (slave) <- host (master) – IDEC DS2_Series User Manual

Page 35

Advertising
background image

DS2

series

Instruction

manual

34

7.3. Configuration mode: DS2 (slave) Host (master)

7.3.1 Host appropriation procedure of the bus


To access the configuration mode, the DS2 has to receive a special command that momentary
suspends scanning and the control is passed to the host. The host thus becomes the master and
the DS2 the slave. All the outputs are deactivated.
The device remains in this mode until it receives the configuration quit command.
The host controls the bus and becomes the master sending a particular string denominated
synchronism code (ASCII SYN ‘0x16’).
The DS2 light grid is normally the master and is set to discharge control only after the following
conditions:
Between one scanning and the other, the DS2 is in the receiving mode for a short period (few
milliseconds). To discard the control, the DS2 has to receive, 3 synchronism codes within 2.5
seconds from the receipt of the first code, the device will then suspend the data transmission and
leaves a larger receiving window open (about 250 milliseconds) where the host can send the
command.
If the command is not decoded or exceeds the time available, the DS2 will re-assume the line
control and the operation has to be repeated. This technique has to be used before sending any
command if the DS2 light grid is the master. The transmission of the synchronism codes is not
necessary if DS2 is already the slave.

The following figure represents an example of data exchange on the serial communication line
using the SYNCHRONISM command.
The transmitted packets are highlighted in black (TXD) by the DS2 at the end of each scanning.
When effecting a command, the host begins to send the SYN codes (0x16) in the temporal windows
left between the two consecutive scannings (see points 1, 4 and 5). If the host transmits
contemporarily the SYN codes to the DS2, the SYN codes will be lost (see points 2 and 3).
The codes have to be continuously sent until the DS2 ends the packet transmission (see point 6).
The Host can now include the 0x43 synchronism command and the DS2 replies with the respond
packet (see point 7 and 8). The DS2 effects the scanning immediately after (see point 9).

answer 0x63

command 0x43

Advertising