Professional Documents
Culture Documents
Free Protocol
Free Protocol
This is a simple protocol of communication between Controller and Displayer. In this protocol,
Controller is acted as Master, Displayer is acted as Slaver. So, those who develop controller can
only program simple communication read/write procedure instead of communication interrupt
service procedure.
First, Controller send a request to Displayer. After Displayer received the request, it will answer a
response to Controller.
Displayer has 128(MAX) words to exchange data with Controller. It is called MW0~MW127. And
every bit in words can be used as coil by calling MWx.i(i=0..15).
format of request
Node No. Command Address Length [Data] SUM
Node No. : Displayer No. ( 0 – 255, 0 means broadcast, and Displayer do not need to response )
Command : ‘R’/‘W’ means read from Displayer or write data to Displayer
Address : index No. of MW ( 0 – 127 )
Length : number of MW need to be read/written ( 1 – 128 )
Data : value of MW, there is no Data if Command is ‘R’
SUM : ( sum from Node No. to the byte before SUM ) mode 0x100
(note: if SUM is 0x5A, it need not to be considered)
format of response
Node No. Status [Address Length Data] SUM
format of Data
MWi MWi MWi+1 MWi+1 MWi+n-1 MWi+n-1
…
(hi) (lo) (hi) (lo) (hi) (lo)
when Address is i, and Length is n
Protocol
First, Controller send a request to Displayer. If Displayer received the requset and check SUM OK,
and the Node No. equal the No. of Displayer itself, the Display will answer a response. Otherwise,
Displayer will not answer anything
Controller should check time-out of response of Displayer. It’s over 50 ms. If time out, Controller
should resend the request.
Displayer should check time-out of data receive. It’s over 25ms. If time out, Display will initiate
communication, wait the request from Controler.
For Example:
a) Controller Read MW0,MW1 From DP210
Controller Send: 01H 52H 00H 02H 55H
DP210 Response: 01H 00H 00H 02H 00H 00H 00H 0CH 0FH
(MW0=0 MW1=12)