7
RS-232C Communication
56&&RPPXQLFDWLRQ
Connecting the cable
1.
7XUQRIIWKHSURMHFWRUDQGWKHFRPSXWHU
2.
&RQQHFWWKH&21752/SRUWRIWKHSURMHFWRUZLWKD56&SRUWRI
WKHFRPSXWHUE\D56&FDEOHFURVV8VHWKHFDEOHWKDWIXO¿OOVWKH
VSHFL¿FDWLRQVKRZQLQWKHSUHYLRXVSDJH
3.
7XUQWKHFRPSXWHURQDQGDIWHUWKHFRPSXWHUKDVVWDUWHGXSWXUQWKH
SURMHFWRURQ
Communications setting
ESV1
1. Protocol
&RQVLVWRIKHDGHUE\WHVFRPPDQGGDWDE\WHV
2. Header
%(()&5&BORZ&5&BKLJK
&5&BORZ/RZHUE\WHRI&5&ÀDJIRUFRPPDQGGDWD
&5&BKLJK8SSHUE\WHRI&5&ÀDJIRUFRPPDQGGDWD
3. Command data
&RPPDQGGDWDFKDUW
E\WHB
E\WHB
E\WHB
E\WHB
E\WHB
E\WHB
Action
7\SH
Setting code
low
KLJK
low
KLJK
low
KLJK
$FWLRQE\WHB
Action
&ODVVL¿FDWLRQ
&RQWHQW
1
Set
&KDQJHVHWWLQJWRGHVLUHGYDOXH
2
Get
5HDGSURMHFWRULQWHUQDOVHWXSYDOXH
4
Increment
,QFUHPHQWVHWXSYDOXHE\
5
'HFUHPHQW
'HFUHPHQWVHWXSYDOXHE\
6
Execute
Run a command.
6
7
8
9
1
2
3
4
5
6
7
8
9
1
2
3
4
5
&21752/SRUW
56&FDEOHFURVV
56&SRUW
RIWKHSURMHFWRU
RIWKHFRPSXWHU
&'
5'
5'
7'
7'
'75
*1'
*1'
'65
RTS (7)
(7) RTS
&76
'76
- (9)
(9) RI