CN112068605A - Two-dimensional turntable memory scanning method - Google Patents

Two-dimensional turntable memory scanning method Download PDF

Info

Publication number
CN112068605A
CN112068605A CN202010759440.0A CN202010759440A CN112068605A CN 112068605 A CN112068605 A CN 112068605A CN 202010759440 A CN202010759440 A CN 202010759440A CN 112068605 A CN112068605 A CN 112068605A
Authority
CN
China
Prior art keywords
bflag
stepping
scanning
angle
axis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010759440.0A
Other languages
Chinese (zh)
Other versions
CN112068605B (en
Inventor
周璇
李爱中
冯莎
程建国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hebei Hanguang Heavy Industry Ltd
Original Assignee
Hebei Hanguang Heavy Industry Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hebei Hanguang Heavy Industry Ltd filed Critical Hebei Hanguang Heavy Industry Ltd
Priority to CN202010759440.0A priority Critical patent/CN112068605B/en
Publication of CN112068605A publication Critical patent/CN112068605A/en
Application granted granted Critical
Publication of CN112068605B publication Critical patent/CN112068605B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D3/00Control of position or direction
    • G05D3/12Control of position or direction using feedback

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Radar Systems Or Details Thereof (AREA)

Abstract

The invention discloses a two-dimensional turntable memory scanning method, wherein a static variable array is set in a scanning subprogram for storing azimuth axis scanning parameters and pitch axis scanning parameters; the azimuth axis scanning parameters comprise a fan scanning speed, and a starting angle and an ending angle of a fan scanning area; the pitch axis scanning parameters comprise a stepping step length, a starting angle and an ending angle of a stepping area; setting two static variables including an azimuth axis state variable aflag and a pitch axis state variable bflag; the current state of the scanning turntable can be determined through the mutual restraint and identification of the aflag and the bflag. When the two-dimensional turntable is switched to other subprograms and then switched back to the scanning subprogram due to a response instruction, according to the memorized aflag and the memorized bflag and in combination with the recorded content of the static variable array, the scanning process of an unscanned area can be completed by taking the interrupted position as a starting point and scanning or stepping according to the speed and the direction before interruption. The invention can save the memory space of the control chip.

Description

Two-dimensional turntable memory scanning method
Technical Field
The invention relates to the technical field of turntable control, in particular to a memory scanning method of a two-dimensional turntable.
Background
In the scanning rotary table of the telemetering military toxicant alarm device, the scanning rotary table adopts a traversing full scanning and sector scanning mechanism, in the scanning process, after a target is found, the scanning process is interrupted, the target is confirmed, and after the confirmation, the rotary table is required to continue scanning in a set area by taking the interrupted position as a starting point and keeping the original speed and direction.
As the scanning turntable is a passive device, the scanning subprogram and the positioning subprogram which are different in mode are received by receiving the instruction of the upper computer. In order to prevent the abrupt feeling caused by the switching command, the turntable should memorize the instruction of the upper computer, the speed and direction of the previous moment. A common method is to create a memory space for storing instructions and data of an upper computer. At least defining three global variable arrays, wherein the first array is used for receiving instructions and data of an upper computer and comprises a scanning mode, a scanning speed, a scanning start angle and a scanning end angle; the second array is used for storing the state, the speed, the starting angle and the ending angle of the current moment (azimuth and elevation); the third array is used to store the previous time (azimuth, pitch) state, speed, start angle, end angle. When the upper computer carries out instruction and data updating on the first array, firstly, the content of the second array is transferred to the third array, then, the content of the first array is read into the second array, and a target confirmation subprogram is entered. And after the target is confirmed, the upper computer sends a continuous scanning command, reads out the data in the third data, stores the data in the second array, and continues the scanning process before interruption.
The problems of the scheme are as follows: 1) a memory space needs to be opened up, at least three groups of global variable arrays are defined and stored, and the memory space of a chip is occupied; 2) when different subroutines are switched repeatedly, unstable transition of speed and direction may be caused during switching.
Disclosure of Invention
In view of this, the invention provides a memory scanning method for a two-dimensional turntable, which can record and correspond to all states of azimuth and pitch by using the state identifiers of azimuth and pitch and a static variable array, thereby saving the memory space of a control chip.
In order to solve the technical problem, the invention is realized as follows:
a two-dimensional turntable memory scanning method is characterized in that a static variable array is set in a scanning subprogram for storing azimuth axis scanning parameters and pitch axis scanning parameters; the azimuth axis scanning parameters comprise a fan scanning speed, and a starting angle and an ending angle of a fan scanning area; the pitch axis scanning parameters comprise a stepping step length, a starting angle and an ending angle of a stepping area; setting two static variables including an azimuth axis state variable aflag and a pitch axis state variable bflag; aflag and bflag were initialized to 0; the method comprises the following steps:
for the azimuth axis:
when the aflag is equal to 0, the azimuth axis is positioned to the initial angle of the fan-sweeping area, and after the aflag is positioned, the aflag is equal to 1;
when aflag is 1, the azimuth axis is in the state of waiting for azimuth and pitching movement to the start position: positioning the azimuth axis to the initial angle of the sector scanning area, waiting, and when the pitching axis state is judged to meet the condition that the bflag is equal to 1, indicating that the azimuth axis and the pitching axis are in place, starting scanning and making the aflag equal to 2;
when aflag is 2, the azimuth axis is in the forward sweeping state: moving the end angle of the azimuth axis fan-scanning area according to the fan-scanning speed, and when the end angle of the fan-scanning area is reached, making aflag equal to 3 and stopping the movement of the azimuth axis;
when aflag is 3, the azimuth axis is in a state of waiting for the pitch axis to move to the designated step position at the end angle: positioning the azimuth axis to the termination angle of the sector scanning area, waiting, and when the pitching axis state is determined to meet the condition that the bflag is 3 or 5, indicating that the pitching axis has moved to the specified stepping position, and enabling the aflag to be 4;
when aflag is 4, the azimuth axis is in the reverse fan state: moving the initial angle of the azimuth axial fan-scanning area according to the fan-scanning speed, and when the initial angle is reached, making aflag equal to 5 and stopping the azimuth axial movement;
when aflag is 5, the azimuth axis is in a state of waiting for the pitch axis to move to the designated step position at the start angle: positioning the azimuth axis to the starting angle of the sector scanning area, waiting, and when the pitching axis state is judged to meet the condition that the bflag is 3 or 5, indicating that the pitching axis has moved to the specified stepping position, and enabling the aflag to be 2;
for the pitch axis:
when the bflag is equal to 0, the pitching shaft is positioned to the initial angle of the stepping area, and the bflag is equal to 1 after the bflag is in place;
when the bflag is 1, the pitch axis is in a state of waiting for the azimuth to move to the fan-sweep region end angle at the start angle of the step region: positioning the pitch axis to the initial angle of the stepping area, waiting, and when the state of the pitch axis is judged to meet the condition that aflag is equal to 3, indicating that the azimuth axis and the pitch axis are in place, starting forward stepping, and setting bflag to be 2;
when the bflag is 2, the pitch axis is in the forward stepping state: stepping the end angle of the pitching axial stepping area, and setting bflag to be 3 when stepping is completed each time before the end angle is reached; stepping to a stop angle, and setting the bflag to be 5;
when the bflag is 3, the pitch axis is in a state of waiting for the azimuth axis to move to the start angle or the end angle of the designated fan-sweep area at the current step angle: setting the pitch axis speed as 0, and when the azimuth axis state is judged to meet the condition that aflag is equal to 3 or 5, setting bflag to 2, and continuing stepping in the current direction;
when the bflag is 4, the pitch axis is in a reverse stepping state: the initial angle of the pitching axial stepping area is stepped, and when stepping is completed once before the initial angle is reached, the bflag is 5; stepping to reach an initial angle, and setting the bflag to be 3;
when the bflag is 5, the pitch axis is in a state of waiting for the azimuth axis to move to the start angle or the end angle of the designated fan-sweep area at the current step angle: setting the pitch axis speed as 0, and when the azimuth axis state is judged to meet the condition that aflag is equal to 3 or 5, setting bflag to 4, and continuing stepping in the current direction;
when the two-dimensional turntable is switched to other subprograms and then switched back to the scanning subprogram due to a response instruction, according to the memorized aflag and the memorized bflag and in combination with the recorded content of the static variable array, the scanning process of an unscanned area can be completed by taking the interrupted position as a starting point and scanning or stepping according to the speed and the direction before interruption.
Preferably, the stepping speed is set according to the principle that the pitch axis completes one step at a constant speed of 1 s.
Preferably, when the bflag is 2, the following operations are performed:
step b 301: judging whether the time T is less than or equal to the timing quantity T corresponding to 1s, if so, executing the step b 302; otherwise, setting the bflag to be 3, resetting the time t and the stepping speed, and switching to a processing branch of the bflag to be 3;
step b 302: judging whether the end angle of the stepping area is reached, if so, executing the step b 303; otherwise, moving to the termination angle of the stepping area according to the set stepping speed, and accumulating t; turning to step b 301;
step b 303: and resetting the time t and the stepping speed, setting the bflag to 5, and switching to a judgment branch of setting the bflag to 5.
Preferably, when the bflag is 4, the following operations are performed:
step b 311: judging whether the time t is less than or equal to the timing amount 2000 corresponding to 1s, if so, executing the step b 312; otherwise, setting the bflag to be 5, resetting the time t and the stepping speed, and switching to a judgment branch of the bflag to be 5;
step b 312: judging whether the initial angle of the stepping area is reached, if so, executing the step b 313; otherwise, moving to the initial angle of the stepping area according to the set stepping speed, and adding 1 to t; go to step b 311;
step b 313: the processing branches to zero-clearing the time t and the stepping speed, setting the bflag to 3, and shifting to 3.
Preferably, in step b303, it is further determined whether the time used for the current step is less than a% × 1s, and if so, let bflag be 4; otherwise, executing the operation of setting the bflag to 5; the a% is a set proportion.
Preferably, in step b313, it is further determined whether the time used for the current step is less than a% × 1s, and if so, the bflag is made 2; otherwise, executing the operation of setting the bflag to 3; the a% is a set proportion.
Preferably, a% ═ 90%.
Preferably, after receiving a scanning instruction of the upper computer, the azimuth axis scanning parameter and the pitch axis scanning parameter are analyzed, the analyzed angle range and speed range are subjected to limit value processing, and then the static variable array is assigned.
Has the advantages that:
(1) the invention can record and correspond to all the states of the azimuth and the pitching through the state identifiers of the azimuth and the pitching and a static variable array, and can save the memory space of the control chip.
(2) Through special processing of the stepping speed, the stepping starting angle and the stepping ending angle, the out-of-turn phenomenon of the stepping speed, the stepping starting angle and the stepping ending angle can be eliminated, and unstable transition of speed and direction caused by repeated switching of different subprograms in the scanning process can be eliminated.
Drawings
FIG. 1 is a flow chart of the process of the azimuth axis of the present invention.
Fig. 2 is a processing flow of the pitch axis according to the first embodiment of the present invention.
Fig. 3 is a processing flow of the pitch axis of the present invention according to the second embodiment.
Fig. 4 is a processing scheme of the bflag-2 in the second pitch axis processing flow of the embodiment.
Fig. 5 is a processing scheme of bflag-4 in the second pitch axis processing flow of the embodiment.
Fig. 6 is a processing scheme of bflag-2 in the three-pitch axis processing flow of the embodiment.
Fig. 7 is a processing scheme of bflag-4 in the three-pitch axis processing flow of the embodiment.
Detailed Description
The invention is described in detail below by way of example with reference to the accompanying drawings.
The invention provides a memory scanning method of a two-dimensional rotary table, which is suitable for devices with the two-dimensional rotary table, such as the two-dimensional scanning rotary table, the two-dimensional monitoring and tracking rotary table and the like.
In the invention, a static variable array is defined in a scanning subprogram to store azimuth axis scanning parameters and pitch axis scanning parameters during scanning, wherein the azimuth axis scanning parameters comprise a fan scanning speed, and an initial angle and an end angle of a fan scanning area; the pitch axis scan parameters include a step size, a start angle and an end angle of the step area. Two static variables are also defined, namely an azimuth axis state variable aflag and a pitch axis state variable bflag, which are used as state identifiers of azimuth and pitch under a scanning mechanism.
In the two-dimensional rotary table, the azimuth axis system and the pitching axis system mutually identify respective scanning states through two state identifiers (aflag and bflag), and the scanning states are mutually corresponding, so that the problem that the scanning process continues to be scanned according to the original state (speed and direction) after being interrupted is solved; through special processing of the stepping speed, the stepping starting angle and the stepping ending angle, the abrupt feeling of subroutine switching is eliminated, and the turntable can keep the speed to be stably transited to a new fan-scanning area at the last moment.
The fan-scanning path of the invention is that starting from the starting angles of the azimuth axis and the pitch axis, the pitch axis is fixed, the azimuth axis scans positively in the fan-scanning area, and when the end angle of the azimuth axis is reached, the pitch axis steps towards the end angle of the stepping area; after stepping by one step, the azimuth axis scans in the fan-scanning area in a reverse direction, when the initial angle of the azimuth axis is reached, the pitch axis steps by one step towards the end angle of the stepping area, then the azimuth axis scans in a forward direction, and the fan-scanning work is executed according to the mode that the azimuth axis and the pitch axis move alternately. When the pitch axis reaches the end angle of the stepping area, the u-turn moves in reverse. The coverage of the whole fan-sweeping area is completed through the matching of the azimuth axis and the pitching axis.
Example one
For the azimuth axis, see fig. 1, the discrimination and corresponding processing of the scanning subroutine for different aflag values is:
when aflag is equal to 0, the azimuth axis is positioned to the starting angle of the fan-sweep area, and after the azimuth axis is positioned, the aflag is equal to 1. The positioning here means rotation to a specified position.
When aflag is 1, the azimuth axis is in the state of waiting for azimuth and pitching movement to the start position: and positioning the azimuth axis to the initial angle of the sector scanning area, waiting and judging, and when the pitching axis state is judged to meet the requirement that the bflag is equal to 1, indicating that the azimuth axis and the pitching axis are in place, starting scanning and making the aflag equal to 2.
When aflag is 2, the azimuth axis is in the forward sweeping state: and when the ending angle of the azimuth axis fan-sweeping area is reached, enabling the aflag to be 3, and stopping the azimuth axis from moving.
When aflag is 3, the azimuth axis is in a state of waiting for the pitch axis to move to the designated step position at the end angle: and positioning the azimuth axis to the termination angle of the fan-sweeping area, waiting and judging, and when the pitching axis state is judged to meet the condition that the bflag is 3 or 5, indicating that the pitching axis has moved to the specified stepping position, and making aflag be 4.
When aflag is 4, the azimuth axis is in the reverse fan state: and when the starting angle of the azimuth axis fan-scanning area moves according to the fan-scanning speed, making the aflag equal to 5, and stopping the azimuth axis from moving.
When aflag is 5, the azimuth axis is in a state of waiting for the pitch axis to move to the designated step position at the start angle: and positioning the azimuth axis to the starting angle of the sector scanning area, waiting and judging, and when the pitching axis state is judged to meet the condition that the bflag is 3 or 5, indicating that the pitching axis has moved to the specified stepping position, and making the aflag be 2.
For the pitch axis, see fig. 2, the discrimination and corresponding processing of the scanning subroutine for different bflag values is:
and when the bflag is equal to 0, positioning the pitching shaft to the initial angle of the stepping area, and when the bflag is in place, setting the bflag to 1.
When the bflag is 1, the pitch axis is in a state of waiting for the azimuth to move to the fan-sweep region end angle at the start angle of the step region: and positioning the pitch axis to the initial angle of the stepping area, waiting and judging, and when the state of the pitch axis is judged to meet the condition that aflag is equal to 3, indicating that the azimuth axis and the pitch axis are in place, starting forward stepping, and setting the bflag to be 2.
When the bflag is 2, the pitch axis is in the forward stepping state: stepping the end angle of the pitching axial stepping area, and setting bflag to be 3 when stepping is completed each time before the end angle is reached; and stepping to reach an end angle, and setting the bflag to be 5.
When the bflag is 3, the pitch axis is in a state of waiting for the azimuth axis to move to the start angle or the end angle of the designated fan-sweep area at the current step angle: and setting the pitch axis speed to be 0, and when the azimuth axis state is judged to meet the condition that aflag is equal to 3 or 5, setting bflag to be 2 and continuing stepping in the current direction.
When the bflag is 4, the pitch axis is in a reverse stepping state: the initial angle of the pitching axial stepping area is stepped, and when stepping is completed once before the initial angle is reached, the bflag is 5; and stepping to a starting angle, and setting the bflag to be 3.
When the bflag is 5, the pitch axis is in a state of waiting for the azimuth axis to move to the start angle or the end angle of the designated fan-sweep area at the current step angle: and setting the pitch axis speed to be 0, and when the azimuth axis state is judged to meet the condition that aflag is equal to 3 or 5, setting bflag to be 4 and continuing stepping in the current direction.
When the two-dimensional turntable is switched to other subprograms and then switched back to the scanning subprogram due to a response instruction, according to the memorized aflag and the memorized bflag and in combination with the recorded content of the static variable array, the scanning process of an unscanned area can be completed by taking the interrupted position as a starting point and scanning or stepping according to the speed and the direction before interruption.
Example two
The pitch axis of the present embodiment employs a processing flow as shown in fig. 3. The difference from the first embodiment is in the processing when the bflag is 2 and the bflag is 4. In addition, in this embodiment, a stepping speed is further set, that is, the stepping speed is equal to the stepping step size divided by 1s, that is, it is necessary to complete one step at a constant speed within 1 s. For example, a step size of 2 °, the step speed is 2 °/s.
Fig. 4 shows the processing when the bflag is 2 in the second embodiment. As shown in fig. 4, comprising steps b301-303:
step b 301: in this embodiment, T is 2000, the data is the program interrupt period of 0.5ms, and 1s includes 2000 interrupt periods. If t is less than or equal to 2000, executing step b 302; otherwise, let bflag be 3, and clear time t and stepping speed, and branch to processing where bflag is 3. At this time, since the bflag is changed to 3, the determination condition in the azimuth axis affag of 3 or 5 is satisfied, at this time, the affag is assigned to 4 or 2, the azimuth axis is scanned in the reverse/forward direction, and when the scan is in place, the affag of 5 or 3; at this time, if the determination condition in the pitch axis bflag is satisfied as 3, the bflag is assigned as 2, the process is entered again, and the process continues to step to the end angle.
Step b 302: judging whether the end angle of the stepping area is reached, if so, executing the step b 303; otherwise, moving to the end angle of the stepping area according to the set stepping speed, and adding 1 to t. Proceed to step b 301.
Step b 303: and resetting the time t and the stepping speed, setting the bflag to 5, and switching to a judgment branch of setting the bflag to 5. At this time, since the bflag is changed to 5, the determination condition in the azimuth axis affag of 3 or 5 is satisfied, at this time, the affag is assigned to 4 or 2, the azimuth axis is scanned in the reverse/forward direction, and when the scan is in place, the affag of 5; at this time, if the determination condition in the pitch axis bflag is satisfied as 3, the bflag is assigned as 4, and the process b311-b313 is entered, and the stepping is performed in the other direction after turning round.
Fig. 5 shows the processing when the bflag is 4 in the second embodiment. As shown in fig. 5, comprising steps b311-313:
step b 311: judging whether the time T is less than or equal to the timing quantity T corresponding to 1s, if so, executing the step b 312; otherwise, let bflag be 5, and clear time t and stepping speed, and branch to decision that bflag be 5.
Step b 312: judging whether the initial angle of the stepping area is reached, if so, executing the step b 313; otherwise, moving to the initial angle of the stepping area according to the set stepping speed, and accumulating t; proceed to step b 311.
Step b 313: the processing branches to zero-clearing the time t and the stepping speed, setting the bflag to 3, and shifting to 3.
EXAMPLE III
The pitch axis of the present embodiment still employs the processing flow shown in fig. 3. The difference from the second embodiment is in the processing of steps b303 and b 313.
In the embodiment, considering the error in stepping, there is a possibility that the error is accumulated through a plurality of steps, which results in the process that 10 steps should be taken, and 11 steps should be taken, then after the pitching turns around, the end angle will be passed again, that is, the end angle is passed 2 times. If not processed, two sweeps at the termination angle would be performed, wasting time and resources.
Considering that the situation that repeated scanning is not needed can be represented as that the length of the last step is very small, therefore, the embodiment identifies the length of the last step, and when the length is very small and is accumulated errors, the state 4 is directly entered, namely, the bflag is made to be 4, the fan scanning is not needed, and the stepping is continuously performed after the reversing; and when the length of the last step is more normal, the bflag is set to 5, namely, the current position needs to be swept, and then the step is continued by turning around.
Based on the above idea, as shown in fig. 6, in step b303, it is further determined whether the time taken for the current step is less than a% × 1s, and if so, let bflag be 4; otherwise, executing the operation of setting the bflag to 5; the a% is a set proportion. In this example, the ratio of "a" to "90% is selected.
Similarly, as shown in fig. 7, in step b313, it is further determined whether the time taken for the current step is less than a% × 1s, and if so, the bflag is set to 2; otherwise, executing the operation of setting the bflag to 3; the a% is a set proportion.
As described above, when the two-dimensional turntable performs circular scanning of azimuth sector scanning and pitch stepping, after receiving the fixed point instruction, the two-dimensional turntable switches to the fixed point subroutine, and the speed and direction of the fixed point keep the data in the previous subroutine, thereby eliminating abrupt changes caused by command switching in the scanning process.
And waiting for the instruction of the upper computer after reaching the fixed point, if the scanning is recovered, entering the scanning subprogram again, and keeping the original speed to continuously finish the scanning process of the unscanned area by taking the interrupted position as a starting point according to the memorized position and the pitching state identifier and according to the speed, the direction and the stepping direction before interruption.
For example, when the scanning subroutine is entered again, aflag is 2 and bflag is 3. According to the af lag being 2, the azimuth axis is moving according to the set speed before the interruption, and at this time, the previous action is continued, the azimuth axis is made to move according to the set fan-scanning speed, and the set fan-scanning speed is obtained from the scanning parameters of the azimuth axis. When the azimuth axis reaches the end angle of the fan-sweep region (also obtained from the azimuth axis scan parameters), the azimuth axis motion is stopped, making aflag 3. As can be seen from bflag being 3, the pitch rate is 0 at this time, no motion is occurring, and the state where the azimuth axis enters aflag being 3 or 5 is being waited for. The pitch axis can be determined as long as the azimuth axis state aflag is always determined. In this example, the aflag is changed from 2 to 3, the pitch axis determines that aflag is 3, the bflag is assigned 2, and the movement towards the end angle is continued.
In summary, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A two-dimensional turntable memory scanning method is characterized in that a static variable array is set in a scanning subprogram for storing azimuth axis scanning parameters and pitch axis scanning parameters; the azimuth axis scanning parameters comprise a fan scanning speed, and a starting angle and an ending angle of a fan scanning area; the pitch axis scanning parameters comprise a stepping step length, a starting angle and an ending angle of a stepping area; setting two static variables including an azimuth axis state variable aflag and a pitch axis state variable bflag; aflag and bflag were initialized to 0; the method comprises the following steps:
for the azimuth axis:
when the aflag is equal to 0, the azimuth axis is positioned to the initial angle of the fan-sweeping area, and after the aflag is positioned, the aflag is equal to 1;
when aflag is 1, the azimuth axis is in the state of waiting for azimuth and pitching movement to the start position: positioning the azimuth axis to the initial angle of the sector scanning area, waiting, and when the pitching axis state is judged to meet the condition that the bflag is equal to 1, indicating that the azimuth axis and the pitching axis are in place, starting scanning and making the aflag equal to 2;
when aflag is 2, the azimuth axis is in the forward sweeping state: moving the end angle of the azimuth axis fan-scanning area according to the fan-scanning speed, and when the end angle of the fan-scanning area is reached, making aflag equal to 3 and stopping the movement of the azimuth axis;
when aflag is 3, the azimuth axis is in a state of waiting for the pitch axis to move to the designated step position at the end angle: positioning the azimuth axis to the termination angle of the sector scanning area, waiting, and when the pitching axis state is determined to meet the condition that the bflag is 3 or 5, indicating that the pitching axis has moved to the specified stepping position, and enabling the aflag to be 4;
when aflag is 4, the azimuth axis is in the reverse fan state: moving the initial angle of the azimuth axial fan-scanning area according to the fan-scanning speed, and when the initial angle is reached, making aflag equal to 5 and stopping the azimuth axial movement;
when aflag is 5, the azimuth axis is in a state of waiting for the pitch axis to move to the designated step position at the start angle: positioning the azimuth axis to the starting angle of the sector scanning area, waiting, and when the pitching axis state is judged to meet the condition that the bflag is 3 or 5, indicating that the pitching axis has moved to the specified stepping position, and enabling the aflag to be 2;
for the pitch axis:
when the bflag is equal to 0, the pitching shaft is positioned to the initial angle of the stepping area, and the bflag is equal to 1 after the bflag is in place;
when the bflag is 1, the pitch axis is in a state of waiting for the azimuth to move to the fan-sweep region end angle at the start angle of the step region: positioning the pitch axis to the initial angle of the stepping area, waiting, and when the state of the pitch axis is judged to meet the condition that aflag is equal to 3, indicating that the azimuth axis and the pitch axis are in place, starting forward stepping, and setting bflag to be 2;
when the bflag is 2, the pitch axis is in the forward stepping state: stepping the end angle of the pitching axial stepping area, and setting bflag to be 3 when stepping is completed each time before the end angle is reached; stepping to a stop angle, and setting the bflag to be 5;
when the bflag is 3, the pitch axis is in a state of waiting for the azimuth axis to move to the start angle or the end angle of the designated fan-sweep area at the current step angle: setting the pitch axis speed as 0, and when the azimuth axis state is judged to meet the condition that aflag is equal to 3 or 5, setting bflag to 2, and continuing stepping in the current direction;
when the bflag is 4, the pitch axis is in a reverse stepping state: the initial angle of the pitching axial stepping area is stepped, and when stepping is completed once before the initial angle is reached, the bflag is 5; stepping to reach an initial angle, and setting the bflag to be 3;
when the bflag is 5, the pitch axis is in a state of waiting for the azimuth axis to move to the start angle or the end angle of the designated fan-sweep area at the current step angle: setting the pitch axis speed as 0, and when the azimuth axis state is judged to meet the condition that aflag is equal to 3 or 5, setting bflag to 4, and continuing stepping in the current direction;
when the two-dimensional turntable is switched to other subprograms and then switched back to the scanning subprogram due to a response instruction, according to the memorized aflag and the memorized bflag and in combination with the recorded content of the static variable array, the scanning process of an unscanned area can be completed by taking the interrupted position as a starting point and scanning or stepping according to the speed and the direction before interruption.
2. The method of claim 1, wherein the pitch axis sets the step speed on the basis of completing one step at a constant speed of 1 s.
3. The method of claim 2, wherein when bflag is 2, performing the following:
step b 301: judging whether the time T is less than or equal to the timing quantity T corresponding to 1s, if so, executing the step b 302; otherwise, setting the bflag to be 3, resetting the time t and the stepping speed, and switching to a processing branch of the bflag to be 3;
step b 302: judging whether the end angle of the stepping area is reached, if so, executing the step b 303; otherwise, moving to the termination angle of the stepping area according to the set stepping speed, and accumulating t; turning to step b 301;
step b 303: and resetting the time t and the stepping speed, setting the bflag to 5, and switching to a judgment branch of setting the bflag to 5.
4. The method of claim 2, wherein when bflag is 4, performing the following operations:
step b 311: judging whether the time t is less than or equal to the timing amount 2000 corresponding to 1s, if so, executing the step b 312; otherwise, setting the bflag to be 5, resetting the time t and the stepping speed, and switching to a judgment branch of the bflag to be 5;
step b 312: judging whether the initial angle of the stepping area is reached, if so, executing the step b 313; otherwise, moving to the initial angle of the stepping area according to the set stepping speed, and adding 1 to t; go to step b 311;
step b 313: the processing branches to zero-clearing the time t and the stepping speed, setting the bflag to 3, and shifting to 3.
5. The method as claimed in claim 3, wherein in step b303, it is further determined whether the time taken for the current step is less than a% x 1s, and if so, let bflag be 4; otherwise, executing the operation of setting the bflag to 5; the a% is a set proportion.
6. The method as claimed in claim 4, wherein in step b313, it is further determined whether the time taken for the current step is less than a% x 1s, and if so, the bflag is made 2; otherwise, executing the operation of setting the bflag to 3; the a% is a set proportion.
7. The method of claim 5 or 6, wherein a% is 90%.
8. The method as claimed in claim 1, wherein after receiving a scanning instruction of the upper computer, the azimuth axis scanning parameter and the pitch axis scanning parameter are analyzed, the analyzed angle range and speed range are subjected to limit processing, and then the static variable array is assigned.
CN202010759440.0A 2020-07-31 2020-07-31 Memory scanning method for two-dimensional turntable Active CN112068605B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010759440.0A CN112068605B (en) 2020-07-31 2020-07-31 Memory scanning method for two-dimensional turntable

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010759440.0A CN112068605B (en) 2020-07-31 2020-07-31 Memory scanning method for two-dimensional turntable

Publications (2)

Publication Number Publication Date
CN112068605A true CN112068605A (en) 2020-12-11
CN112068605B CN112068605B (en) 2023-12-05

Family

ID=73657277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010759440.0A Active CN112068605B (en) 2020-07-31 2020-07-31 Memory scanning method for two-dimensional turntable

Country Status (1)

Country Link
CN (1) CN112068605B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117647792A (en) * 2024-01-30 2024-03-05 山东省科学院海洋仪器仪表研究所 Laser radar two-dimensional scanning control method and system based on FPGA

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308388A (en) * 2008-06-30 2008-11-19 中国兵器工业第二〇五研究所 Self-restoration control circuit for photoelectric tracking instrument pitching device entering spacing zone
US20090157233A1 (en) * 2007-12-14 2009-06-18 Kokkeby Kristen L System and methods for autonomous tracking and surveillance
CN103679134A (en) * 2013-09-09 2014-03-26 华中科技大学 A sea target infrared imaging identification apparatus
CN105975345A (en) * 2016-05-20 2016-09-28 江苏得得空间信息科技有限公司 Video frame data dynamic equilibrium memory management method based on distributed memory
WO2018099163A1 (en) * 2016-11-30 2018-06-07 西安中兴新软件有限责任公司 Terminal and application control method
CN111064865A (en) * 2019-12-31 2020-04-24 中国人民解放军国防科技大学 Background activity noise filter of dynamic vision sensor and processor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090157233A1 (en) * 2007-12-14 2009-06-18 Kokkeby Kristen L System and methods for autonomous tracking and surveillance
CN101308388A (en) * 2008-06-30 2008-11-19 中国兵器工业第二〇五研究所 Self-restoration control circuit for photoelectric tracking instrument pitching device entering spacing zone
CN103679134A (en) * 2013-09-09 2014-03-26 华中科技大学 A sea target infrared imaging identification apparatus
CN105975345A (en) * 2016-05-20 2016-09-28 江苏得得空间信息科技有限公司 Video frame data dynamic equilibrium memory management method based on distributed memory
WO2018099163A1 (en) * 2016-11-30 2018-06-07 西安中兴新软件有限责任公司 Terminal and application control method
CN111064865A (en) * 2019-12-31 2020-04-24 中国人民解放军国防科技大学 Background activity noise filter of dynamic vision sensor and processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117647792A (en) * 2024-01-30 2024-03-05 山东省科学院海洋仪器仪表研究所 Laser radar two-dimensional scanning control method and system based on FPGA
CN117647792B (en) * 2024-01-30 2024-04-16 山东省科学院海洋仪器仪表研究所 Laser radar two-dimensional scanning control method and system based on FPGA

Also Published As

Publication number Publication date
CN112068605B (en) 2023-12-05

Similar Documents

Publication Publication Date Title
CN112068605A (en) Two-dimensional turntable memory scanning method
US5930054A (en) Lens position control apparatus
EP0267527B1 (en) Self-adjusting homing for a stepping motor
MXPA05001713A (en) Method for operating a wiper system, and corresponding wiper system.
CN105812724A (en) Panoramic head controlling method and system
US20080103625A1 (en) Numerical controller with machining resume function
US4980627A (en) Numerically controlled apparatus
CN108317379A (en) Control holds the method, apparatus of holder and hand-held holder
CN114322828A (en) Point cloud sampling system and method based on laser radar scanning angle switching
US4845698A (en) Method of skipping tracks while searching for a track and circuitry for carrying out the method
JPH05188267A (en) Optical equipment
US8503115B2 (en) Lens drive control device and image pickup device
KR0160692B1 (en) Method of getting zero-point for industrial controller
CN107735226A (en) Default track is crossed using robot
JPH04212941A (en) Lens device
US5847527A (en) Method and apparatus for digital position control
JPS5997830A (en) Tracing method and device
JP4029481B2 (en) Numerical control method
CN1218250A (en) Disk recording or playback device and method of adjusting initial position of pickup thereof
SU699178A1 (en) Apparatus for automatic control of boom working member of mining cutter-loader
CN114640792B (en) Position adjustment method and device, electronic equipment and storage medium
JP4013041B2 (en) Motor control device
SU1123021A1 (en) Device for object program control having k-step stop
CN115987176B (en) Method and device for carrying out zero return control on motor position and edge controller
CN112528691A (en) Code scanning method and code scanning device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant