VIDEOLOGY IMAGING SOLUTIONS
CCD Color Cameras
APN-20Z704TDN and APN-21Z704TDN Application Note Rev A April 2005
Application Note
30 Pages
Preview
Page 1
® IMAGING SOLUTIONS INC.
Application Note ZOOM CCD Color Camera 20Z704TDN / 21Z704TDN PRELIMINARY
Information may change without notice. This document provides technical information for the user. Videology reserves the right to modify the information in this document as necessary. The customer should make sure that they have the most recent manual version. Videology holds no responsibility for any errors that may appear in this document.
Videology Imaging Solutions, Inc. USA
Videology Imaging Solutions, B.V. Europe
37M Lark Industrial Parkway Greenville, RI 02828 Tel: 401-949-5332 Fax: 401-949-5276
Doc # APN 20/21Z404TDN Revision: A
Liessentstraat 2B NL-5405 AG Uden, The Netherlands Tel: +31 (0) 413-256261 Fax: +31 (0) 413-251712
Issue Date: 04/21/2005 Page 1 of 30
Table Of Contents
Features ... 3 Basic Functions ... 3 2.1. Zoom/Focus Lens Control... 3 3. General Operation ... 10 4. Communication Format ... 11 5. Command List... 15 5.1. Response Packet... 15 6. General Control Commands ... 18 7. Focus Control Commands ... 20 8. Zoom/Focus Operation Commands... 21 9. Preset Control Commands ... 23 10. Camera Status Control Commands ... 24 11. Key Action Commands - 1 (*NN 75 PP XX YY) ... 28 12. Key Action Commands - 2 (*NN 75 PP XX YY) ... 29 13. Contact ... 30 1. 2.
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 2 of 30
1. Features • High Sensitive 1/4 inch Sony Super HAD CCD • Built in Auto Focus / Auto Iris • Optical Power Zoom Lens 20/21Z404’s: 26x • Digital Zoom: 10x • 20/21Z704's: 26x (260x Zoom) • Day & Night Function • WDR Function • RS-232C, RS-232 TTL, RS-422, RS-485 communication • Mirror Image function • Negative / Positive function • Preset function • OSD (On Screen Display) • Powerful MENU control
2. Basic Functions 2.1.
Zoom/Focus Lens Control
Zoom/Focus Lens Position Range Optical zoom lens position range
000 hex ~ 7A2 hex
Focus lens position controllable range
1F1 hex ~ 60F hex (It is not specified)
Digital zoom position
00 hex ~ E7 hex
Zoom Trace Mode Zoom Trace: If the zoom lens moves, the focus lens also moves. The focus lens will be moved to a certain calculated position. Lens moves to the target zoom position. Zoom Trace Mode (ZTM)
It is a zoom tracing mode
Non-Zoom Trace Mode (NZT)
When the zoom lens moves, the focus lens, so the picture will not be focused while the zoom lens moves to the target position.
One Shot Focus The camera starts the auto focusing action only one time. When the One Shot Focus Command is sent, the focus lens moves to adjust the focus for the subject. Auto Zoom The zoom lenses have a repeated action in a certain zoom range. Zone Label Editing function of zone label Day & Night Function Day Mode
IR Cut filter is closed
Night Mode
IR Cut filter is opened
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 3 of 30
WDR Function Wide Dynamic Range function Focus Lens Control Mode Auto Focus Mode User cannot control the focus lens. Manual Focus Mode User can control Focus lens in the restricted range of calculated by camera microcomputer. Special Focus Mode User can control Focus lens as wishes. The controllable range of focus Lens is the total focus range (1F1 ~ 60Fhex). In this mode, the focus lens is controlled by the user only. (!) Auto/Manual mode is called the basic mode. (!!) In case that the current focus mode is in Special mode, you can set the Auto and Manual mode as basic focus mode. Focus Lens Operation Focus Mode Auto
Manual
Special
O
O
X
O
O
X
O
X
X
O
O
O
X
O
XO (*)
X
O
O
Not specified
Not specified
Full range
Contents Zoom Trace function Auto focusing after zoom trace action Auto focusing in normal condition Auto focusing in One Shot AF command Near / Far action (Key Action command) S-Near/S-Far action (Key Action command) Controllable focus range (*)
X: in case the basic mode is Auto mode O: in case the basic mode is Manual mode
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 4 of 30
Focal Range (Rain focus) Function Focal Range Function protects focusing in a certain distance. If the object is placed within selected focal range distance, the camera can’t focus to the object: 10cm / 50cm / 80cm / 130cm 2m / 4m focal ranges Figure 1. 50cm focal range mode Camera
50cm
Non-focusing region (0cm ~ 50 cm)
Focusing region (50cm ~ infinite)
Preset Operation Internal Preset Mode In this mode, the camera memorizes the Zoom/Focus/Digital zoom position into the Internal Nonvolatile Memory of the camera. Total 64 presets External Preset Mode In this mode, the camera memorizes the Zoom/Focus/Digital zoom position into the Internal Volatile Memory of the camera. Total 8 presets Preset Response Packet It is a response that the zoom/focus lens will finish moving to the selected preset position. The transmission of this packet is decided by the Transmission Preset Response Packet (See Preset Control Commands). Preset Response Packet: * NN 11 11 11 YY
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 5 of 30
Figure 2. Preset Position Moving Action
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 6 of 30
External Preset Position Saving Method Memorize zoom lens position Memorize focus lens position Memorize digital position Select External Preset Internal Preset Position Saving Method Select Internal Preset Number Move zoom/focus lens to internal preset position what you want to save
Memorize this position as Internal preset position Key Action Command (*NN75PPXXYY) It is a basic camera control command Key Code: It is a command option of key action command. The Key Stop command of key action Command (*NN7509XXYY): This command must be followed by the key action commands. Continuous key action: If you want continuous key action service, do not send the key stop command until you want to stop the continuous key action. See the Key Action Command List.
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 7 of 30
Figure 3. Zoom in (Tele) action
(In the position of the microcomputer of camera) Figure 4. Key Action command “Mirror”
Received Key Stop command?
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 8 of 30
(*NN 75 09 XX YY)
Figure 5. Successive Key Action commands “Mirror” “Negative” (False Application) <Host>
<Camera> Key action command “Mirror” * NN 75 18 XX YY
User (PC)
Execute Mirror Action
Don’t Send Key action “Stop” Stop Check Key action command “Negative” * NN 75 19 XX YY
Don’t execute Negative action
(Right Application) <Camera>
<Host> Key action command “Mirror” * NN 75 18 XX YY User (PC)
Key action command “Stop” * NN 75 09 XX YY Key action command “Negative” * NN 75 19 XX YY Key action command “Stop” * NN 75 09 XX YY
Execute Mirror Action Stop Check Execute Negative action Stop Check
(!!) User must send Key Action command “STOP” before next command. If you don’t send Key action command “STOP”, the camera will not operate on Next Key action command.
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 9 of 30
3. General Operation Camera ID 00 hex ~ FF hex (256 IDs) Camera ID check Mode ID check Skip Mode: If the checksum is right as Check Sum Method (Page 11), the camera will not check the camera ID. ID Check Mode: If the checksum is 1’s complement of the right check sum as Check Sum Method, the camera will check the camera ID. If the ID contained in command packet isn’t identical to the Current camera ID, the received command will be ignored and deleted. (EX)
* 2B 75 0000 CA: ID check skip mode * 2B 75 0000 35: ID check mode -> 35h is 1’s complement of CAh.
See the General Control Commands
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 10 of 30
4. Communication Format 20/21Z RS-232C Communication Format Communication between camera and user is available by using RS-232C. Parameter of RS-232C Baud Rate: 9.6kbps Start bit: 1 Stop bit: 1 Data bits: 8 None Parity Flow control: XON/XOFF, RTS/CTS is not supported. Packet Structure The basic unit of communication is called “PACKET”. All bytes of the packet are ASCII format. The first byte of the packet is called “Header”. The second and third bytes are “ID” of the camera. The forth and the fifth bytes are “Command Message”. And from the sixth to the ninth bytes is “Command Option”. The last two bytes are “Check sum” of the packet. The check sum is sum of 9 bytes (byte0~byte8). The header must be ‘*’. All bytes of the packet must be a Capital Letter.
Figure 6. Command Packet Block
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 11 of 30
Bytes of a packet Byte 0:
Header
Byte 1:
High character of camera ID
Byte 2:
Low character of camera ID Ex) current camera ID : 43 decimal 43 decimal = 2B hex Byte 1: ASCII code ‘2’(32 hex) Byte 2: ASCII code ‘B’(42 hex)
Byte 3, Byte 4:
Command
Byte 5 ~ Byte 8:
Option of command
Byte 9:
High byte of check sum
Byte 10:
Low byte of check sum
It must be the ASCII code ‘*’ (2A hex)
Check Sum Method The value of check sum is calculated as follows: Check Sum = Byte0 + Byte1+ … + Byte8 Ex) if ID = 43 d (2B hex), command = 75 hex, command option = 0000 command byte0~byte8 : * 2B 75 0000 ASCII format: 2A 32 42 37 35 30 30 30 30 Sum = 2A+32+42+37+35+30+30+30+30 = 1CA hex So, the Check Sum = CA So the complete command packet. = * 2B 75 0000 CA Response from the camera If the command packet is transmitted to the camera accurately, the camera will send the ‘response packet’. If the camera doesn’t receive the right command packet, it will not send any response packet. Response Time Most of the response packet will be transmitted as soon as the camera received the command packet. This time is more than 2ms.
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 12 of 30
Figure 7. Response Packet Block Communication Time Delay When transmitting 1 packet (11 bytes), keep 2 milli-seconds waiting time between bytes. After transmitting the first packet, wait 25ms to transmit the next command packet. Byte delay time > 2ms Packet delay time > 25ms *) Byte delay and Packet delay is a time delay for stable communication.
Figure 8. Delay Time Setting
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 13 of 30
Advice for communication If the command packet is transmitted only 4 bytes, then the camera will wait for remain 7 bytes continuously. At that moment, if a new packet is transmitted to the camera, the previous 4 bytes will be ignored. If the camera doesn’t send a response packet, there could be some problem in the communication line or any other communication condition. If the camera response mode is Skip Command response packet mode, then the camera will not send Command response packet. Even if the response mode is Skip Command response packet mode, the Data response packet will be transmitted to the PC.
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 14 of 30
5. Command List 20/21Z RS-232C Command Reference All of commands must be capital letters. ‘*’: ‘X’: ‘x’: ‘NN’: ‘YY’: ‘Z’,’S’,’M’,’P’,’Q’: ‘R’: ‘ ‘: (!!):
Header Don’t Care Not specified Camera ID Check Sum Command Option Response Packet Data Indicate Response packet Caution
The command was allowed at the camera microcomputer version x.x. Not described: allowed all versions.
5.1.
Response Packet
If the camera receives any command, it will judge the Response packet. If the command packet hasn’t any error, then the camera will transmit the response packet. Command Response Packet It is a response that the camera received the command packet correctly. It has none information of camera status. It indicates only that the command is successfully received. format: * 00 00 00 00 AA (Caution) This manual does not describe the Command response packet. Data Response Packet It is a response of the camera status or zoom/focus position, or any other information of the camera. format: * QQ RR SS MM YY Preset Action Finished Response Packet It is a response that the camera finish moving to the target preset position. Format: * NN 11 11 11 YY
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 15 of 30
Motion Detected Response Packet If the camera detects motions, the camera will send the Motion Detected Response Packet. The motion detection area and the sensitivity are set by the user – see the General Control command table.
Format: *NNDDDDDDYY One Shot AF Finished Response Packet If user commands the One Shot AF action command, then the camera will execute One Shot AF action. After the action, the camera will send the One Shot AF Finished Response Packet.
Format: *NNAAAAAAYY Figure 9. (Set the Response Packet)
Set the Transmission of Response Packet Set Release (Enable mode) (Disable Mode)
Example of Commands (cam id = 00)
Response Packet
Format
Command Response Packet
*00 00 00 00 AA *NNA800XXYY
*NNA801XXYY
Data Response Packet
*QQRRSSMMYY
Non
Non
*NNAA01XXYY
*NNAA00XXYY
*NNA102PSYY
*NNA100XXYY
If motion is detected *00DDDDDD22
*NN9F01XXYY
*NN9F00XXYY
*00A00000BB (one shot AF) *00AAAAAA10
Preset Action Finished *NN 111111 YY Response Packet Motion Detected Response *NNDDDDDDYY Packet One Shot AF Finished *NNAAAAAAYY Response Packet
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 16 of 30
*00710000B2 (reset) *00000000AA *007C0200C6 (read camera status) *01000000AB *00C60100C4 (move to external preset 01) *00 111111 B0
Figure 10. One Shot AF & One shot AF finished response packet
Start
Start One Shot AF action
Receive One shot AF command * 00 A0 00 00 BB
No End
Send *00000000AA (Command Response)
No Finished AF?
Yes Received Packet is Correct ?
Send One Shot AF
No
Yes Yes
Send Command Response Packet?
End
No
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 17 of 30
Yes
Send *00AAAAAA10 (One Shot AF Response)
6. General Control Commands Command Message
Command Packet
Command Option
Contents
Reset camera
*NN71XXXXYY
Reset the camera
ID on / off
*NN72XXXXYY
Toggle the camera ID. ON →OFF→ON…
ID read
*NN73XXXXYY *RR000000YY
RR
x
ID change
*NN74PPXXYY
PP
x
Key Action
*NN75PPXXYY
PP
x
PP Power on / off
*NN76PPXXYY
00 01
Set the transmission of Command Response Packet
*NNA8PPXXYY
PP
00 01
Lens Initial
*NNADXXXXYY
-
-
Change Day & Night mode
*NN9DXXXXYY
-
-
PP
00 01 02
Read current Day&Night status → D&N Auto mode → D&N Day mode → D&N Night mode
00 01
→ IR cut filter is CLOSED → IR cut filter is OPENED
Read Day & Night Status
*NN93XXXXYY *PPQQRR00YY
Doc # APN 20/21Z404TDN Revision: A
Read Current Camera ID → 00 ~ FF hex (total 256 IDs) Camera ID Change Camera ID → 00 ~ FF hex (total 256 IDs) New Camera ID Key Action will be activated by this command. → Key Code See Key action command Camera Power ON/OFF → OFF → ON (Don’t) Transmit Command Response Packet → Enable Transmission of Command Response Data → Don’t Transmit the Command Response Data Execute Lens Initial action. After this action, the zoom and focus lenses will be moved to the working position. And continue the previous working. If this lens initial action is finished, then the Command Response Packet will be transmitted. Change Day & Night mode … → OFF → AUTO → ON → OFF → …
Issue Date: 04/21/2005 Page 18 of 30
Motion Detection
P
0 1 2
→ Disable Motion Detection Function → Enable MD: Don’t Display “MD” on screen → Enable MD: Display “MD” on screen
Q
0 1 2 3
→ Don’t output any signal → Output ‘Alarm’ signal → Output ‘Comm’ signal → Output ‘Alarm+Comm’ signal
R
0 1 2 3 4 5
→ MD area: Upper side of the picture → MD area: Lower → MD area: Left → MD area: Right → MD area: Center → MD area: Whole Region of the picture
S
X
→ 1 hex ~ F hex: MD Sensitivity (sensible ~ insensible)
*NNA1PQRSYY
(!!)
Comm signal: Motion Detection Response Packet: *NNDDDDDDYY
(ex) Display “MD” on screen and transmit the MD Response packet when motion detected, “MD” area is Center, MD sensitivity 7. *NN A1 13 47 YY
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 19 of 30
7. Focus Control Commands Command Message Set Focus Auto Mode Set Focus Manual Mode
Command Packet
Command Option
*NN4EXXXXYY
Set Focus Mode as Auto Focusing Mode (Basic focus mode)
*NN4FXXXXYY
Set Focus Mode as Manual Focusing Mode (Basic focus mode)
Set Focus Special Mode
*NNABPPXXYY
One shot Auto Focus
*NNA0XXXXYY
Protect Auto Focusing
*NNA2XXXXYY
PP
00 01
PP
Set Focal Range
Contents
*NNA3PPXXYY
00 01 02 03 04 05 06
Set Focus Mode as Special Focusing Mode → Disable Focus Special Mode, set Basic focus mode only → Set Focus Special Mode Execute Auto Focusing only one time (!!) See Key Action Commands-2 Toggle command Protect All Auto Focusing function. Protect → release → protect → release … (!!) Power on: default status is release mode Protect focusing at a certain distance. → RM0: Disable All Focal Range → RM1: 10cm Focal Range → RM2: 50cm Focal Range → RM3: 80cm Focal Range → RM4: 130cm Focal Range → RM5: 2m Focal Range → RM6: 4m Focal Range (ex) protect focusing in the distance 50cm * NN A3 02 00 YY (Don’t) Transmit One Shot AF finish Response Packet when the camera finished the One Shot AF action.
Set the Transmission of the One Shot AF Finished Response Packet
PP *NN9FPPXXYY
00 01
→ Don’t Transmit One Shot AF finish Response Packet → Enable Transmission of One Shot AF finish Response Packet One Shot AF finish Response Packet (!!) *NNAAAAAAYY
Doc # APN 20/21Z404TDN Revision: A
Issue Date: 04/21/2005 Page 20 of 30