RS-422 RS-485 Communication protocol user's guide(1).pdf

(285 KB) Pobierz
RS-422/RS-485 Communications Protocol User's Guide 8000-2694-01
RS-422/RS-485
Communications Protocol
User’s Guide
About this Guide
This guide explains the RS-422/RS-485
asynchronous communications protocols and how
to develop a controlling protocol interface for
SpeedDome Ultra VII, SpeedDome Optima, and
later versions.
For SpeedDome® Ultra VII, SpeedDome
Optima®, and later versions
Contents
This guide will help you understand and use the
RS-422/RS-485 communication protocols. There
is no assurance of accuracy or correctness of the
document or verification of compliance by all
versions of products. Only currently required
commands are presented; legacy implementations
are not included. The protocols are subject to and
are expected to change and be revised due to
continuing product improvements.
Protocol Characteristics
Table 1. Protocol characteristics
Data rate
4.8 kbits/sec.
Data format
Asynchronous
Start bits: 1
Data bits: 8
Parity bits: 0
Stop bits: 1
Format
3 bytes:
Address
Command
Checksum
Topologies
Daisy Chain or Star
Physical Layer
RS-485, 4-Wire, Full duplex
Max. Devices per
line
10 (Depends on device loading.)
Cable type
2 shielded, twisted pair*
Wire gauge
22 AWG
If you need assistance...
Call Customer Support at:
Max. Length
1km (3,000 ft.)
Connection
Polarized Euro-style plug
Data and Power
Connections
Color-Code
Conventions
Color Designation
Black 24Vac
Red Ground
White 24Vac
Orange RS-422 Data In High (+)
Green RS-422 Data In Low (–)
Yellow RS-422 Data Out High (+)
Brown RS-422 Data Out Low (–)
800-507-6268, Option 2
561-912-6259, Option 2
* American Dynamics composite cable is recommended.
This cable also contains wires for power and video. If
another cable is substituted, cable wire colors may be
different.
RS-422/RS-485 COMMUNICQTIONS PROTOCOL
8000-2694-01, REV. B
USER’S GUIDE
1 of 20
21772169.008.png
RS-422/RS-485 Commands
The proportional speed pan and tilt commands
that are specified in the multi-byte format table are
recommended for control except for recording of
patterns.
When changing direction of movement, always
send a STOP command before you send the new
direction change.
The majority of dome control communications is
by 3-byte data packets consisting of Dome
Address, Command, and Checksum. The Dome
Address range is from hex 1 to 99 (1h to 63h),
depending on the type of control system used. To
Calculate the Checksum, subtract the sum of the
bytes from zero and use the least significant byte
of the results. The dome acknowledges a
command by sending its 1-byte address within 25
milliseconds.
The dome also recognizes multiple-byte data
commands. These commands consist of Dome
Address, Command, 1-N Data, and Checksum
bytes.
Pan and Tilt speeds, shown in °/sec in the tables,
are the nominal speeds with a wide-angle zoom
setting. The Zoom Adjusted Program™ (ZAP)
feature automatically adjusts pan and tilt speeds
scaled in proportion to zoom positions.
The dome will timeout in 30 seconds and stop
panning if all communications is lost.
Figure 1. 3-Byte Format
Start Bit
LSB
MSB
Stop Bit
0
1
2
3
4
5
6
7
(typical)
.208ms
2.08ms
Controller
Dome Address
Command Code
Checksum
Dome ACK*
//
Dome Address
6.24ms
≈14ms
* The dome echoes its address to
acknowledge the controller command.
RS-422/RS-485 COMMUNICATION PROTOCOLS
8000-2694-01, REV. B
USER'S GUIDE
2 of 20
21772169.009.png 21772169.010.png
Controller to Dome
Commands
Command
Name
Description
Standard 3-Byte Format
For standard 3-Byte Format see ( Figure 1)
Suspend all
Transmis-
sion
Disable transmission of
asynchronous messages
98
Note 2
Normal
transmis-
sion
Enable transmission of
asynchronous messages
99
ACK
Note 3
Table 2. Standard 3-byte Commands
Faster
Increase pan and tilt speeds
(72°/sec) until Faster Stop
9A
ACK
Faster Stop Stop faster (back to normal
24°/sec speed)
9B
ACK
Command
Name
Define
Boundary
Start boundary definition.
This command is followed
by dome movement
commands and four Mark
Boundary commands.
9C
ACK
Description
Pan Left
Pan left (24°/sec) until Pan
Stop
81
ACK
Pan Right
Pan right (24°/sec) until Pan
Stop
82
ACK
Mark
Boundary
Marks the current position
as a boundary
9D
ACK
Pan Stop
Stop panning
83
ACK
On Air
Set On Air status to tell the
dome to send the boundary
crossing command (see
9E
ACK
Tilt Up
Tilt up until Tilt Stop
84
ACK
Tilt Down
Tilt down until Tilt Stop
85
ACK
Tilt Stop
Stop tilting
86
ACK
Focus Near Focus Near until Focus Far
or Focus Stop
87
ACK
On Air
Reset
Reset On Air status
9F
ACK
Focus Far
Focus Far until Focus Near
or Focus Stop
88
ACK
Define
Pattern 1
Start defining
Pattern 1
A0
ACK
Focus Stop Stop focus
89
ACK
Define
Pattern 2
Start defining
Pattern 2
A1
ACK
Zoom In
Zoom in (telephoto) until
Zoom Out or Zoom Stop
8A
ACK
Define
Pattern 3
Start defining
Pattern 3
A2
ACK
Zoom Out
Zoom out (wide angle) until
Zoom In or Zoom Stop
8B
ACK
Save New
Pattern
Accept the new pattern as
the current pattern and
delete the old pattern
A3
ACK
Zoom Stop
Stop zoom
8C
ACK
Fast
Increase pan and tilt speeds
(48°/sec) until Fast Stop
8D
ACK
Request
Position
Request dome position
coordinates. (Dome ACKs
command followed by a
momentary pause & data)
A5
ACK
pause
Data
Note 1
Fastest
Increase pan and tilt speeds
(96°/sec) until Fast Stop
8E
ACK
Fast Stop
Stop fast/fastest speeds
(back to normal 24°/sec)
8F
ACK
Mark
Target 1
Store the current position as
Target 1
A8
ACK
Iris Open
Opens iris (manual iris
mode)/lightens Iris
Preference™ offset (auto
iris mode) until Iris Close or
Iris Stop
90
ACK
Mark
Target 2
Store the current position as
Target 2
A9
ACK
Mark
Target 3
Store the current position as
Target 3
AA
ACK
Iris Close
Closes iris (manual
mode)/darkens Iris
Preference™ offset (auto
iris mode) until Iris Open or
Iris Stop
91
ACK
Mark
Target 4
Store the current position as
Target 4
AB
ACK
Run
Pattern 1
Run Pattern 1
B0
ACK
Iris Stop
Stop iris offset adjustment
(also stops V-Phase Adjust)
92
ACK
Run
Pattern 2
Run Pattern 2
B1
ACK
All Stop
Stop all movement
93
ACK
Run
Pattern 3
Run Pattern 3
B2
ACK
Dome Type Request dome type
94
Note 1
Run New
Pattern
Run a newly defined pattern
to review before accepting it
to replace previous pattern
B3
ACK
Alarm
Status
Request status of alarm
inputs
95
Note 1
Send ACK
ACKnowledge response to
dome asynchronous
commands
97
ACK
Go to
Target 1
Go to preset position called
Target 1
B4
ACK
RS-422/RS-485 COMMUNICATION PROTOCOLS
8000-2694-01, REV. B
3 of 20
USER'S GUIDE
21772169.011.png 21772169.001.png 21772169.002.png 21772169.003.png 21772169.004.png
Multiple-Byte Format
Dome Address
Command Code
Data
Checksum
Command
Name
Description
Table 3. Multiple-Byte Commands
Go to
Target 2
Go to preset position called
Target 2
B5
ACK
Go to
Target 3
Go to preset position called
Target 3
B6
ACK
Go to
Target 4
Go to preset position called
Target 4
B7
ACK
Command
Name
Description
Pattern End Tells the dome to stop
recording (defining) a
pattern
B8
ACK
Goto
Position
Go to absolute position
Byte 1 = dome address
Byte 2 = command A6
Byte 3 & 4 = pan position
Byte 5 & 6 = tilt position
Byte 7 & 8 = zoom position
Byte 9 & 10 = digital zoom
Byte 11 = iris offset
Byte 12 = digital zoom limit
Byte 13 = checksum
Note: The fields are in different
positions in the Request Dome
Position command.
A6
ACK
Mark
Target 5
Store the current position as
Target 5
B9
ACK
Mark
Target 6
Store the current position as
Target 6
BA
ACK
Mark
Target 7
Store the current position as
Target 7
BB
ACK
Go to
Target 5
Go to preset position called
Target 5
BC
ACK
Go to
Target 6
Go to preset position called
Target 6
BD
ACK
Proportional
speed
Proportional speed pan or tilt
movement commands
Byte 1 = dome address
Byte 2 = command C0
Byte 3 = 81 Pan Left
Byte 3 = 82 Pan Right
Byte 3 = 84 Tilt Up
Byte 3 = 85 Tilt Down
C0
ACK
Go to
Target 7
Go to preset position called
Target 7
BE
ACK
Peel
Run default "Apple Peel"
pattern for a spiral view of
everything (only supported
in SpeedDome Ultra V and
DeltaDome II or late)
C6
ACK
Software
Version
Get software version
number from dome
C9
Note 1
Byte 4 = Speed
1 - 64 Hex = 1 - 100°/sec
Byte 5 = checksum
Output
Set output drivers
x = low nibble
bit 0 = output 1
bit 1 = output 2
bit 2 = output 3
bit 3 = output 4
0 = Off/Open
1 = On/Closed
Ex
ACK
Get
Configura-
tion Buffer
Allows access to the data
stored in the dome
configuration buffer
Byte 1 = dome address
Byte 2 = command C4
Byte 3 = 02
Byte 4 = offset
Byte 5 = byte count
Byte 6 = checksum
C4
Note
1
Notes:
1. See Table 6 for response message definitions.
2. This command is used to stop any
asynchronous messages from corrupting data
being sent to the controller because of a data
request. This message is usually sent to all
domes using the Broadcast address of
40(Hex). Since the domes have been
commanded to suspend messages, no ACK
will be generated.
3. When this command is issued, any pending
asynchronous messages will be sent.
Set Preset
Store the current position as
the specified preset.
Byte 1 = dome address
Byte 2 = command C7
Byte 3 = 01
Byte 4 = preset number
(0 – 95 (decimal))
Byte 5 = checksum
C7
01
ACK
Go To
Preset
Positions to preset specified by
preset number.
Byte 1 = dome address
Byte 2 = C7
Byte 3 = 02
Byte 4 = preset number
(0 – 95 (decimal))
Byte 5 = checksum
C7
02
ACK
Flip
Pan 180
°
from the current
CC
00
ACK
position.
RS-422/RS-485 COMMUNICATION PROTOCOLS
8000-2694-01, REV. B
4 of 20
USER'S GUIDE
21772169.005.png
Command
Name
Description
Command
Name
Description
Enter Dome
Menu
Display dome menu and
enters menu mode
CC
01
ACK
Network
Position
Command
(NP)
Allows the control system to
get position information in
degrees or motor counts.
Byte 1 = dome address
Byte 2 = command FA
Byte 3 = length & control
bit 0 - 4 = length of command
bit 5 = absolute / relative
0 = Absolution Position Move
1 = Relative Position Move
bit 6 = 0 (reserved)
bit 7= get/set position
0 = Get position
1 = Set position
Byte 4 = data unit flags bit
0 - 1 = length
00 = pan & tilt in motor counts
01 = pan & tilt in degrees
10 = pan & tilt in frames
bit 2 = digital & optical zoom
1 = separate
0 = combine
bit 3 = Optical Units
0 = Optical Zoom in
magnification factor.
1 = Optical Zoom in counts
bit 4 = (reserved)
bit 5 = (reserved)
bit 6 = auto focus
0 = off
1 = on
bit 7 = auto iris
0 = off
1 = on
Bytes 5 through the next to
last Byte = Data Bytes ( based
on Bytes 3 & 4)
Last Byte = checksum
(See Network Position
Command Section)
FA
Note
1
Exit Dome
Menu
Exits dome menu and returns
to normal dome operation
CC
02
ACK
Repeat
Pattern 1
Run pattern 1 continuously
CC
03
ACK
Repeat
Pattern 2
Run pattern 2 continuously
CC
04
ACK
Repeat
Pattern 3
Run pattern 3 continuously
CC
05
ACK
Get Pattern
Size
Get total number of pattern
steps used in each of the 3
patterns
CC
06
Note
1
Clear
Pattern
Resets pattern to apple peel
(default spiral). Only send this
command if “Define Pattern X”
command sent before it.
CC
07
ACK
Reset Auto
Focus & Iris
Put focus in auto focus mode
and restores the iris set-point
to the factory setting
CC
08
ACK
Reset
Dome
Dome Soft Reset
CC
09
ACK
Increase
V-Phase
Delay
Increase the vertical phase
delay
CC
0A
ACK
Decrease
V-Phase
Delay
Decrease the vertical phase
delay
CC
0B
ACK
Stop
Adjusting
V-Phase
Stop the V-Phase adjustment
CC
0C
ACK
QuickSet ® If byte 4 is zero the dome will
display or clear (if already
displayed) the QuickSet
function menu.
If byte 4 is not zero the dome
will perform the QuickSet
command of such number.
Byte 1 = dome address
Byte 2 = command CD
Byte 3 = Access Level
0 = Admin
1 = Operator
Byte 4 = entered number
Byte 5 = checksum
CD
ACK
Display
Text
Display text on dome video
Byte 1 = dome address
Byte 2 = command DE
Byte 3 = row (4,5, or 10)
Byte 4 = Column (0-27)
Byte 5 = length
Byte 6…= ASCII text to display
Last Byte = checksum
DE
ACK
RS-422/RS-485 COMMUNICATION PROTOCOLS
8000-2694-01, REV. B
5 of 20
USER'S GUIDE
21772169.006.png 21772169.007.png
Zgłoś jeśli naruszono regulamin