Datavideo PTZ VISCA Commands Rev. 1.7 - 20180409 PDF
Datavideo PTZ VISCA Commands Rev. 1.7 - 20180409 PDF
Datavideo Technologies
PTZ and Block Camera Control Protocols
Error Messages.................................................................................................................. 9
2
PTZ and Block Camera Control Protocols
Overview of VISCA
In VISCA, the side outputting commands, for example, a computer is called the
controller, while the side receiving the commands, such as a Datavideo camera, is
called the peripheral device. The camera serves as a peripheral device in VISCA. In
VISCA, up to seven peripheral devices like the BRC-300/P can be connected to one
controller using communication conforming to the RS-232C/RS-422 standard. The
parameters of the RS-232C/RS-422 interfaces are listed as follows:
Set the DTR input (the S output of the controller) of VISCA IN to H when controlling
VISCA equipment from the controller.
Fig. 1 VISCA network configuration
3
PTZ and Block Camera Control Protocols
Some of the commands for setting camera units can be sent to all devices at one time
(broadcast). In the case of broadcast, the header should be hexadecimal 88H.
Note
Fig. 2 shows the packet structure, while Fig. 3 shows the actual waveform. Data flow will take place
with the LSB first.
4
PTZ and Block Camera Control Protocols
Timing Chart
As VISCA Command processing can only be carried out one time in a Vertical cycle, it
takes the maximum 1V cycle time for an ACK/Completion to be returned. If the
Command ACK/Completion communication time can be cut shorter than the 1V cycle
time, then every 1V cycle can receive a Command.
From this point, if 2 or more commands in a row are to be sent, wait for the first
command (for normal commands, an ACK or an error message, for query commands,
an Inquiry Packet) to be carried out before sending the next one.
Command
Sends operational commands to the camera.
Inquiry
Used for inquiring about the current state of the camera.
Command Note
Packet
Inquiry 8X QQ RR … QQ1) =
FF Command/Inquiry
RR2) = Category
Code
5
PTZ and Block Camera Control Protocols
1)
QQ = 01 (Command), 09 (Inquiry)
2)
RR = 00 (Interface), 04 (Camera 1), 06
(Pan/Tilter)
X = 1 to 7: Camera address
ACK message
Returned by the camera when it receives a command. No ACK message is returned
for inquiries.
Completion message
Returned by the camera when execution of commands or inquiries is completed. In
the case of inquiry commands, it will contain reply data for the inquiry after the 3 rd
byte of the packet. If the ACK message is omitted, the socket number will contain a
0.
Reply Note
Packet
Ack X0 4Y FF Y = socket
number
Completion X0 5Y FF Y = socket
(Commands) number
Completion X0 5Y … FF Y = socket
(Inquiries) number
X = 9 to F: camera address + 8
Error message
When a command or inquiry command could not be executed or failed, an error
message is returned.
Error Description
Packet
X0 6Y 01 FF Message length error
X0 6Y 02 FF Syntax error
X0 6Y 03 FF Command buffer full
X0 6Y 04 FF Command cancelled
X0 6Y 05 FF No socket (to be cancelled)
X0 6Y 41 FF Command not executable
6
PTZ and Block Camera Control Protocols
Socket number
When command messages are sent to the camera, it is normal to send the next
command message after waiting for the completion message or error message to
return.
As the completion message or error message also has a socket number, it indicates
which command has ended.
The ACK message is not returned for these commands and inquiries, and only the
completion message of socket number 0 is returned.
Before starting control of the camera, be sure to send the Address command and the
IF_Clear command using the broadcast function.
IF_Clear
Clears the command buffers in the camera and cancels the command currently being
executed.
90 42 FF 90 been accepted,
52 FF and Completion
when a
command has
been executed.
81 01 04 38 90 60 02 FF Accepted a
FF (Syntax Error) command which
(Example) is not supported
or a command
lacking
parameters
81 01 04 38 90 60 03 FF There are two
02 FF (Command commands
(Example) Buffer Full) currently being
executed, and
the command
could not be
accepted.
81 01 04 08 90 61 41 FF Could not
02 FF (Command execute the
(Example) Not command in the
Executable) current mode.
90 62 41 FF
Inquiry 81 09 04 38 90 50 02 FF ACK is not
Command FF (Completion) returned for the
(Example) inquiry
command.
81 09 05 38 90 60 02 FF Accepted an
FF (Syntax Error) incompatible
(Example) command.
Address 88 30 01 FF 88 30 02 FF Returned the
Set device address
to +1.*
IF_Clear 88 01 00 01 88 01 00 01 FF Returned the
(Broadcast) FF same command.
8
PTZ and Block Camera Control Protocols
Do not transmit the command (except Address Set, IF_Clear, CAM_POWER), when
menu panel shows on the screen. In that case, clear the menu panel first using
CAM_Menu Command, and then proceed.
ACK/Completion Messages
Error Messages
11
PTZ and Block Camera Control Protocols
12
PTZ and Block Camera Control Protocols
Right 8x 01 06 01 VV
WW 02 03 FF
UpLeft 8x 01 06 01 VV
WW 01 01 FF
UpRight 8x 01 06 01 VV
WW 02 01 FF
DownLeft 8x 01 06 01 VV
WW 01 02 FF
DownRight 8x 01 06 01 VV
WW 02 02 FF
Stop 8x 01 06 01 VV
WW 03 03 FF
AbsolutePosition 8x 01 06 02 VV 00 Speed VV (=01H:
0p 0q 0r 0s 0t 0a Slow to 12H:Fast)
0b 0c 0d FF pqrst: Pan
Position*
ZZZZ: Tilt
Position*
RelativePosition 8x 01 06 03 VV 00 Speed VV (=01:
0Y 0Y 0Y 0Y 0Y 0Z Slow to 12h:Fast)
0Z 0Z 0Z FF YYYYY: Pan
Position*
ZZZZ: Tilt
Position*
Home 8x 01 06 04 FF
Reset 8x 01 06 05 FF
CAM_ImgFlip On 8x 01 04 66 02 FF
Off 8x 01 04 66 03 FF
Cam_PanReverse On 8x 01 7E 01 06 00
01 FF
Off 8x 01 7E 01 06 00
00 FF
Cam_TiltReverse On 8x 01 7E 01 09 00
01 FF
Off 8x 01 7E 01 09 00
00 FF
13
PTZ and Block Camera Control Protocols
14
PTZ and Block Camera Control Protocols
15
PTZ and Block Camera Control Protocols
BC-200T: 02 02
PTC-150: 01 50
PTC-150T: 01 50
PTC-200: 02 00
PTC-200T: 02 00
xx.xx = MCPU version,
yyy = FPGA version,
zz.zz = Motor CTL version
CAM_ImgFlipInq 8x 09 04 y0 50 02 FF On
66 FF y0 50 03 FF Off
CAM_PanReverseInq 8x 09 7E y0 50 01 FF On
01 06 FF y0 50 00 FF Off
CAM_TiltReverseInq 8x 09 7E y0 50 01 FF On
01 09 FF y0 50 00 FF Off
PanTilt_Status 8x 09 06 y0 50 pq rs pqrs: PanTilt Status
10 FF FF
PanTilt_Max_Speed 8x 09 06 y0 50 pq rs pq: Pan Max Speed, rs:
11 FF FF Tilt Max Speed
PanTilt_Position 8x 09 06 y0 50 0p 0q pqrst: Pan Position (*)
12 FF 0r 0s 0t 0a abcd: Tilt Position (**)
0b 0c 0d 0z zzzz: Zoom Position (***)
0z 0z 0z FF (*)Pan Position “pqrst”:
(center) 0 degree=
00000H, 90 degree =
06400H, 135 degree =
09600H, -90 degree =
F9C00H,
(**)Tilt Position “abcd”
(center) 0 degree =
0000H, 45 degree =
3200H, 90 degree =
6400H, -15 degree =
EF56h.
(***) Zoom Position
0000H = Zoom ratio1
(wide), 2A1DH = Zoom
ratio 5, 3486H = Zoom
16
PTZ and Block Camera Control Protocols
bb:
bit5~bit0=video format
(Ref. to command 24)
cc: WB mode
00 = auto,
01 = indoor,
02 = outdoor(5600K),
03 = one push WB,
04 = ATW,
05 = manual ,
08 = lamp
17
PTZ and Block Camera Control Protocols
18
PTZ and Block Camera Control Protocols
Revision History
V1.7: Revised the absolute positions, PTZ position. Added Dual color tally.
19