|
|
Specification for Format and Definition of Tilt Angle Query & Feedback Commands of Pelco_D Pan-Tilt Protocol● Tilt Angle Query Command for Pan Tilt
Command Format: FF 01 00 53 00 00 54 Description: When this command is sent to the pan-tilt, the unit shall return its current tilt position command upon receipt of valid command.
● Tilt Angle Data Return Command
Command Format: FF 01 00 5B TMSB TLSB SUM TMSB and TLSB are hexadecimal values; SUM is the least significant byte derived from the sum of the five bytes excluding the leading 0xFF.
Description: After the pan-tilt receives a valid tilt query command, it sends back a feedback command containing tilt position information.
● Steps to calculate the tilt angle of the pan-tilt are as follows: A. Convert the hexadecimal values of TMSB and TLSB into decimal numbers. B. Calculate: Tdata = TMSB × 256 + TLSB to get the computed result. C. Compare the magnitude of Tdata1 against 18000. If Tdata1 is greater than 18000, Tdata2 = 36000 Tdata1; If Tdata1 is less than 18000, Tdata2 = Tdata1. C. Calculate actual tilt angle: Tangle=Tdata2÷100. The calculated Tangle is the real absolute vertical tilt position value of the pan-tilt.
Example 1: After sending the command FF 01 00 53 00 00 54 to the pan-tilt, the pan-tilt responds with data-containing command FF 01 00 5B 8A 63 49. A、TMSB = 0x8A TLSB = 0x63 convert to decimal values: TMSB = 138 TLSB = 99; B、Tdata1 = TMSB *256 + TLSB = 138*256+99 = 35427; C. Since Tdata1 > 18000, Tdata2 = 36000 Tdata1 = 36000 35427 = 573. D、Tangle = Tdata2÷100 = 5.73°。 i.e., the current actual absolute vertical tilt position of the pan-tilt is 5.73°
Example 2: After sending the command FF 01 00 53 00 00 54 to the pan-tilt, the pan-tilt responds with data-containing command FF 01 00 5B 00 64 C0 A、TMSB = 0x00 TLSB = 0x64 convert to decimal values: TMSB = 0 TLSB = 100; B、Tdata1 = TMSB *256 + TLSB = 0*256+100 = 100 C、Since Tdata1 < 18000, Tdata2 = Tdata1 = 100. D、Tangle = Tdata2÷100 = -1.00°。i.e., the current actual absolute vertical tilt position of the pan-tilt is -1.00°。 |