Instructions for returning the PTZ position under the PelcoD protocol - Calculate the vertical angle

A. 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°.


aiptz.com



Founded in 2005

Professional because of focus

Shenzhen JieShian Electronic Technology Co., Ltd. [www.aiptz.com]- [2005~2026] All rights reserved       Guangdong ICP No. 18090094-3
86-755-89968730
aiptz@jsa-cctv.com
Hot Tags:pan tilt,tilt vs pan,pan tilt head,pan tilt unit,pan tilt units,pan tilt heads,manual pan tilt,pan-tilt systems,pan tilt platform,motorized pan tilt,pan tilt motorized,pan and tilt units,pan tilt positioner,Manual Pan & Tilt Units,pan tilt head motorized,pan tilt motorized head,remote pan and tilt head,precision pan-tilt system,motorized pan & tilt units,pan tilt motorized outdoor,programmable pan tilt head,pan tilt antenna positioner,pan tilt unit manufacturers,diy motorized pan tilt head,best motorized pan tilt head,dual-axis pan tilt positioner,precision pan-tilt system unit,heavy duty motorized pan tilt head
Home         About us          Product          Pan tilt custom         Pan tilt application          Support        AIPTZ-Mall       SiteMap
Technology Provider for AI-Driven Pan-Tilt Systems