CN101377668A - Programmable logic controller having queue function and operation method thereof - Google Patents

Programmable logic controller having queue function and operation method thereof Download PDF

Info

Publication number
CN101377668A
CN101377668A CNA2007101455150A CN200710145515A CN101377668A CN 101377668 A CN101377668 A CN 101377668A CN A2007101455150 A CNA2007101455150 A CN A2007101455150A CN 200710145515 A CN200710145515 A CN 200710145515A CN 101377668 A CN101377668 A CN 101377668A
Authority
CN
China
Prior art keywords
instruction
programmable logic
logic controller
plc
instructions
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.)
Pending
Application number
CNA2007101455150A
Other languages
Chinese (zh)
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.)
Delta Electronics Inc
Delta Optoelectronics Inc
Original Assignee
Delta Optoelectronics Inc
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 Delta Optoelectronics Inc filed Critical Delta Optoelectronics Inc
Priority to CNA2007101455150A priority Critical patent/CN101377668A/en
Publication of CN101377668A publication Critical patent/CN101377668A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

The present invention relates to a programmable logic controller with a queuing function and an operation method thereof. The method comprises the following steps: at first, the programmable logic controller receives instructions 1 transmitted by a plurality of operation terminals in sequence through a network bus; after the instructions 1 are received in the instruction receiving and transmitting program, the judgment is performed whether other instructions are processed; if no other instructions are processed, the instructions 2 are directly processed and the required data for the instructions 1 are transmitted backwards. When the instructions 1 are processed, the received instructions 2 are temporarily stored in the instruction queue. After the instructions 1 are processed, the judgment is performed whether the instructions 2 with priority for processing exist in the queue for temporary storage. If the instructions 2 with priority for processing exist, the instructions 2 is read out from the queue for temporary storage and processed by the micro-processing unit of the programmable logic controller, and the required data for the instructions 2 are transmitted backwards through the instruction receiving and transmitting program. If no instructions with priority for processing are judged to exist in the queue for temporary storage, the judgment is continuously performed whether the instructions with priority for processing exist.

Description

Programmable logic controller (PLC) and method of operating thereof with queue function
Technical field
The present invention relates to a kind of programmable logic controller (PLC), relate in particular to a kind of programmable logic controller (PLC) (ProgrammableLogic-Controller) with queue function of temporary transient store operation instruction that end is sent.
Background technology
Along with machinery and miscellaneous equipment fast-changing influence of multiple integration in factory automation (Factory Automation) field, design saves time, control laborsaving, robotization is inevitable trend.In the automated machine in early days, its control mode is to be made of relay, pushbutton switch, timer, counter and detector switch etc., has reached the purpose of control.But in order to deal with various forms of control modes, controller often needs to revise, so brought up the birth of programmable logic controller (PLC) (Programable Logic Controller).
Programmable logic controller (PLC) is widely used in industrial already.Under the environment of dynamo-electric combination, allow steering order load at any time in the programmable logic controller (PLC), this programmable logic controller (PLC) can be controlled the operation of a machine according to the steering order of input.
And traditional programmable logic controller (PLC) 20 can be connected with a plurality of operating sides 10 simultaneously by network-bus 30 when utilization, for operating programmable logic controller (PLC) (as shown in Figure 1) simultaneously in a plurality of operating sides 10.When the 10 pairs of programmable logic controller (PLC)s 20 in first operating side are assigned instruction, then instruction is sent in the programmable logic controller (PLC) 20 by network-bus 30.After the instruction transmitting/receiving program 202 of programmable logic controller (PLC) 20 receives instruction,, after processing, reply the required data in first operating side 10 by network-bus 30 by microprocessing unit 201 handling procedures.Only have an operating side to send when instruction in a plurality of operating sides 10, programmable logic controller (PLC) 20 can be according to the instruction of operating side 10, replys the required data in operating side 10.When programmable logic controller (PLC) 20 receives the instruction of a plurality of operating sides 10 simultaneously, can cause instruction to be lost or instruct collision, and cause programmable logic controller (PLC) 20 can't reply the required data of operating side 10 successively, make operating side 10 can't control programmable logic controller (PLC) 20 effectively.
Summary of the invention
Fundamental purpose of the present invention is to overcome the defective of prior art.The present invention utilizes the original queue function of programmable logic controller (PLC) (putting the buffer zone of data temporarily), the instruction that a plurality of operating sides send is separately handled according to sequencing, and, make each operating side can both receive the data that programmable logic controller (PLC) is replied with temporary the ordering in formation of untreated instruction elder generation.
For reaching above-mentioned purpose, programmable logic controller (PLC) of the present invention has the communications protocol disposal route and the device thereof of queue function, at first, this programmable logic controller (PLC) receives the instruction one that sends from a plurality of operating side successively through the express network bus, after the instruction transmitting/receiving program receives instruction one, judge whether existing other instruction earlier in processing, if there is not other instruction handling, then direct processing instruction one, and transmit and reply instruction one desired data.In the process of processing instruction one,, then will instruct two to be temporarily stored in the formation if receive instruction two.After instruction one is finished dealing with, judge in the temporary formation whether the instruction two that needs priority processing is arranged.If judge the instruction two of priority processing, instruction two will be by reading in the temporary formation, and after the microprocessing unit of programmable logic controller (PLC) is handled, and reply the required data of instruction two through the instruction transmitting/receiving program.If judge the instruction of no priority processing in the temporary formation of instruction, then continue to judge whether the instruction of priority processing.
Description of drawings
Fig. 1 is the operational hardware block flowsheet synoptic diagram of the queue function of conventional programmable logic controller;
Fig. 2 is the operational hardware block flowsheet synoptic diagram of the queue function of programmable logic controller (PLC) of the present invention;
Fig. 3 is the function software schematic flow sheet of the queue function of programmable logic controller (PLC) of the present invention.
Fig. 4 A~Fig. 4 O is the utilization example schematic of the queue function of programmable logic controller (PLC) of the present invention.
[primary clustering symbol description]
Prior art:
Operating side 10
Programmable logic controller (PLC) 20
Microprocessing unit 201
Instruction transmitting/receiving program 202
Network-bus 30
The present invention:
Step 100~112
Operating side 1
First operating side 11
Instruct 1
Reply 1
Instruct 4 113
Second operating side 12
Instruct 2 121
Reply 2 122
The 3rd operating side 13
Instruct 3 131
Reply 3 132
Network-bus 2
Programmable logic controller (PLC) 3
Instruction transmitting/receiving program 31
The temporary formation 32 of instruction
Microprocessing unit 33
Embodiment
Below in conjunction with accompanying drawing technology contents of the present invention is elaborated.
Fig. 2 is the operational hardware block flowsheet synoptic diagram of the queue function of programmable logic controller (PLC) of the present invention.As shown in the figure: when monitoring programmable logic controller (PLC) 3 by communications protocol (Modbus TCP) in a plurality of operating sides 1, the instruction that operating side 1 can be assigned is stored in the temporary formation (Queues) 32 of instruction according to the order of first in first out, making programmable logic controller (PLC) enter order according to instruction handles successively, with the fairness of the correct and access of guaranteeing handling procedure, thereby avoid loss of data.
Assign instruction for the moment in first operating side 11 by 2 pairs of programmable logic controller (PLC)s 3 of network-bus, receive instruction by instruction transmitting/receiving program 31, if other instruction is still arranged in processing, then will instruct an instruction that is stored in programmable logic controller (PLC) 3 to keep in formation 32 earlier.If do not have other instruction in processing, instruction one directly transfers to microprocessing unit (MCU) 33 and handles.In microprocessing unit 33 processing instructions one and answer instruction one needed data procedures, if the 12 pairs of programmable logic controller (PLC)s 3 in second operating side are assigned instruction two, after the instruction transmitting/receiving program 31 of programmable logic controller (PLC) 3 receives, can will instruct two to be stored in wait in the temporary formation 32 of instruction earlier earlier, wait for that previous microprocessing unit 33 handled instructions one finish, after network-bus 2 is replied first operating side, 11 desired datas.The temporary formation 32 of this instruction will instruct two through instructing transmitting/receiving program 31 to reach microprocessing unit 33 processing.In microprocessing unit 33 processing instructions two and answer instruction two needed data procedures, if instruction three is also assigned in the 3rd operating side 13, similarly, after the instruction transmitting/receiving program 31 of programmable logic controller (PLC) 3 receives, can will instruct three to be stored in wait in the temporary formation 32 of instruction earlier, wait microprocessing unit 33 processing instructions two are finished, and reply second operating side, 12 desired datas through network-bus 2.The temporary formation 32 of this instruction is about to instruct three through instructing transmitting/receiving program 31 to reach microprocessing unit 31 processing.So, according to the operation processing program of the first in first out of instructing, can guarantee the fairness of the correct and access of handling procedure, to avoid loss of data.
Fig. 3 is the function software schematic flow sheet of the queue function of programmable logic controller (PLC) of the present invention.As shown in the figure: at first,, receive instruction one successively through network-bus as step 100.
Step 102 after receiving instruction one, judges whether that earlier existing other instruction is in processing, if do not have other instruction handling, then enter into step 104, directly processing instruction one, enter into step 106 again, transmit the instruction (as instructing 1 desired data) of replying priority processing.
In the process of processing instruction one, step 100 receives instruction two, and judging in step 102 still has instruction one handling, and enters and will instruct two to be temporarily stored in the instruction queue in the step 108.After instruction one is finished dealing with, enter the instruction (instruction two is limit priority in the temporary queue order of instruction) that judges whether to obtain processing priority in the step 110 again.If judge the instruction (as instructing 2) of priority processing, this instruction two will be handled by step 104,106, and reply the required data of instruction two.If judge the instruction of no priority processing, then enter the instruction that lasting wait judges whether to have priority processing in the step 112.
Fig. 4 A~Fig. 4 O is respectively the utilization example schematic of the queue function of programmable logic controller (PLC) of the present invention.As shown in the figure.When three operating sides 11,12,13 were electrically connected with programmable logic controller (PLC) 3 by network-bus 2, three operating sides 11,12,13 can be operated programmable logic controller (PLC) 3 simultaneously.
Send instruction 1, instruction 2 121, instruction 3 131 separately in three operating sides 11,12,13, after instruction 1 is received by instruction transmitting/receiving program 31 at first, to instruct one 111 to deliver to microprocessing unit 33 and handle, and will instruct 2 121 and instruct 3 131 to be docile and obedient preface and to be temporarily stored in instruction and to keep in the formation 32 (shown in Fig. 4 D).
Reply the data of the answer 1 of operating side 11 through instruction transmitting/receiving program 31 at microprocessing unit 33, after microprocessing unit 33 is replied instruction 1, to instruct 2 121 to reach instruction transmitting/receiving program 31 the temporary formation 32 from instructing, reach again in the microprocessing unit 33, at this time operating side 11 has been received and has been replied 1, sends instruction 4 113 again.Receiving instruction 4 o'clock, instruct 2 121 still in processing this moment, will instruct four to be temporarily stored in instruction and to keep in the formation 32 (shown in Fig. 4 H) earlier.
After instruction two is handled, send and reply 2 122 to the operating side 12.To instruct 3 131 to read again, and be sent in the microprocessing unit 33 through instruction transmitting/receiving program 31 and handle, and handle the back and send and reply 3 132 to the operating side 13 at microprocessing unit 33 by the temporary formation 32 of instruction.To instruct 4 113 again by instructing temporary formation 32 to read, be sent to processing in the microprocessing unit 33 through instruction transmitting/receiving program 31, after microprocessing unit 33 is handled, and send and reply 4 114 to the operating side 11, allow all operating sides 11,12,13 can obtain the answer of programmable logic controller (PLC) 3.
After above-mentioned explanation, the queue function of programmable logic controller (PLC) of the present invention as can be known makes simple to operately, and the access sequential of need not worrying fully allows a plurality of operating sides operate programmable logic controller (PLC) simultaneously, has made things convenient for the program designer to carry out program design.
Above-mentioned is the preferred embodiments of the present invention only, is not to be used for limiting scope of the invention process.Be that all equalizations that claim is done according to the present invention change and modification, be all protection scope of the present invention and contain.

Claims (5)

1. the method for operating with programmable logic controller (PLC) of queue function is used for a plurality of operating sides and operates programmable logic controller (PLC) simultaneously, comprises the steps:
A) after receiving an input instruction, judge that whether described programmable logic controller (PLC) is just at processing instruction;
B) if described programmable logic controller (PLC) not at processing instruction, is then handled described input instruction;
C) if described programmable logic controller (PLC) just at processing instruction, then is stored in described input instruction in one formation;
D) after described programmable logic controller (PLC) end process instruction, continue to handle the highest instruction of a priority.
2. the method for claim 1, the highest instruction of wherein said priority is to come top instruction in formation.
3. the method for claim 1 wherein also comprises:
Described handle instruction after, send one and reply instruction to the operating side.
4. the method for claim 1 wherein also comprises:
Provide network-bus to connect described programmable logic controller (PLC) and described a plurality of operating side.
5. the programmable logic controller (PLC) with queue function is electrically connected by network-bus with a plurality of operating sides, comprising:
The instruction transmitting/receiving program is electrically connected with described network-bus, is used to receive instruction and the answer operating side desired data that described operating side sends;
The temporary formation of instruction is electrically connected with described instruction transmitting/receiving program, is used for the untreated instruction of temporary ordering;
Microprocessing unit is electrically connected with described instruction transmitting/receiving program, is used to handle the instruction that the operating side sends, and replys the required data in operating side according to instruction.
CNA2007101455150A 2007-08-27 2007-08-27 Programmable logic controller having queue function and operation method thereof Pending CN101377668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2007101455150A CN101377668A (en) 2007-08-27 2007-08-27 Programmable logic controller having queue function and operation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2007101455150A CN101377668A (en) 2007-08-27 2007-08-27 Programmable logic controller having queue function and operation method thereof

Publications (1)

Publication Number Publication Date
CN101377668A true CN101377668A (en) 2009-03-04

Family

ID=40421243

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2007101455150A Pending CN101377668A (en) 2007-08-27 2007-08-27 Programmable logic controller having queue function and operation method thereof

Country Status (1)

Country Link
CN (1) CN101377668A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103885376A (en) * 2012-12-19 2014-06-25 施耐德电器工业公司 Programmable logic controller and event-driven programming method thereof
CN106959682A (en) * 2017-03-06 2017-07-18 深圳市元征软件开发有限公司 A kind of vehicle diagnosis method, diagnosis joint, and diagnostic system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103885376A (en) * 2012-12-19 2014-06-25 施耐德电器工业公司 Programmable logic controller and event-driven programming method thereof
WO2014094605A1 (en) * 2012-12-19 2014-06-26 施耐德电器工业公司 Programmable logic controller and event-driven programming method thereof
US9665412B2 (en) 2012-12-19 2017-05-30 Schneider Electric Industries Sas Programmable logic controller and event-driven programming method thereof
CN106959682A (en) * 2017-03-06 2017-07-18 深圳市元征软件开发有限公司 A kind of vehicle diagnosis method, diagnosis joint, and diagnostic system

Similar Documents

Publication Publication Date Title
US7526411B2 (en) Device for remote diagnostics of a field device
CA1301940C (en) Real time distributed processing in an industrial control cluster
CN106249718A (en) A kind of body of a motor car intelligent flexible manufactures system and method
CN109352412A (en) The production line scheduling system and method for car drive assembly components Flexible production
CN102739651A (en) Automation system
CN101377668A (en) Programmable logic controller having queue function and operation method thereof
US20130027237A1 (en) Fieldbus adapter and method of using fieldbus adapter
JP2021030306A (en) Dispatch system and dispatch method for manufacturing metallic mold
CN111240276A (en) Production automation control management system
CN107807614B (en) Numerical control machine tool machining control system and control method
CN110022093A (en) Motor control method and system
CN108067770B (en) One kind is towards automobile top cover welding and assembling production lines multitask robot coordinated scheduling method
CN109397287A (en) Robot coding method and device, robot, storage medium, processor
JP2002041116A (en) Production control tag and production system using the same
CN114513383B (en) Real-time Ethernet field bus data packet processing method based on original socket
CN109032029A (en) Industrial service device correspondence with foreign country method, system, device and industrial service device
JPS61127251A (en) Subscriber protocol processing system
Basile et al. Modeling of AS/RS via coloured Petri nets
US20090089799A1 (en) Programmable logic controller with queue function and method for the same
CN107682198A (en) A kind of network communication equipment
CN203224756U (en) Cluster control system
CN114055464B (en) Execution system for intelligent scheduling of manipulator work and work method thereof
CN116793090B (en) Automatic protection feeding heat treatment control system and method
CN206074734U (en) Wire harness break-make detecting system
US5323308A (en) Programmable control system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20090304