Mitsubishi Electric RS232/485/LAN Serial Communication Control Manual page 54

Rs232/485/lan serial communication control
Table of Contents

Advertisement

B. Application Note for RS485 based communication using CAT5 Tx BOX.
1) RS-485 is half-duplex communication. So data flow control in HOST side is required.
2) Data flow control is done by following procedure.
HOST send data to Monitor while both of RTS and DTR signal is "LOW" (Clear) status.
HOST receive data from Monitor while RTS signal is "HIGH"(Set) status.
3) Following chart shows more detailed timing of data flow control by RTS.
RTS&DTR
TxD(Host->Monitor
RxD(Monitor->Host)
HOST PC should keep RTS signal "LOW" while above (b) period at least. (a) and (c) is required in order to make reliable
communication between HOST and Monitor.
4) Example of programming.
System:
Case1:OS:Windows XP Professional SP2, CPU:Centrino Duo 1.66GHz
Case2:OS:Windows XP Home SP1, CPU: Pentium4 2.8GHz
Case3:OS:Windows XP Professional SP2, CPU:Pentium3 933MHz
Procedure:
///
/// Send Data ///
・・・・
EscapeCommFunction(hFile,CLRRTS)
SLEEP(20)
WriteFile()
SLEEP(70)
EscapeCommFunction(hFile,SETRTS)
・・・・
/// Receive Data (Ex. by Polling timer at 100msec interval)///
・・・・
ReadFile()
・・・・
///
------------------------------------------- end of document--------------------------------------
a
Request
b
a: setup time of TxD by HOST: up to programming
b: Data transmission time of TxD by HOST: up to data length
c: Margin time of TxD period by HOST: up to programming
d: Reply preparation time by Monitor =approx.140msec(min)
; CLEAR RTS & DTR
; put 20msec delay for above "a: setup time of TxD by HOST".
; Data transmission of TxD
; put 70msec delay for above "c: Margin time of TxD period by HOST".
; SET RTS& DTR
; Data Receive of RxD
(54/56)
c
Reply
d

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mdt652s

Table of Contents