|
|
Instructions for returning the PTZ position under the PelcoD protocol - Calculate the vertical angleA. First convert the TMSB and TLSB hexadecimal numbers into decimal numbers; B. Calculate Tdata1=TMSB*256+TLSB; C. Determine the size of Tdata2 and 18000. If Tdata1 is larger than 18000, Tdata2 = 36000-Tdata1, If Tdata1 is smaller than 18000, Tdata2 = -Tdata1; D. Calculate the actual angle Tangle = Tdata÷100. The calculated Tangle is the absolute angle value of the actual current vertical position of the PTZ. e.g.1 After sending the command FF 01 00 53 00 00 54 to the PTZ, the PTZ sends the command FF 01 00 5B 8A 63 49 A. TMSB = 0x8A TLSB = 0x63 converted to decimal number TMSB = 138 TLSB = 99; B. Tdata1 = TMSB *256 + TLSB = 138*256+99 = 35427; C. Because Tdata1>18000, therefore Tdata2 = 36000-Tdata1 = 36000-35427 = 573; D. Tangle = Tdata2÷100 = 5.73°. That is, the actual current vertical absolute position of the PTZ is 5.73°. e.g.2 After sending the command FF 01 00 53 00 00 54 to the PTZ, the PTZ sends the command FF 01 00 5B 00 64 C0 1. TMSB = 0x00 TLSB = 0x64 converted to decimal number TMSB = 0 TLSB = 100; 2. Tdata1 = TMSB *256 + TLSB = 0*256+100 = 100 3. Because Tdata1<18000, therefore Tdata2 = -Tdata1 = -100; 3. Tangle = Tdata2÷100 = -1.00°. That is, the actual current vertical absolute position of the PTZ is -1.00°.
Article classification:
FAQ
|