|Top Previous Next|
When the DS is powered up its serial port is running in the data routing mode (see serial port and serial communications). To enable DS programming via the serial port the latter must be switched into the serial programming mode.
There are two methods of putting the serial port of the DS into the serial programming mode:
By pressing setup button (for DS100R, DS100B, DS203; for EM100, EM120, EM200, EM203(A)- by pulling MD line low for at least 100 ms). This forces the DS to enter the serial programming mode with default communication parameters of 38400-8-N-1, half-duplex mode (regardless of the value of corresponding settings). This method always works and cannot be disabled.
By sending an escape sequence to the serial port (at a current baudrate). Once the escape sequence is recognized the DS will enter the serial programming mode at a current baudrate. Other communications parameters will still default to 8-N-1, half-duplex mode. For the escape sequence to work it must be previously enabled through the Soft Entry (SE) setting. Additionally, this setting provides two different escape sequences to choose from.
Notice, that while in the serial programming mode the serial port of the DS uses half-duplex mode of operation (suitable for RS485 communications). In this mode the RTS line provides direction control and the CTS line is unused. When the DS is waiting for the serial command to arrive the RTS line is HI*. When the DS outputs its reply to the serial command the RTS line is LOW* for as long as it takes to output this reply. Such behavior is intended to allow the RTS line to control the direction pin of RS485 interface ICs and RS232-to-RS485 converters.
Just because the DS is using the half-duplex operation in the serial programming mode doesn't mean that programming through RS232 or RS422 is not supported. If the actual hardware port on the DS is RS232 (RS422) then TX and RX lines should be used to send commands and receive replies while the RTS line should simply be ignored (i.e. RTS/CTS flow control must be disabled on the serial device connected to the DS). This was the rationale for choosing the half-duplex mode: it does not interfere with programming through RS232 or RS422 while making the DS also ready for programming via RS485.
All serial commands and replies use the following format:
STX (ASCII code 2) and CR (ASCII code 13) characters provide necessary encapsulation. All data before the STX and after the CR is ignored. Command/reply field contents has been explained in programming.
Example: here is a sample exchange between a serial device and the DS. Special characters are represented as follows: STX- J, CR- Ã.
Serial device-->DS: JGIPÃ
DS-->Serial device: JA192.168.100.40Ã
* HI and LOW states are described with respect to the serial ports of DS100R, DS100B, DS203. For EM100, EM120, EM200, EM203(A) the signaling is exactly opposite.