8/6/2019 Pdr Protocol
1/5
PDR-1600 & PDR-2160 Protocol
The purpose of this document describes the protocol of PDR-1600 and PDR-2160. The protocol is
used by the device of Merit Lilin keyboard and controlled by a PC. Both of keyboard and PC
are connected via RS-485 interface.
PDR-1600 Protocol
RS-232 Setting :
9600, N, 8, 1
Commend format:
LEADING_CODE +
ID +
COMMAND_CODE +
/COMMAND_CODE +
ENDING_CODE
1. LEADING_CODE (1 byte): 0xDB
2. ID (1 byte): RS-485 ID (0 to 255)
3. COMMAND_CODE (1 byte): defined in command code section
4. /COMMAND_CODE: COMMAND_CODE XOR 0xFF
5. ENDING_CODE: 0xD4
Command Code:
Command Code Mapped Button
0x00 00x01 10x02 20x03 30x04 4
0x05 50x06 60x07 70x08 80x09 90x0A CAM0x0B CALL0x0C SETUP0x0D ESC0x0E ENTER0x0F NULL0x10 >0x12 PLAY
0x13 SEARCH0x14 STOP
8/6/2019 Pdr Protocol
2/5
0x15 ||0x17 REC0x18 Up0x19 Down0x1A Left
0x1B Right0x1C Auto Pan0x1D Preset0x1E Auto IRIS0x1F Auto Focus0x20 IRIS+0x21 IRIS-0x22 Zoom+0x23 Zoom-0x24 Focus+0x25 Focus-0x26 NULL0x27 Center0x28 4 window-division0x29 6 window-division0x2A 9 window-division0x2B 13 window-division0x2C 16 window-division0x2D NULL0x2E SWAP NULL0x2F NULL0x90 POWER->NULL
8/6/2019 Pdr Protocol
3/5
Merit Lilin PDR-2160/PDR-3160 Protocol
RS-232 Setting :
9600, N, 8, 1
Commend format:
Byte Value Function1 DC Leading code2 01 to FF Address (1 to 255)3 Command 1 (see below)4 Command 2 (see below)5 Parameter 1 (see below)6 Parameter 2 (see below)7 00 to FF Check sum
All values below are shown in hexadecimal (base 16).
The synchronization byte is always 0xDC.
The address is the logical address of the DVR being controlled.
The check sum is the 8 bit (modulo 256) sum of the payload bytes (bytes 2 through 6) in the
message.
Function Com #1 Com #2 Para #1 Para #2 Note Model
400 2160 3160SETUP 01 00 00 00 V V V ESC 02 00 00 00 V V V ENTER 03 00 00 00 V V V Fast Rewind > 05 00 00 00 V V V START |< 06 00 00 00 V V END >| 07 00 00 00 V V PLAY 08 00 00 00 V V V SEARCH 09 00 00 00 V V STOP 0A 00 00 00 V V V PAUSE 0B 00 00 00 V V V REC 0C 00 00 00 V V V SEQ 0D 00 00 00
Call camera #1 20 00 0x01 00 V V V Call camera #2 20 00 0x02 00 V V V Call camera #3 20 00 0x03 00 V V V Call camera #4 20 00 0x04 00 V V V Call camera #5 20 00 0x05 00 V V Call camera #6 20 00 0x06 00 V V Call camera #7 20 00 0x07 00 V V Call camera #8 20 00 0x08 00 V V Call camera #9 20 00 0x09 00 V V Call camera #10 20 00 0x0a 00 V V Call camera #11 20 00 0x0b 00 V V Call camera #12 20 00 0x0c 00 V V Call camera #13 20 00 0x0d 00 V V Call camera #14 20 00 0x0e 00 V V
Call camera #15 20 00 0x0f 00 V V Call camera #16 20 00 0x10 00 V V
8/6/2019 Pdr Protocol
4/5
Window-division mode 21 00 MM NN MM: divisionwindows
NN: page
select
NN=0,
sequence
switch modePIP 22 00 00 NN NN: sub-
channel cam
no.
ranges from 1
to 16
V V
Call Monitor 23 00 Monitor no 00Call Monitor +Camera
24 00 Monitor no Camera no
Stop Code 40 00 00 FFSet Preset C0 Preset No.
00 to 3F
Dwell
00 to FF
Speed
01 to FF
Clear Preset 40 02 00 Preset No.
00 to 7F
Clear All Preset 40 03 FF F5Go to Preset 40 04 00 Preset No.
00 to 7F
Set group 40 05 00 1110xxxxb Auto Pan 40 06 00 00
Stop Auto Pan 40 07 00 00Flip (180 about) 40 09 00 00Light 40 0A 00 00Spray 40 0B 00 00
Wiper 40 0C 00 00Remote Reset 40 0F 00 00Reset Camera todefault
40 10 00 00
Auto Focus 40 14 00 00 Auto Iris 40 15 00 00
ICR swap 40 18 00 00Entry camera setup
menu40 1A 00 00
Esc camera setup menu
40 1B 00 00
Privacy Zone on/off 40 2C 00 00 to 01Set privacy zonestart
40 2D 00 01 to 08
Set privacy zone end 40 2E 00 01 to 08Set privacy zonesave
40 2F 00 01 to 08
Delete privacy zone 40 30 00 01 to 08Lens speed swap 40 34 00 00
Date Information 41 Year Month DateTime Information 42 Hour Minute Second
8/6/2019 Pdr Protocol
5/5
Pan and Tilt Commands are as follows:
Command 1 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 00 1 reserved reserved Iris
Close
Iris
Open
Focus
Far
Focus
NearCommand 2 1 for
zoom1 for
pan /
tilt
Zoom
Wide
Zoom
Tele
Tilt
Down
Tilt
Up
Pan
Left
Pan
Right
Parameter 1 Tilt speed step $00 to $0F Pan speed step $00 to $0FParameter 2 reserved reserved reserved reserved Zoom speed step $00 to 0F
R ESPONSEThe general response to a received command has the following format.
Byte Value Function1 E0 Synch Byte2 01 to FF Address3 Command 1 (see below)4 Command 2 (see below)5 Parameter 1 (see below)6 Parameter 2 (see below)7 00 to FF Check Sum
Re-command System to receiverCommand 1 Command 2 Parameter 1 Parameter 2
Stop Code 00 00 00 Auto statusSet Preset 80 Preset no.
00 to 7F
Dwell time
00 to FF
Speed
01 to FF
Go to Preset 81 Preset no.
00 to 7F
Dwell time
00 to FF
Speed
01 to FF
Clear Preset 00 02 00 Preset no.
00 to 7F
Clear All Preset 00 03 FF F5Pan position 00 31 High byte Low byteTilt position 00 32 High byte Low byteZoom position 00 33 High byte Low byte
The auto status information is one byte formatted as follows:
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 01 1 0 0 0 AI AF Auto pan
If the bit is on (1) then auto is active. If the bit is off (0) then auto is inactive.
Top Related