Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of PLC method of testing and system, for solving the problem of XXX in prior art.
For achieving the above object and other relevant objects, the invention provides a kind of PLC method of testing, comprise the steps: the configuration file deleting network encryption identification code in advance to burning one in described PLC; Described PLC is made to load described configuration file; Described PCL is tested.
In a specific embodiment of the present invention, when testing described PLC, in described PLC, add corresponding physical address.
In a specific embodiment of the present invention, while configuration file described in burning in described PLC, in described PCL, burning one comprises the reset file of the image file of described network encryption identification code, whether calls described reset file to make described PLC according to a reset operation automatic decision.
In a specific embodiment of the present invention, described reset operation comprises: to the pressing of a reset key; Judge the compressing time to described reset key, when described compressing time is less than a time threshold, make described PLC perform reset operation; When described compressing time is more than or equal to described time threshold, make described PLC call described reset file, thus add the image file of described deleted network encryption identification code.
In a specific embodiment of the present invention, when described PLC performs the successful operation of the image file adding described deleted network encryption identification code, an indicator light is made to warn accordingly.
For achieving the above object and other relevant objects, the present invention also provides a kind of PLC test macro, comprising: burning unit, in order to delete the configuration file of network encryption identification code in advance to burning one in described PLC, loads described configuration file to make described PLC; Test cell, in order to test described PCL.
In a specific embodiment of the present invention, described test cell, when testing described PLC, adds corresponding physical address in described PLC.
In a specific embodiment of the present invention, described burning unit is while configuration file described in burning in described PLC, and in described PCL, burning one comprises the reset file of the image file of described network encryption identification code; Described system also comprises a reset unit, whether calls described reset file in order to make described PLC according to a reset operation automatic decision.
In a specific embodiment of the present invention, described reset operation comprises: to the pressing of a reset key; Judge the compressing time to described reset key, when described compressing time is less than a time threshold, make described PLC perform reset operation; When described compressing time is more than or equal to described time threshold, make described PLC call described reset file, thus add the image file of described deleted network encryption identification code.
In a specific embodiment of the present invention, also comprise an alarm unit, in order to when described PLC performs the successful operation of the image file adding described deleted network encryption identification code, make an indicator light warn accordingly.
As mentioned above, PLC method of testing of the present invention and system, delete the configuration file of network encryption identification code in advance to burning one in described PLC; Described PLC is made to load described configuration file; Described PCL is tested.When testing PCL, because PLC does not have network encryption identification code, cannot communicate between two adjacent PLC, so the interference of pairwise testing can not be made, such as cannot to corresponding PLC burn recording MAC number or the problem repeating burn recording MAC number.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this specification can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this specification also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.It should be noted that, when not conflicting, the feature in following examples and embodiment can combine mutually.
It should be noted that, the diagram provided in following examples only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in diagram but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
Along with the fast development of PLC power line communication technology, the production test efficiency of PLC product also receives the great attention of vast manufacturer.The testing scheme of current manufacturer is mainly: first the code burning containing networkID (network encryption identification code) is entered flash then at test link burn recording MAC number thus the intercommunication mutually realized between PLC product.PLC product is a kind of technology by power line transmission, if there is identical networkID (network encryption identification code) in same electric power networks, two adjacent PLC products can establish a connection, and intercom mutually.Concrete as shown in Figure 1 same production line has multiple station, and is all that the live wire L of shared civil power and zero line N.PLC product carry out data communication by L and N exactly.But in production test procedure, be need test separately, namely PLC1 read and write by computer 1, and PLC2 read and write by computer 2; If PLC1 and PLC2 sets up connecting relation, then computer 1 can be caused to read and write PLC2, and the crosstalk phenomenon of PLC1 read and write by computer 2.Current solution increases UPS insulating power supply or changes the circuit that line is produced in original production, avoids the mutual interference between station.Cost can be increased to manufacturer like this, be unfavorable for promoting the use of of PLC product.The invention provides a kind of PLC method of testing, comprise the steps: the configuration file deleting network encryption identification code in advance to burning one in described PLC; Described PLC is made to load described configuration file; Described PCL is tested.
Refer to Fig. 2, be shown as PLC test macro of the present invention application schematic diagram in one embodiment.
Described PLC test macro comprises:
Burning unit 11, in order to delete the configuration file of network encryption identification code in advance to burning one in described PLC, loads described configuration file to make described PLC; And
Test cell 12 is in order to test described PCL.Described burning unit 11 and described test cell 12 are such as a computer.
In a specific embodiment of the present invention, described test cell 12, when testing described PLC, adds corresponding physical address (No. MAC) in described PLC.
Described burning unit 11 is while configuration file described in burning in described PLC, and in described PCL, burning one comprises the reset file of the image file of described network encryption identification code.
Refer to Fig. 2, described system also comprises a reset unit 13, whether calls described reset file in order to make described PLC according to a reset operation automatic decision.
In a specific embodiment of the present invention, described reset operation comprises: to the pressing of a reset key; Judge the compressing time to described reset key, when described compressing time is less than a time threshold, make described PLC perform reset operation; When described compressing time is more than or equal to described time threshold, make described PLC call described reset file, thus add the image file of described deleted network encryption identification code.
In a specific embodiment of the present invention, also comprise an alarm unit, in order to when described PLC performs the successful operation of the image file adding described deleted network encryption identification code, make an indicator light warn accordingly, such as another LED continues to glimmer.
The Another Application of native system refers to shown in Fig. 3, be specially: first by a string code not containing networkID (network encryption identification code) of software programming and the image file that automatically can be added networkID (network encryption identification code) by the mode of pressing reset key, then flash is entered in burning, secondly flows to test station after SMT paster and carries out burn recording MAC number.Owing to not establishing a connection containing the identity of networkID (network encryption identification code) therefore with regard to None-identified the other side between two adjacent PLC products in software code, also just cannot communicate.Would not mutually disturb between station adjacent in the process of burn recording MAC number, causing cannot burn recording MAC number or the burn recording MAC number problem repeated.
Which reduces the repetition measurement rate of PLC product, improve production test efficiency, also saving UPS insulating power supply when setting up production environment, reducing production cost to manufacturer.Equally also can share a power line network with other product makes erection production line simpler.
And, wherein, the application of described reset operation is consulted shown in Fig. 4, be specially, in the functional module part of the code of burning, reset key increased a function, when the reset key triggered time of more than 5 seconds being detected, " networkID " is write PLC function, makes the PLC tested realize when shipment intercoming mutually.
Refer to Fig. 5, be shown as PLC method of testing of the present invention schematic flow sheet in one embodiment.
Described PLC method of testing comprises the steps:
S11: the configuration file deleting network encryption identification code in advance to burning one in described PLC.
S12: make described PLC load described configuration file.
S13: described PCL is tested.
In a specific embodiment of the present invention, when testing described PLC, in described PLC, add corresponding physical address.
In a specific embodiment of the present invention, while configuration file described in burning in described PLC, in described PCL, burning one comprises the reset file of the image file of described network encryption identification code, whether calls described reset file to make described PLC according to a reset operation automatic decision.
In a specific embodiment of the present invention, described reset operation comprises: to the pressing of a reset key; Judge the compressing time to described reset key, when described compressing time is less than a time threshold, make described PLC perform reset operation; When described compressing time is more than or equal to described time threshold, make described PLC call described reset file, thus add the image file of described deleted network encryption identification code.
In a specific embodiment of the present invention, when described PLC performs the successful operation of the image file adding described deleted network encryption identification code, an indicator light is made to warn accordingly.
The technical scheme of the PLC method of testing of the present embodiment is corresponding with application and PLC test macro described above, so all can apply the description of described PLC test macro with expansion and in this PLC method of testing, not add repeat at this.
In sum, PLC method of testing of the present invention and system, delete the configuration file of network encryption identification code in advance to burning one in described PLC; Described PLC is made to load described configuration file; Described PCL is tested.When testing PCL, because PLC does not have network encryption identification code, cannot communicate between two adjacent PLC, so the interference of pairwise testing can not be made, such as cannot to corresponding PLC burn recording MAC number or the problem repeating burn recording MAC number.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.