CN102681481A - Programmable logic controller (PLC) communication method based on universal serial bus (USB) - Google Patents

Programmable logic controller (PLC) communication method based on universal serial bus (USB) Download PDF

Info

Publication number
CN102681481A
CN102681481A CN2012101627092A CN201210162709A CN102681481A CN 102681481 A CN102681481 A CN 102681481A CN 2012101627092 A CN2012101627092 A CN 2012101627092A CN 201210162709 A CN201210162709 A CN 201210162709A CN 102681481 A CN102681481 A CN 102681481A
Authority
CN
China
Prior art keywords
master controller
module
communication
usb
receive
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
CN2012101627092A
Other languages
Chinese (zh)
Other versions
CN102681481B (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.)
Beijing rockontrol Information Technology Co.,Ltd.
Rockontrol Technology Group Co ltd
Original Assignee
SHANXI LIANHUA WEIYE TECHNOLOGY CO 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 SHANXI LIANHUA WEIYE TECHNOLOGY CO LTD filed Critical SHANXI LIANHUA WEIYE TECHNOLOGY CO LTD
Priority to CN201210162709.2A priority Critical patent/CN102681481B/en
Publication of CN102681481A publication Critical patent/CN102681481A/en
Application granted granted Critical
Publication of CN102681481B publication Critical patent/CN102681481B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The invention discloses a programmable logic controller (PLC) communication method based on a universal serial bus (USB), particularly relates to a PLC backboard communication method adopting a USB3.0 serial bus, and aims to provide a PLC communication method which is high in communication speed and high in instantaneity. According to the technical scheme, a plurality of USB concentrators are arranged on the USB backboard; the backboard communicating with the USB3.0 serial bus is adopted; a master controller, a USB expansion external module and a backboard power supply are arranged on the USB bus backboard; the USB expansion external module comprises a communication module, an input module and an output module; the master controller and the USB expansion external module are connected to the USB3.0 serial bus through the USB concentrators connected with the master controller and the USB expansion external module to finish data communication; and the master controller is connected with an upper machine, interacts data with the upper machine and controls downlink USB expansion equipment. The PLC communication method can be widely applied to the field of communication.

Description

A kind of PLC means of communication based on usb bus
Technical field
A kind of PLC means of communication based on usb bus of the present invention are specifically related to a kind of PLC backboard means of communication of the USB3.0 of employing serial bus communication.
Background technology
In industrial control process, need carry out continuously synchronous acquisition, record and processing in real time for a long time to multiple high low speed signal, and require on the data network comprehensive.
At present general pci bus, CAN bus and the industry ethernet of adopting accomplished and being connected of expansion module among the PLC; Though pci bus has the function of higher transmission speed (132Mbps) and " plug and play "; But its shortcoming is the plug trouble, and expansion slot is limited, is generally 5~6; The communication of CAN bus data has advantages such as reliability, real-time and dirigibility, also exists simultaneously can't directly to be connected with host computer, can not realize problems such as remote information is shared; Though the technology transfer rate of industry ethernet can arrive 100Mbps, technology is also ripe relatively, and Ethernet adopts CSMA/CD, can't guarantee the real time of data transmission requirement.
Summary of the invention
The present invention overcomes the deficiency that prior art exists, and technical matters to be solved is: the PLC that a kind of communication speed is fast, real-time is high is provided the means of communication.
For solving the problems of the technologies described above; The technical scheme that the present invention adopted is: a kind of PLC means of communication based on usb bus; Comprise: master controller, usb bus backboard, USB expanding peripherals module and backboard power supply; Said usb bus backboard adopts the backboard of USB3.0 serial bus communication for being provided with a plurality of usb hubs, and said master controller, USB expanding peripherals module and backboard power supply are installed on the usb bus backboard; The backboard power supply is supplied power to whole back plate, and said USB expanding peripherals module comprises communication module, load module and output module;
Said master controller is all accomplished data communication through inserting the USB3.0 universal serial bus with the usb hub that links to each other separately with USB expanding peripherals module; Master controller links to each other with host computer, and master controller is realized with the data interaction of host computer with to the control of descending USB expansion equipment;
The control method of said master controller is carried out according to the following steps:
The first step, master controller starts, and system initialization, master controller have judged whether the equipment adding or have logged off, if there is equipment to add system, then get into for second step, if there is equipment to log off, then get into for the 3rd step;
In second step, master controller distributes increases Device memory, gets into for the 4th step then;
In the 3rd step, master controller discharges this and withdraws from the shared internal memory of equipment;
In the 4th step, master controller is judged the type of newly added equipment, if newly added equipment is a communication module, then gets into for the 5th step, if newly added equipment is a load module, then gets into for the 6th step, if newly added equipment is an output module, then gets into for the 7th step;
The 5th step; Master controller initiatively sends inquiry packet; Wait for to receive the startup bag that communication module sends then, the information of said startup bag comprises slot position and communications protocol, and master controller receives and sends operable state bag notification communication module behind the startup bag of communication module and get into normal operating state; Then master controller sends configure packet; Wait for then and upload data, said configure packet comprises address, data upload time and the data upload byte number of communication module connection device, and it is that upper computer software provides desired data that last master controller carries out data processing;
In the 6th step, master controller is waited for the startup bag that receives load module, and master controller receives startup bag back and sends acknowledgement frame; Wait receives the data of load module transmission and judges and receive type of data then, is normal data packet if receive data, then sends heartbeat packet to load module and resolution data bag; Offer host computer; If receiving data is erroneous frame, then send reset command and give load module, load module is resetted restart;
In the 7th step, master controller is waited for the startup bag that receives output module, and master controller receives and starts bag; Then send output controlling packet and heartbeat packet and give the receipts output module, the master controller judgement receives that whether packet is erroneous frame, is not erroneous frame if master controller receives; Then master controller continuation transmission output controlling packet and heartbeat packet are given and are received output module; If master controller receives erroneous frame, then send reset command, output module is resetted restart.
The means of communication of said communication module and master controller are carried out according to the following steps:
The first step after communication module starts, is waited for the inquiry packet that receives master controller, gets into for second step then;
In second step, communication module is judged the inquiry packet of whether receiving master controller in 5 seconds, if receive the inquiry packet of master controller in 5 seconds, then gets into for the 3rd step, if do not receive the inquiry packet of master controller in 5 seconds, then initiatively gets into for the 3rd step;
In the 3rd step, communication module sends and starts bag to master controller, waits for then receiving the operable state bag that master controller sends, if receive configure packet, then gets into for the 4th step, if do not receive configure packet, then sends out again to start to wrap and gives master controller;
In the 4th step, communication module is provided with address, data upload byte number, the data upload time interval and the collection period of communication according to the configure packet content, gets into for the 5th step then;
In the 5th step, communication module is according to the configuration information content, carries out data acquisition and uploads; Communication module at the appointed time judges whether to receive the master control heartbeat packet that master controller sends simultaneously, if receive, then proceeds data transmission; If do not receive, then communication module resets and restarts.
The communication process of said load module and master controller carries out according to the following steps:
The first step after load module starts, is initiatively sent to start to master controller and is wrapped, and gets into for second step then;
In second step, load module wait for to receive the answer signal of master controller, if receive the answer signal of master controller then got into for the 3rd step, if do not receive the answer signal of master controller, then returns the first step;
In the 3rd step, load module judges whether the answer signal receive is the normal communication bag, if answer signal is the normal communication bag, then gets into for the 4th step, if answer signal is a reset frame, and the load module start-up operation that resets then;
The 4th step; Load module is gathered input signal and is uploaded normal data packet and give master controller; Whether monitoring receives the master control heartbeat packet then, if receive the master control heartbeat packet, then continues to gather input signal and upload normal data packet and give master controller; If do not receive the master control heartbeat packet then carry out fault processing, send erroneous frame and give master controller.
The communication process of said output module and master controller carries out according to the following steps:
The first step after output module starts, is initiatively sent to start to master controller and is wrapped, and gets into for second step then;
In second step, output module wait for to receive the answer signal of master controller, if receive the answer signal of master controller then got into for the 3rd step, if do not receive the answer signal of master controller, then returns the first step;
In the 3rd step, output module judges whether the answer signal receive is the normal communication bag, if answer signal is the normal communication bag, then gets into for the 4th step, if answer signal is a reset frame, and the output module start-up operation that resets then;
In the 4th step, output module is resolved the communication bag, exports control according to the output controlling packet; Whether monitoring receives the master control heartbeat packet then, if receive the master control heartbeat packet, then continues to resolve the communication bag; Export control according to the output controlling packet,, then carry out fault processing if do not receive the master control heartbeat packet; Send erroneous frame and give master controller, the communication of notice master controller takes place unusual.
Said usb hub is the USB3.0HUB with 1 uplink port and 4 USB downlink ports.
Said communication module comprises RS232 communication module, RS485 communication module, Ethernet interface communication module and CAN interface communication module; Said load module comprises analog quantity input acquisition module and digital quantity input acquisition module, and said output module comprises analog output module and digital quantity output module.
The beneficial effect that the present invention compared with prior art has is:
One, the present invention adopts the USB3.0 serial bus communication; The usb bus mode is applied among the PLC; Can in mixing velocity USB environment, the optimum data handling capacity be provided; Each downlink port maximum operating currenbt can be 500mA, and flank speed is 5.0Gbps, is the PLC means of communication that a kind of communication speed is fast, real-time is high;
Two, the present invention adopts the USB3.0 universal serial bus, and USB is real " plug and play " equipment, connects or when extracting, USB detects automatically, identification equipment, the load or unload driver; Usb protocol has been considered the accuracy of data transmission and the safeguard of robustness from many aspects, and data transmission credibility is high; USB does not have bus activity in 3ms, can get into suspended state automatically, and current drain is no more than 500m, can effectively protect power supply; Compare with other interface buss, USB interface is cheap, whole device, and cost is lower;
Three, the present invention supports the major flow communication interface in the industry such as RS232, RS485, RJ45 and CAN; Support that transfer rate is the low speed USB1.0 that the high speed USB 2.0 of hypervelocity USB3.0,480 Mbps of 5G/S, full speed USB1.1 that transfer rate is 12Mbps and transfer rate are 1.5 Mbps; Compatible strong; Expansion is convenient, can be used for various data communication occasions.
Description of drawings
Do further detailed explanation below in conjunction with the accompanying drawing specific embodiments of the invention:
Fig. 1 is the physical topological structure synoptic diagram of usb bus among the present invention;
Fig. 2 is the control method process flow diagram of master controller 1 among the present invention;
Fig. 3 is the means of communication process flow diagram of communication module 3 and master controller 1 among the present invention;
Fig. 4 is the means of communication process flow diagram of load module 3 and master controller 1 among the present invention;
Fig. 5 is the means of communication process flow diagram of output module 5 and master controller 1 among the present invention;
Among the figure: 1 be master controller, 2 for usb hub, 3 for communication module, 4 for load module, 5 for output module, 6 for host computer, 7 for the RS232 communication module, 8 for the RS485 communication module, 9 for the Ethernet interface communication module, 10 for CAN interface communication module, 11 for analog quantity input acquisition module, 12 for digital quantity input acquisition module, 13 be that analog output module, 14 is the digital quantity output module.
Embodiment
As shown in Figure 1; A kind of PLC means of communication of the present invention based on usb bus; Comprise: master controller 1, usb bus backboard, USB expanding peripherals module and backboard power supply, said usb bus backboard adopts the backboard of USB3.0 serial bus communication for being provided with a plurality of usb hubs 2; Said master controller 1, USB expanding peripherals module and backboard power supply are installed on the usb bus backboard, and the backboard power supply is supplied power to whole back plate; Said USB expanding peripherals module comprises communication module 3, load module 4 and output module 5; Said communication module 3 comprises RS232 communication module 7, RS485 communication module 8, Ethernet interface communication module 9 and CAN interface communication module 10; Said load module 4 comprises analog quantity input acquisition module 11 and digital quantity input acquisition module 12, and said output module 5 comprises analog output module 13 and digital quantity output module 14.
Said master controller 1 is all accomplished data communication through inserting the USB3.0 universal serial bus with the usb hub that links to each other separately 2 with USB expanding peripherals module; Master controller 1 links to each other with host computer 6; Master controller 1 is realized with the data interaction of host computer 6 with to the control of descending USB expansion equipment; Said usb hub 2 is for having the technical grade USB3.0HUB of 1 uplink port and 4 USB downlink ports; Usb hub 2 can connect master controller 1 through uplink port, also can connect usb hub 2, and downlink port can connect usb hub 2 and carry out cascade; Can connect communication module 3, load module 4 and output module 5; Also can connect RS232 communication module 7, RS485 communication module 8, Ethernet interface communication module 9 and CAN interface communication module 10 single communication modules, analog quantity input acquisition module 11 and digital quantity input acquisition module 12 single load modules 4, analog output module 13 and digital quantity output module 14 single output modules 5.
Master controller 1 is connected with two usb hubs 2 in this embodiment; Said communication module 3, load module 4 and output module 5 are through inserting the USB3.0 universal serial bus with the usb hub that links to each other separately 2; Single module, for example CAN interface communication module 10 also can independently insert the USB3.0 universal serial bus through usb hub 2.
Said RS232 communication module 7 has 1 uplink port with RS485 communication module 8; 2 downlink ports; Uplink port is a USB interface of supporting USB3.0; Downlink port can connect the outside and have the RS232/RS485 interface, supports the communication acquisition equipment of standard MODBUS agreement, and RS232 communication module 7 directly transforms with RS485 communication module 8 main serial ports MODBUS data and the usb datas realized; Said Ethernet interface communication module 9 has 1 uplink port; 2 downlink ports; Uplink port is a USB interface of supporting USB3.0; Downlink port can be used for connecting and has the Ethernet network interface, supports the communication acquisition setting of standard TCP/IP MODBUS agreement to be equipped with, and Ethernet interface communication module 9 main network interface data and the usb datas realized directly transform; Said CAN interface communication module 10 has 1 uplink port; 1 downlink port; Uplink port is a USB interface of supporting USB3.0; Downlink port can be used for connection and has the CAN mouth, supports the communication acquisition equipment of CANOPEN agreement, and CAN interface communication module 10 main CAN mouth data and the usb datas realized directly transform; The 4-20mA analog current signal, the 0-5V analog voltage signal is through analog quantity input acquisition module 11 access networks; The analog voltage signal of analog output module 13 output 0-5V and the analog current signal of 0-20mA; Digital quantity input acquisition module 12 connection standard switch and 2 line systems are near switch; Digital quantity output module 14 is through relay output.
As shown in Figure 2, the control method of said master controller 1 is carried out according to the following steps:
The first step, master controller 1 starts, and system initialization, master controller 1 have judged whether the equipment adding or have logged off, if there is equipment to add system, then get into for second step, if there is equipment to log off, then get into for the 3rd step;
In second step, master controller 1 distributes increases Device memory, gets into for the 4th step then;
In the 3rd step, master controller 1 discharges this and withdraws from the shared internal memory of equipment;
In the 4th step, master controller 1 is judged the type of newly added equipment, if newly added equipment is a communication module 3, then gets into for the 5th step, if newly added equipment is a load module 4, then gets into for the 6th step, if newly added equipment is an output module 5, then gets into for the 7th step;
The 5th step; Master controller 1 initiatively sends inquiry packet; Wait for to receive the startup bag that communication module 3 sends then, the information of said startup bag comprises slot position and communications protocol, and master controller 1 receives and sends operable state bag notification communication module 3 behind the startup bag of communication module 3 and get into normal operating states; Then master controller 1 sends configure packet; Wait for then and upload data, said configure packet comprises address, data upload time and the data upload byte number of communication module connection device, and it is that upper computer software provides desired data that last master controller 1 carries out data processing;
In the 6th step, master controller 1 is waited for the startup bag that receives load module 4, and master controller 1 receives startup bag back and sends acknowledgement frame; Wait receives the data of load module 4 transmissions and judges and receive type of data then, is normal data packet if receive data, then sends heartbeat packet to load module 4 and resolution data bag; Offer host computer 6; If receiving data is erroneous frame, then send reset command and give load module 4, load module 4 is resetted restart;
In the 7th step, master controller 1 is waited for the startup bag that receives output module 5, and master controller 1 receives and starts bag; Then send output controlling packet and heartbeat packet and give receipts output module 5, master controller 1 judgement receives that whether packet is erroneous frame, is not erroneous frame if master controller 1 receives; Then master controller 1 continuation transmission output controlling packet and heartbeat packet are given and are received output module 5; If master controller 1 receives erroneous frame, then send reset command, output module is resetted restart.
As shown in Figure 3, said communication module 3 carries out with the means of communication of master controller 1 according to the following steps:
The first step after communication module 3 starts, is waited for the inquiry packet that receives master controller 1, gets into for second step then;
In second step, communication module 3 is judged the inquiry packet of whether receiving master controller 1 in 5 seconds, if receive the inquiry packet of master controller 1 in 5 seconds, then gets into for the 3rd step, if do not receive the inquiry packet of master controller 1 in 5 seconds, then initiatively gets into for the 3rd step;
In the 3rd step, communication module 3 sends and starts bag to master controller 1, waits for then receiving the operable state bag that master controller 1 sends; If receive configure packet; Then got into for the 4th step,, then send out again to start to wrap and give master controller 1 if do not receive configure packet;
In the 4th step, communication module 3 is provided with address, data upload byte number, the data upload time interval and the collection period of communication according to the configure packet content, gets into for the 5th step then;
In the 5th step, communication module 3 is according to the configuration information content, carries out data acquisition and uploads; Communication module 3 at the appointed time judges whether to receive the master control heartbeat packet that master controller 1 sends simultaneously, if receive, then proceeds data transmission; If do not receive, then communication module 3 resets and restarts.
As shown in Figure 4, said load module 4 carries out with the communication process of master controller 1 according to the following steps:
The first step after load module 4 starts, is sent initiatively for master controller 1 and is started bag, gets into for second step then;
In second step, load module 4 is waited for the answer signal that receives master controllers 1, if receive the answer signal of master controller 1 then got into for the 3rd step, if do not receive the answer signal of master controller 1, then returns the first step;
In the 3rd step, load module 4 judges whether the answer signal of receiving is the normal communication bag, if answer signal is the normal communication bag, then gets into for the 4th step, if answer signal is a reset frame, and load module 4 start-up operation that resets then;
The 4th step; Load module 4 is gathered input signal and is uploaded normal data packet and give master controller 1; Whether monitoring receives the master control heartbeat packet then, if receive the master control heartbeat packet, then continues to gather input signal and upload normal data packet and give master controller 1; If do not receive the master control heartbeat packet then carry out fault processing, send erroneous frame and give master controller 1.
As shown in Figure 5, said output module 5 carries out with the communication process of master controller 1 according to the following steps:
The first step after output module 5 starts, is sent initiatively for master controller 1 and is started bag, gets into for second step then;
In second step, output module 5 is waited for the answer signal that receives master controllers 1, if receive the answer signal of master controller 1 then got into for the 3rd step, if do not receive the answer signal of master controller 1, then returns the first step;
In the 3rd step, output module 5 judges whether the answer signal of receiving is the normal communication bag, if answer signal is the normal communication bag, then gets into for the 4th step, if answer signal is a reset frame, and output module 5 start-up operation that resets then;
In the 4th step, output module 5 is resolved the communication bag, exports control according to the output controlling packet; Whether monitoring receives the master control heartbeat packet then, if receive the master control heartbeat packet, then continues to resolve the communication bag; Export control according to the output controlling packet,, then carry out fault processing if do not receive the master control heartbeat packet; Send erroneous frame and give master controller 1,1 communication of notice master controller takes place unusual.
The present invention adopts the USB3.0 serial bus communication; The usb bus mode is applied among the PLC; Can in mixing velocity USB environment, the optimum data handling capacity be provided; Each downlink port maximum operating currenbt can be 500mA, and flank speed is 5.0Gbps, is the PLC means of communication that a kind of communication speed is fast, real-time is high; USB is real " plug and play " equipment, connects or when extracting, USB detects automatically, identification equipment, the load or unload driver; Usb protocol has been considered the accuracy of data transmission and the safeguard of robustness from many aspects, and data transmission credibility is high; USB does not have bus activity in 3ms, can get into suspended state automatically, and current drain is no more than 500m, can effectively protect power supply; Compare with other interface buss, USB interface is cheap, whole device, and cost is lower; The present invention supports the major flow communication interface in the industry such as RS232, RS485, RJ45 and CAN; Support that transfer rate is the low speed USB1.0 that the high speed USB 2.0 of hypervelocity USB3.0,480 Mbps of 5G/S, full speed USB1.1 that transfer rate is 12Mbps and transfer rate are 1.5 Mbps; Compatible strong; Expansion is convenient, can be used for various data communication occasions.

Claims (6)

1. PLC means of communication based on usb bus; Comprise: master controller (1), usb bus backboard, USB expanding peripherals module and backboard power supply; It is characterized in that: said usb bus backboard is for being provided with a plurality of usb hubs (2); Adopt the backboard of USB3.0 serial bus communication; Said master controller (1), USB expanding peripherals module and backboard power supply are installed on the usb bus backboard, and the backboard power supply is supplied power to whole back plate, and said USB expanding peripherals module comprises communication module (3), load module (4) and output module (5);
Said master controller (1) is all accomplished data communication through inserting the USB3.0 universal serial bus with the usb hub that links to each other separately (2) with USB expanding peripherals module; Master controller (1) links to each other with host computer (6), and master controller (1) is realized with the data interaction of host computer (6) with to the control of descending USB expansion equipment;
The control method of said master controller (1) is carried out according to the following steps:
The first step, master controller (1) starts, and system initialization, master controller (1) have judged whether the equipment adding or have logged off, if there is equipment to add system, then get into for second step, if there is equipment to log off, then get into for the 3rd step;
In second step, master controller (1) distributes increases Device memory, gets into for the 4th step then;
In the 3rd step, master controller (1) discharges this and withdraws from the shared internal memory of equipment;
In the 4th step, master controller (1) is judged the type of newly added equipment, if newly added equipment is communication module (3); Then got into for the 5th step,, then got into for the 6th step if newly added equipment is load module (4); If newly added equipment is output module (5), then got into for the 7th step;
The 5th step; Master controller (1) initiatively sends inquiry packet; Wait for to receive the startup bag that communication module (3) sends then, the information of said startup bag comprises slot position and communications protocol, and master controller (1) receives and sends operable state bag notification communication module (3) behind the startup bag of communication module (3) and get into normal operating state; Then master controller (1) sends configure packet; Wait for then and upload data, said configure packet comprises address, data upload time and the data upload byte number of communication module connection device, and it is that upper computer software provides desired data that last master controller (1) carries out data processing;
The 6th step; The startup bag of master controller (1) wait reception load module (4), master controller (1) receive startup and wrap back transmission acknowledgement frame, and type of data is received in the data of wait reception load module (4) transmission and judgement then; If receiving data is normal data packet; Then sending heartbeat packet and give load module (4) and resolution data bag, offer host computer (6), is erroneous frame if receive data; Then send reset command and give load module (4), load module (4) is resetted restart;
The 7th step; Master controller (1) is waited for the startup bag that receives output module (5), and master controller (1) receives and starts bag, and then transmission output controlling packet and heartbeat packet are given and received output module (5); Master controller (1) judgement receives whether packet is erroneous frame; Be not erroneous frame if master controller (1) receives, then master controller (1) continuation transmission output controlling packet and heartbeat packet are given and are received output module (5), if master controller (1) receives erroneous frame; Then send reset command, output module is resetted restart.
2. a kind of PLC communication module based on usb bus according to claim 1 is characterized in that: said communication module (3) carries out with the means of communication of master controller (1) according to the following steps:
The first step after communication module (3) starts, is waited for the inquiry packet that receives master controller (1), gets into for second step then;
Second step; Communication module (3) is judged the inquiry packet of whether receiving master controller (1) in 5 seconds, if receive the inquiry packet of master controller (1) in 5 seconds, then gets into for the 3rd step; If do not receive the inquiry packet of master controller (1) in 5 seconds, then initiatively got into for the 3rd step;
In the 3rd step, communication module (3) sends and starts bag to master controller (1), waits for then receiving the operable state bag that master controller (1) sends; If receive configure packet; Then got into for the 4th step,, then send out again to start to wrap and give master controller (1) if do not receive configure packet;
In the 4th step, communication module (3) is provided with address, data upload byte number, the data upload time interval and the collection period of communication according to the configure packet content, gets into for the 5th step then;
The 5th step; Communication module (3) is according to the configuration information content, carries out data acquisition and uploads, and communication module (3) at the appointed time judges whether to receive the master control heartbeat packet that master controller (1) sends simultaneously; If receive; Then proceed data transmission, if do not receive, then communication module (3) resets and restarts.
3. a kind of PLC means of communication based on usb bus according to claim 1 is characterized in that: said load module (4) carries out with the communication process of master controller (1) according to the following steps:
The first step after load module (4) starts, is sent initiatively for master controller (1) and is started bag, gets into for second step then;
In second step, load module (4) wait for to receive the answer signal of master controller (1), if receive the answer signal of master controller (1) then got into for the 3rd step, if do not receive the answer signal of master controller (1), then returns the first step;
In the 3rd step, load module (4) judges whether the answer signal receive is the normal communication bag, if answer signal is the normal communication bag, then gets into for the 4th step, if answer signal is a reset frame, and load module (4) start-up operation that resets then;
The 4th step; Load module (4) is gathered input signal and is uploaded normal data packet and give master controller (1); Whether monitoring receives the master control heartbeat packet then, if receive the master control heartbeat packet, then continues to gather input signal and upload normal data packet and give master controller (1); If do not receive the master control heartbeat packet then carry out fault processing, send erroneous frame and give master controller (1).
4. a kind of PLC means of communication based on usb bus according to claim 1 is characterized in that: said output module (5) carries out with the communication process of master controller (1) according to the following steps:
The first step after output module (5) starts, is sent initiatively for master controller (1) and is started bag, gets into for second step then;
In second step, output module (5) wait for to receive the answer signal of master controller (1), if receive the answer signal of master controller (1) then got into for the 3rd step, if do not receive the answer signal of master controller (1), then returns the first step;
In the 3rd step, output module (5) judges whether the answer signal receive is the normal communication bag, if answer signal is the normal communication bag, then gets into for the 4th step, if answer signal is a reset frame, and output module (5) start-up operation that resets then;
In the 4th step, output module (5) is resolved the communication bag, exports control according to the output controlling packet; Whether monitoring receives the master control heartbeat packet then, if receive the master control heartbeat packet, then continues to resolve the communication bag; Export control according to the output controlling packet,, then carry out fault processing if do not receive the master control heartbeat packet; Send erroneous frame and give master controller (1), the communication of notice master controller (1) takes place unusual.
5. a kind of PLC means of communication based on usb bus according to claim 1 is characterized in that: said usb hub (2) is for having the USB3.0HUB of 1 uplink port and 4 USB downlink ports.
6. a kind of PLC means of communication according to claim 1 based on usb bus; It is characterized in that: said communication module (3) comprises RS232 communication module (7), RS485 communication module (8), Ethernet interface communication module (9) and CAN interface communication module (10); Said load module (4) comprises analog quantity input acquisition module (11) and digital quantity input acquisition module (12), and said output module (5) comprises analog output module (13) and digital quantity output module (14).
CN201210162709.2A 2012-05-24 2012-05-24 Programmable logic controller (PLC) communication method based on universal serial bus (USB) Active CN102681481B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210162709.2A CN102681481B (en) 2012-05-24 2012-05-24 Programmable logic controller (PLC) communication method based on universal serial bus (USB)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210162709.2A CN102681481B (en) 2012-05-24 2012-05-24 Programmable logic controller (PLC) communication method based on universal serial bus (USB)

Publications (2)

Publication Number Publication Date
CN102681481A true CN102681481A (en) 2012-09-19
CN102681481B CN102681481B (en) 2014-09-10

Family

ID=46813556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210162709.2A Active CN102681481B (en) 2012-05-24 2012-05-24 Programmable logic controller (PLC) communication method based on universal serial bus (USB)

Country Status (1)

Country Link
CN (1) CN102681481B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103812764A (en) * 2012-11-09 2014-05-21 江苏省电力公司连云港供电公司 Electrical monitoring equipment multiprotocol gateway
CN105094037A (en) * 2014-05-13 2015-11-25 Ls产电株式会社 Expansion module for programmable logic controller using usb communication
CN105426334A (en) * 2015-12-25 2016-03-23 河海大学常州校区 Parallel type large-scale USB extension device, working method and system
CN105487999A (en) * 2015-12-25 2016-04-13 河海大学常州校区 Cascaded large-scale USB expansion device and working method and system
CN105653483A (en) * 2015-12-25 2016-06-08 河海大学常州校区 Tandem mass USB expansion apparatus, working method and system
CN105653482A (en) * 2015-12-25 2016-06-08 河海大学常州校区 Super USB controller as well as working method and system
CN105980998A (en) * 2014-02-05 2016-09-28 华为技术有限公司 Per-function Downstream Port Containment
CN108318028A (en) * 2017-12-20 2018-07-24 中国航空工业集团公司西安航空计算技术研究所 A kind of navigation system core processing circuit design method
CN108332718A (en) * 2018-02-01 2018-07-27 武汉尺子科技有限公司 A kind of structure light information acquisition system
CN110430109A (en) * 2019-08-11 2019-11-08 南京中消安全技术有限公司 A kind of means of communication and system of the fire-fighting equipment based on two lines bus
CN110706471A (en) * 2019-10-23 2020-01-17 国网江苏省电力有限公司电力科学研究院 Intelligent electricity information acquisition method based on capacitive isolation multichannel redundancy technology by adopting edge algorithm
CN111008169A (en) * 2019-11-20 2020-04-14 南京南瑞水利水电科技有限公司 Low-cost high-speed communication bus and transmission control method thereof
CN111930083A (en) * 2020-08-05 2020-11-13 浙江智昌机器人科技有限公司 Method and device for collecting industrial equipment data
CN112799984A (en) * 2021-02-05 2021-05-14 成都中科四点零科技有限公司 One-to-many conversion device from USB3.0 interface to CPCI interface
CN114116315A (en) * 2021-11-27 2022-03-01 深圳市锐宝智联信息有限公司 USB failure recovery method and system applied to industrial information security mainboard

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030005196A1 (en) * 2001-07-02 2003-01-02 Reed Richard E. Apparatus and methods for using USB in programmable logic controllers
CN1538311A (en) * 2003-04-15 2004-10-20 ������������ʽ���� Contrl metod, controlled device and control system
CN1617518A (en) * 2003-11-11 2005-05-18 华为技术有限公司 Expandable broad band terminal cut-in device and its method for cut-in network
CN1620015A (en) * 2003-11-20 2005-05-25 欧姆龙株式会社 Communication interface, network system and programmable controller
CN200953088Y (en) * 2006-02-23 2007-09-26 周丹 DCS performance comprehensive tester

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030005196A1 (en) * 2001-07-02 2003-01-02 Reed Richard E. Apparatus and methods for using USB in programmable logic controllers
CN1538311A (en) * 2003-04-15 2004-10-20 ������������ʽ���� Contrl metod, controlled device and control system
CN1617518A (en) * 2003-11-11 2005-05-18 华为技术有限公司 Expandable broad band terminal cut-in device and its method for cut-in network
CN1620015A (en) * 2003-11-20 2005-05-25 欧姆龙株式会社 Communication interface, network system and programmable controller
CN200953088Y (en) * 2006-02-23 2007-09-26 周丹 DCS performance comprehensive tester

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103812764A (en) * 2012-11-09 2014-05-21 江苏省电力公司连云港供电公司 Electrical monitoring equipment multiprotocol gateway
CN105980998A (en) * 2014-02-05 2016-09-28 华为技术有限公司 Per-function Downstream Port Containment
CN105980998B (en) * 2014-02-05 2019-04-19 华为技术有限公司 Every function downlink port control
CN105094037A (en) * 2014-05-13 2015-11-25 Ls产电株式会社 Expansion module for programmable logic controller using usb communication
CN105094037B (en) * 2014-05-13 2018-04-03 Ls产电株式会社 Expansion module for the programmable logic controller (PLC) using universal serial bus communications
US9910420B2 (en) 2014-05-13 2018-03-06 Lsis Co., Ltd. Expansion module for programmable logic controller using USB communication
CN105653482A (en) * 2015-12-25 2016-06-08 河海大学常州校区 Super USB controller as well as working method and system
CN105426334A (en) * 2015-12-25 2016-03-23 河海大学常州校区 Parallel type large-scale USB extension device, working method and system
CN105653483B (en) * 2015-12-25 2018-03-20 河海大学常州校区 The extensive usb expansion device of tandem and method of work, system
CN105487999A (en) * 2015-12-25 2016-04-13 河海大学常州校区 Cascaded large-scale USB expansion device and working method and system
CN105653483A (en) * 2015-12-25 2016-06-08 河海大学常州校区 Tandem mass USB expansion apparatus, working method and system
CN105653482B (en) * 2015-12-25 2018-08-07 河海大学常州校区 Super USB controller and working method, system
CN105426334B (en) * 2015-12-25 2018-08-07 河海大学常州校区 Parallel extensive usb expansion device and working method, system
CN105487999B (en) * 2015-12-25 2018-08-07 河海大学常州校区 The extensive usb expansion device of tandem type and working method, system
CN108318028A (en) * 2017-12-20 2018-07-24 中国航空工业集团公司西安航空计算技术研究所 A kind of navigation system core processing circuit design method
CN108332718A (en) * 2018-02-01 2018-07-27 武汉尺子科技有限公司 A kind of structure light information acquisition system
CN108332718B (en) * 2018-02-01 2024-04-05 武汉尺子科技有限公司 Structured light information acquisition system
CN110430109A (en) * 2019-08-11 2019-11-08 南京中消安全技术有限公司 A kind of means of communication and system of the fire-fighting equipment based on two lines bus
CN110706471A (en) * 2019-10-23 2020-01-17 国网江苏省电力有限公司电力科学研究院 Intelligent electricity information acquisition method based on capacitive isolation multichannel redundancy technology by adopting edge algorithm
CN111008169A (en) * 2019-11-20 2020-04-14 南京南瑞水利水电科技有限公司 Low-cost high-speed communication bus and transmission control method thereof
CN111930083A (en) * 2020-08-05 2020-11-13 浙江智昌机器人科技有限公司 Method and device for collecting industrial equipment data
CN112799984A (en) * 2021-02-05 2021-05-14 成都中科四点零科技有限公司 One-to-many conversion device from USB3.0 interface to CPCI interface
CN114116315A (en) * 2021-11-27 2022-03-01 深圳市锐宝智联信息有限公司 USB failure recovery method and system applied to industrial information security mainboard

Also Published As

Publication number Publication date
CN102681481B (en) 2014-09-10

Similar Documents

Publication Publication Date Title
CN102681481A (en) Programmable logic controller (PLC) communication method based on universal serial bus (USB)
CN102647320B (en) Integrated circuit suitable for high-speed 1553 bus protocol control
CN108733604B (en) 485 bus intelligent expansion method and device based on modbus communication protocol
CN102833112A (en) Communication management machine having looped network function
CN101741766B (en) Conversion device from CAN network to ethernet network
WO2021057017A1 (en) Method for automatic replay attack test in field bus
WO2006091040A1 (en) Layer structure of network control protocol and interface method
CN105573239A (en) High speed backboard bus communication control device and method
WO2019196483A1 (en) Air conditioning system and communication method between units in air conditioning system
CN102664918B (en) Blade server control method and console
CN205119225U (en) Domestic heating system remote monitering system
CN101958888A (en) Configuration method of port negotiation capacity, communication port and communication device
CN201878164U (en) Dual-redundant network-based embedded intelligent transmission controller
CN110069437B (en) RS-485 bus polarity self-adaption method based on response frame validity
CN113553282A (en) Method for controlling USB concentrator port switch through network protocol
CN202535385U (en) Network security isolation device
CN100518130C (en) Embedded type network access device and method
CN206364831U (en) Data transmission device based on ring network structure
CN202856760U (en) Communication manager with ring network function
CN202043143U (en) EtherCAT high-dense digital IO (input/output) interface module
CN203011029U (en) Control system of marine-used module water chilling unit
Dang et al. A Gateway for Multi-device Communication between Mechatrolink-III and RS-485
CN109995632A (en) Communication means, the apparatus and system of multi-machine communication system
CN104133447A (en) Engineering machine control system and engineering machine
CN201629762U (en) Multi-node network circuit based on RS485 bus mode

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: 101102 Tongzhou District Zhongguancun science and Technology Park, Tongzhou Park light and electrical integration industrial base, government road, room 2, No. 212, room

Patentee after: ROCKONTROL TECHNOLOGY GROUP CO.,LTD.

Address before: 101102 Tongzhou District Zhongguancun science and Technology Park, Tongzhou Park light and electrical integration industrial base, government road, room 2, No. 212, room

Patentee before: BEIJING ROCKONTROL INFORMATION TECHNOLOGY CO.,LTD.

Address after: 101102 Tongzhou District Zhongguancun science and Technology Park, Tongzhou Park light and electrical integration industrial base, government road, room 2, No. 212, room

Patentee after: BEIJING ROCKONTROL INFORMATION TECHNOLOGY CO.,LTD.

Address before: 101102 Tongzhou District Zhongguancun science and Technology Park, Tongzhou Park light and electrical integration industrial base, government road, room 2, No. 212, room

Patentee before: Beijing rockontrol Information Technology Co.,Ltd.

CP03 Change of name, title or address

Address after: 101102 Tongzhou District Zhongguancun science and Technology Park, Tongzhou Park light and electrical integration industrial base, government road, room 2, No. 212, room

Patentee after: Beijing rockontrol Information Technology Co.,Ltd.

Address before: High tech Zone Shanxi city Taiyuan province Jiahua street 030032 No. 8

Patentee before: Shanxi Lianhua Weiye Technology Co.,Ltd.