Summary of the invention
For solving the problem and blemish of above-mentioned middle existence, the invention provides a kind of solid material from the method for motion tracking, the method with the material followed the tracks of as the independent logical object, make it in tracing process, not rely on the material self attributes, mean size, outward appearance or other physics when material, do not consist of impact to following the tracks of when chemical parameters changes.Described technical scheme is as follows:
A kind of solid material is from the method for motion tracking, and the method adopts the form of server, client to carry out from motion tracking, it is characterized in that described method comprises:
Key element is followed the tracks of in definition, and described key element is stored as the control parameter;
Read the tracing object record of servers' data memory block, and by graphically showing the user;
Undertaken compoundly by will superpose material throughput direction signal and light sensation detecting element signal of server system, obtain new flip-over type signal, and described flip-over type signal is sent to the data communication units of tracker with the form of electronic message; And
Data communication units is resolved the described text that receives;
From text, follow the tracks of event data and be stored into the data storage area, and process following the tracks of event data.
The beneficial effect of technical scheme provided by the invention is:
The first, adopt the end to end pattern of control, tracing object is divided into two parts of head and tail.It is not the absolute position that any moment all needs material in the Industry Control.In the situation that satisfies the control requirement, adopt and follow the tracks of the calculated load that material method end to end can greatly reduce tracker.
The second, adopt definition tracing object, tracing area, tracking event and between the method for mutual relationship.Material Tracking person only needs to draw zone, the event design drawing in the following range.Require to divide tracing area according to control, then carry out event definition according to the direction of motion of material, can automatically generate the tracking processing logic, do not need to write separately control program.Wide for following range, tracing area is various, the track path complicated situation is very applicable.
The 3rd, not high for the accuracy requirement of detection signal.At the more abominable scene of some environment, the accuracy of detection signal is difficult to guarantee.When the signal abnormal, the wrong treatment mechanism of system will be carried out logic verify based on following the tracks of the three elements rule.
The 4th, carry out the 2 dimensional region definition by matrix pattern.The material that adopts the method can process specific type is followed the tracks of.For example: based on batch tracking, both each tracking event represented one batch integral position and changed.
The 5th, can under any circumstance follow the tracks of correction (online, off-line), adopt the method simple modifications positions of materials of simulating signal, this revises with the method for operation irrelevant, no matter has been to advance, retreat, reach the standard grade, roll off the production line both.
The 6th, when technological requirement and equipment layout change, only need to change the definition of tracing area and the event of tracking, can realize the system reform, do not need reconfiguration code.
The 7th, tracing area and event all are the definition on the logical concept, and they not necessarily will be with in kind corresponding.Therefore the virtual test that can follow the tracks of and control by the mode of simulating signal easily.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing:
The form of present embodiment employing server, client is carried out the system from motion tracking, client part is used for following the tracks of interface display and position correction, this part is used for reading the tracing object record of servers' data memory block, then shows the user by graphical means.The tracking event that server end will extract from communication data is stored into the data storage area, then processes following the tracks of event data, referring to Fig. 1, has represented server and client side's processing unit structure and data stream relation.
The automated location Tracking need to carry out in two steps, and the first step is for following the tracks of the design of three elements definition template.Second step is the design of tracking data reception ﹠ disposal.
The first step need to define follow the tracks of three elements and with its as the control Parameter storage in the tracking rule of Fig. 1.Process section under tracing area inclusion region code, area type, matrix of areas dimension, regional main technique direction, the zone.Here defined zone is logic region, and it can be corresponding to one or more actual area.All need it abstract in having the matrix of different dimensions for any one tracing area.The coordinate of matrix X-direction and Y-direction is representing the position that tracing object can be preserved.The tracking event comprises that event code, event source zone, event target are regional, event-action title, event direction, object are transferred type.Follow the tracks of action and comprise denomination of dive, sequence of movement, action executing processing unit.After definition is finished, automatically generate record property script, be used for control data access and task and distribute.
Second step tracking data reception ﹠ disposal comprises three separate parts.First is the HMI interface display.This part is used for the tracing object record of reading out data memory block, then shows the user by graphical means.For example the 1# operation room is monitored the changes in material in the defined range 1,2,3; Changes in material in the 2# operation room monitoring defined range 3,4,5; Need to be for 1#, different tracking interface A, the B of 2# operation room design.The material in the defined range 1,2,3 is directly read at the A interface, and the material in the defined range 3,4,5 is directly read at the B interface.
As shown in Figure 2, be the method for solid material from motion tracking, the method comprises:
Key element is followed the tracks of in step 201 definition, and described key element is stored as the control parameter;
Step 202 reads the tracing object record of servers' data memory block, and by graphically showing the user;
Step 203 is undertaken compoundly by will superpose material throughput direction signal and light sensation detecting element signal of server system, obtains new flip-over type signal, and described flip-over type signal is sent to the data communication units of tracker with the form of electronic message; And
Data communication units is resolved the described text that receives;
Step 204 is followed the tracks of event data and is stored into the data storage area from text, and processes following the tracks of event data.
Above-mentioned data communication part mainly solves and the communication issue of basic automation systems, basic automation systems need to superpose material throughput direction signal and light sensation detecting element signal.The tracking event that this composite signal and the first step are defined is associated and produces new flip-over type signal, and Fig. 3 has represented the situation of material " head enters ".When the intersection of the end of material E positive movement to regional A, B, trigger when blocking light sensation detecting element C, when this situation occurs, basic automatization obtains new flip-over type signal by judgement, and trigger pip sent to the data communication units of tracker with the form of TCP/IP electronic message, be responsible for resolving these texts by data communication units.
The tracking event data that extracts from text is stored into the data storage area, then processes following the tracks of event data, and its server end is followed the tracks of the event handling overall process as shown in Figure 4:
Step 401 is obtained event.
Step 402 checks decision event validity;
If effectively, execution in step 403, otherwise finish.
Step 403 identification event is distributed the alignment processing unit;
If corresponding processing unit, execution in step 404, otherwise finish.
Step 404 is judged mobile type, selects tracing mode.
Step 405 is carried out the variation of following the tracks of positions of materials.
Be illustrated in figure 5 as server end communication data treatment scheme, comprise:
Step 501 receives event signal by obtaining event;
The text that receives is extracted operation, take out and follow the tracks of Case Number and additional data thereof.
Step 502 storage signal content;
The data that extract are sorted, make according to time sequencing and store the data storage area into.
Step 503 trigger event supervisory control device;
After storage tracking signal ED, send to follow the tracks of and process service request, wait for data monitoring cell scheduling trace daemon.
Step 504 tracking treatment unit reads Case Number;
Following the tracks for the treatment of progress begins to retrieve the validity check that then untreated tracking event carries out event according to sequential after the allotment instruction of receiving the data monitoring unit.
Be illustrated in figure 6 as server end logic verify treatment scheme, comprise:
Step 601 according to following the tracks of Case Number, is obtained the tracking event argument by the event validity inspection;
Get access to time parameter, execution in step step 602, otherwise finish.
Step 602 is obtained the tracing area parameter;
According to whole parameters such as the source region of following the tracks of event argument and obtain the event representative, target area, if get access to source region, the target area of event representative, execution in step 603, otherwise finish.
Step 603 is obtained the execution action set;
Obtain event-action sequential marshalling set according to following the tracks of event argument, if get access to event-action sequential marshalling set, and
The identification event is distributed the alignment processing unit.
Be illustrated in figure 7 as server end event handling performance element and select flow process, comprising:
Step 701 pair identification event is distributed the alignment processing unit, carries out corresponding actions according to parameter;
Judge that described event is device action or tracing object action.
Step 702 is determined event type according to area type;
Determine the type of action of material by event argument and region parameter.
Step 703 is selected the performance element of event by type;
Whether the type of judging source region and target area is identical, selects performance element according to judged result.
As shown in Figure 8, select flow process for the server end tracing mode, comprising:
Step 801 is judged the Move Mode of tracking event;
The Move Mode of judging the tracking event is that mobile or composition moves separately, if mobile separately, execution in step 802, if mobile in groups, then execution in step 803;
Step 802 is mobile separately;
Adopt the FIFO(first in first out) principle, search tracing object and obtain independent whole tracing object when mobile in the source region matrix.
Step 803 adopts a batch binding principle (positions of materials, order are fixed in same batch), searches for tracing object in the source region matrix, and obtains the whole tracing object when moving in groups.
Step 804 is determined all tracing objects;
Handover according to tracing object requires (separately mobile or integrated moving), obtains all tracing objects.
Step 805 is judged the moving direction of tracking event;
By following the tracks of event argument, tracing area parameter and tracing object, determine the direction of motion (forward or reverse) of material.
Step 806 is judged described typical module;
According to the direction of motion of material and other event, region parameter, from the tracing mode of six quasi-representatives, select suitable processing rule, and
Carry out the variation of tracking object positions.
Be illustrated in figure 9 as server end tracking object positions changing process, comprise:
Step 901 is judged the head position change;
Obtain the head position of tracing object, judge whether head position needs change, check the validity of target area matrix coordinate if needs change.
Step 902 is judged the tail position change;
Obtain the tail position of tracing object, judge whether tail position needs change, check the validity of target area matrix coordinate if needs change.
Step 903 inspection is judged the availability of target area;
If head and afterbody all satisfy mobile condition variable mark is set, simultaneously all is related to the zone and lock, execution in step 904, otherwise finish.
Step 904 rearranges the source region tracing object;
Delete the head of source region tracing object if head need to change, revise the head of tracing object to the target area; Delete the afterbody of source region tracing object if afterbody need to change, the afterbody of revising tracing object arrives the target area.
Step 905 is carried out the regional change of tracing object;
Judge whether other object is arranged in the source region.If other object needs change of location, then according to the FIFO(first in first out) principle redistribution matrix of areas coordinate.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.