CN108449117B - Internet of things system based on PLC and network access method - Google Patents

Internet of things system based on PLC and network access method Download PDF

Info

Publication number
CN108449117B
CN108449117B CN201810442933.4A CN201810442933A CN108449117B CN 108449117 B CN108449117 B CN 108449117B CN 201810442933 A CN201810442933 A CN 201810442933A CN 108449117 B CN108449117 B CN 108449117B
Authority
CN
China
Prior art keywords
plc
control instruction
slave
plc controller
internet
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.)
Active
Application number
CN201810442933.4A
Other languages
Chinese (zh)
Other versions
CN108449117A (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.)
Shenzhen Shengrui Technology Co ltd
Original Assignee
Shenzhen Shengrui 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 Shenzhen Shengrui Technology Co ltd filed Critical Shenzhen Shengrui Technology Co ltd
Priority to CN201810442933.4A priority Critical patent/CN108449117B/en
Publication of CN108449117A publication Critical patent/CN108449117A/en
Application granted granted Critical
Publication of CN108449117B publication Critical patent/CN108449117B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/052Linking several PLC's
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C19/00Electric signal transmission systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/12Plc mp multi processor system
    • G05B2219/1215Master slave system
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/15Plc structure of the system
    • G05B2219/15018Communication, serial data transmission, modem

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Automation & Control Theory (AREA)
  • Cable Transmission Systems, Equalization Of Radio And Reduction Of Echo (AREA)

Abstract

The application discloses an internet of things system based on a PLC (programmable logic controller) and a network access method, wherein the system comprises at least two PLC controllers, the at least two PLC controllers comprise a master PLC controller and at least one slave PLC controller, and the master PLC controller is respectively connected with each slave PLC controller through a power line; when the slave PLC receives the control instruction sent in a wireless radio frequency mode, the slave PCL controller sends the control instruction to the master PLC controller through a power carrier, the master PLC controls the slave PLC controllers to send the control instruction in a broadcast mode, and the slave PLC controllers send the control instruction to corresponding controlled equipment. According to the application, the wireless radio frequency network is combined with the PLC, and the power carrier network is connected with the wireless radio frequency network to perform data relay forwarding, so that the data sent by the original wireless radio frequency network is expanded; meanwhile, on the basis that the wireless equipment does not need wiring, the wiring-free switching is increased, and engineering refitting cost is reduced.

Description

Internet of things system based on PLC and network access method
Technical Field
The application relates to the technical field of the Internet of things, in particular to an Internet of things system based on a PLC and a network access method.
Background
With the continuous improvement of the scientific and technological level, the scientific and technological civilization of the human society has been in the information age of high-speed running, meanwhile, under the background of economy globalization, the modern communication technology is not limited to one corner, and a greater breakthrough is obtained, so that the wireless radio frequency communication and the power line carrier communication are the most common two communication technologies.
Radio frequency communication mainly relies on electromagnetic waves as transmission media for data transmission, and in recent years, the development speed of radio frequency communication is faster and faster. For example, zigbee, Z-Wave and the like are stable due to low power consumption in the application of consumer electronics integration of the Internet of things, are convenient for system integration, have matched interconnection protocol standards, have universality and have been widely applied to commodity house projects; lora has also begun to be widely used in hotel business applications; wiFi is more often embodied on smart items, with blue being primarily smart wearable. However, in the field of household consumption, the transmitting frequency MHz of wireless radio frequency communication generally adopts 433MHz-5GHz, the electromagnetic wavelength is shorter, the capability of bypassing obstacles to diffract to a farther place is weak, and the transmitting power is generally limited below 20DB under the influence of human body, so that the transmitting distance is shorter, a routing node is required to be added, the cost of the household internet of things is increased, and the influence of an electric field environment is easy.
Disclosure of Invention
Aiming at the defects of the prior art, the application aims to provide a system based on the PLC Internet of things.
In order to solve the technical problems, the technical scheme adopted by the application is as follows:
A PLC-based internet of things system, comprising: at least two PLC controllers, the at least two PLC controllers comprising a master PLC controller and at least one slave PLC controller; the master PLC is connected with each slave PLC through a power line; the master PLC is used for receiving control instructions sent by each slave PLC through a power carrier and sending the control instructions to each slave PLC in a broadcast mode through the power carrier; each slave PLC controller is used for receiving the control instruction sent by the master PLC controller and sending the control instruction to the corresponding controlled equipment.
The PLC-based Internet of things system comprises a PLC unit and a communication unit, wherein the communication unit receives a first control instruction sent by a terminal device, converts the first control instruction into a control instruction in a preset format, sends the control instruction to the PLC unit in a serial data form, and sends the control instruction through a power carrier.
The PLC-based Internet of things system, wherein the preset format comprises a start bit, an address bit, a control code, a data length, a data bit, a check code and an end code.
The PLC-based internet of things system is characterized in that when a master PLC controller receives a control instruction sent by a slave PLC controller through a power carrier, the master PLC controller is further used for acquiring equipment identifiers of the slave PLC controllers and sending the control signals to all slave PLC controllers except the slave PLC controllers corresponding to the equipment identifiers.
The PLC-based Internet of things system is characterized in that the terminal equipment is connected with the corresponding PLC through a network or connected with the corresponding PLC through a serial port.
A network access method of an internet of things system based on a PLC (programmable logic controller) comprises the following steps:
the method comprises the steps that a master PLC receives a network access request sent by a slave PLC, wherein the network access request carries a device identifier controlled by the slave PLC;
searching the equipment identifier in a preset equipment identifier list;
and if the equipment identifier is found, controlling the slave PLC to access the Internet of things system.
The network access method of the internet of things system based on the PLC further comprises the following steps:
If the equipment identifier is not found, monitoring a network access instruction allowing network access;
And when the network access instruction is monitored, controlling the slave PLC to access the Internet of things system.
The network access method of the internet of things system based on the PLC, wherein when the network access instruction is monitored, the method for controlling the slave PLC to access the internet of things system further comprises the following steps:
And adding the equipment identifier of the slave PLC controller to the equipment identifier list, wherein the equipment identifier is the address of the slave PLC controller.
The network access method of the internet of things system based on the PLC further comprises the following steps:
and the master PLC receives a network-quitting instruction, quits the Internet of things system according to the network-quitting instruction, and empties the equipment identification list.
The network access method of the internet of things system based on the PLC further comprises the following steps:
receiving a network-quitting request sent by a slave PLC controller, wherein the network-quitting request carries a device identifier of the slave PLC controller;
And controlling the slave PLC to exit the Internet of things system according to the network exit request, and deleting the equipment identifier from the equipment identifier list.
The network access method of the internet of things system based on the PLC further comprises the following steps:
When a PLC (programmable logic controller) in the Internet of things system receives a control instruction sent in a wireless radio frequency mode, reading configuration information of the control instruction, wherein the configuration information at least comprises a start bit, a data length and an end code;
comparing the configuration information with preset configuration information;
when the two control instructions are identical, converting the control instructions into first control instructions in a preset format according to a preset rule, and broadcasting and transmitting the first control instructions in a power carrier mode;
Splitting the first control instruction into the control instruction according to the preset rule, and sending the control instruction to the corresponding controlled equipment in a wireless radio frequency mode.
The beneficial effects are that: compared with the prior art, the application provides an Internet of things system based on a PLC and a network access method, wherein the system comprises at least two PLC controllers, the at least two PLC controllers comprise a master PLC controller and at least one slave PLC controller, the master PLC controller is respectively connected with each slave PLC controller through a power line, and each slave PLC controller is connected with the master PLC controller through the power line; when the slave PLC receives the control instruction sent in a wireless radio frequency mode, the slave PCL controller sends the control instruction to the master PLC controller through a power carrier, the master PLC controls the slave PLC controllers to send the control instruction in a broadcast mode, and the slave PLC controllers send the control instruction to corresponding controlled equipment. According to the application, the wireless radio frequency network is combined with the PLC through the PLC Internet of things, and the power carrier network is connected with the wireless radio frequency network to perform data relay forwarding, so that the data sent by the original wireless radio frequency network is expanded; meanwhile, on the basis that the wireless equipment does not need wiring, the wiring-free switching is increased, and engineering refitting cost is reduced.
Drawings
Fig. 1 is a schematic structural diagram of a preferred embodiment of an internet of things system based on PLC according to the present application.
Fig. 2 is a flowchart of a preferred embodiment of a PLC-based internet of things method according to the present application.
Detailed Description
The application provides an internet of things system and an internet access method based on a PLC, which are used for making the purposes, the technical scheme and the effects of the application clearer and more definite, and the application is further described in detail below by referring to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The application will be further described by the description of embodiments with reference to the accompanying drawings.
The present embodiment provides a PLC-based internet of things system, as shown in fig. 1, which includes at least two PLC controllers, wherein the at least two PLC controllers include a master PLC controller 100 and at least one slave PLC controller 200. The master PLC controller 100 is connected to each slave PLC controller 200 through a power line, respectively, and the slave PLC controllers 200 are not connected to each other. That is, the master PLC controller 100 communicates with each slave PLC controller 200, respectively, and each slave PLC controller 200 does not communicate with each other. The slave PLC controller 200 may receive a control instruction transmitted in a radio wave manner and transmit the received control instruction to the master PLC controller 100 through a power carrier, and the master PLC controller 100 receives the control instruction and transmits the control instruction to each slave PLC controller 200 through the power carrier, and each slave PLC controller 200 transmits the control instruction to its corresponding controlled device, so that the controlled device performs an operation corresponding to the control instruction. When receiving a control instruction, the master PLC sends the control instruction to each slave PLC in a broadcast mode through a power carrier, and each slave PLC sends the control instruction to corresponding controlled equipment in a wireless radio frequency mode.
Further, the master PLC controller may receive the control instruction sent by the slave PLC controller through the power carrier, or may directly receive the control instruction sent by the external terminal. That is, the master PLC controller controls the monitor control command, and determines a receiving mode of the control command after the monitor control command, where the receiving mode includes a power carrier mode and a radio frequency mode; when the receiving mode of the control instruction is in a power carrier mode, acquiring the equipment identifier of the slave PLC controller for transmitting the control instruction, and transmitting the control instruction to all slave PLC controllers except the slave PLC controller corresponding to the equipment identifier in the Internet of things in a broadcast mode through the power carrier according to the equipment identifier; when the receiving mode of the control instruction is a wireless radio frequency mode, the control instruction is sent to all slave PLC controllers in the Internet of things in a broadcasting mode through a power carrier. Of course, after receiving the control instruction, the master PLC controller sends the control instruction to the corresponding controlled device in a wireless radio frequency mode. Therefore, when receiving the control instruction, the master PLC controller can firstly send the control instruction to the corresponding controlled equipment and detect the feedback information of the controlled equipment; if the feedback information is monitored, the control instruction is not sent to each slave PLC controller in a power carrier mode; if the feedback information is not monitored, the control instruction is sent to each slave PLC controller in a power carrier mode, and therefore the working efficiency of the Internet of things can be improved. It should be noted that, when the master PLC controller configures the corresponding controlled device, the master PLC controller directly transmits the control command to each slave PLC controller in the form of a power carrier. In addition, when the feedback information is monitored, the feedback information can be sent to a service end connected with the main PLC controller, so that a notification is sent to a user associated with the service end through the service end, and the user is informed of the working state of the controlled equipment through the notification.
Further, when the slave PLC controller receives a control instruction, the slave PLC controller may first send the control instruction to the corresponding controlled device, monitor whether feedback information is received in a preset time, and if the feedback information is monitored, not send the control instruction to the master PLC controller in the form of a power carrier; if the feedback information is not monitored, the control instruction is sent to the main PLC controller in a power carrier mode, so that the overhead of the Internet of things is reduced. Of course, when the slave PLC controller transmits the control instruction to the master PLC controller, the slave PLC controller may simultaneously transmit its own device identifier to the master PLC controller, so that the master PLC controller determines the slave PLC controller that transmits the control instruction.
In addition, each PLC controller may be preconfigured with its operation mode, wherein the operation module master mode and slave mode, that is, each PLC controller is configured with two operation modules. And when each PLC controller forms the Internet of things, the working mode of the PLC controller serving as the master PLC controller is set to be a master mode, and the working mode of each PLC controller serving as the slave PLC controller is set to be a slave mode. When each PLC controller receives a control instruction, each PLC controller acquires a transmission mode of the control instruction, and when the transmission mode of the control instruction is a wireless radio frequency mode, the PLC controller acquires a working mode of the PLC controller; if the working mode is a host mode, the control instruction is sent to each PLC controller in a broadcasting mode through a power carrier; if the working mode is the slave mode, the working mode is automatically switched to the master mode, the control command is sent to all PLC controllers in a broadcasting mode through a power carrier, and after the control command is sent, the working mode is switched to the slave mode. Of course, when the slave PLC controller is switched to the master mode, the master PLC controller in the master mode may be automatically switched to the slave mode, and when the slave PLC controller is switched to the slave mode, the master PLC controller is automatically switched to the master mode again. Therefore, automatic switching of the master PLC controller and the slave PLC controller is realized, and flexibility of the Internet of things system is improved.
Meanwhile, in this embodiment, the PLC controller may include a communication unit and a PLC unit, where the communication unit receives a first control instruction sent by the terminal device, converts the first control instruction into a control instruction in a preset format, and sends the control instruction to the PLC unit in a serial data form, where the PLC unit sends the control instruction through a power carrier. The communication unit can be connected with the PLC unit through a serial port, and can be arranged in the PLC unit. In addition, the communication unit may receive a first control instruction sent by the terminal device through the network, and convert the first control instruction into a control instruction in a preset format. For example, in a preferred embodiment of the present application, the PLC controller may be a model SR-PLC1000 PLC controller.
The preset format can be preset, the PLC receives the control instruction in the preset format, identifies the control instruction in the preset format and sends the control instruction in the preset format through the power carrier. In this embodiment, the preset format includes a start bit, an address bit, a control code, a data length, a data bit, a check code, and an end code, where the start bit is a start character of a control instruction; the address is the address of the PLC controller corresponding to the control instruction, which is a unique identification code of the PLC controller, for example 0000 0000 0001, 0000 0000 0002 represent two different PLC controllers; the control code indicates the function type of the control instruction, such as 01 indicates inquiry, 02 indicates report, 03 indicates write data, 04 indicates read data, 05 indicates delete data, and so on; the data length represents the length occupied by the control instruction carrying data; the data bit is the data carried by the control instruction; the check code is used for checking the control instruction, such as odd check or even check; the ending curse is used to indicate the end of a control instruction. For example, in one embodiment of the present application, the control command in the preset format is 68 A0 A1 A2 A3 A4 A5 68 C1 05 0000 01 02 03 6B 16, where 68 is a start code, A0 A1 A2 A3 A4 A5 belongs to an address bit, C1 is a control code, 05 data length, 0000 01 02 03 is a data bit, 6B is a check code, and 16 is a termination code. In addition, when each data of the address bit of the control instruction in the preset format is the same as the data of the control code, it indicates that the control instruction in the preset format is in a broadcast state, for example, when the address bit is AA AA AA AA AA AA and the control code is AA, it indicates that the control instruction is transmitted in a broadcast form.
In addition, the data packet format of the first control instruction sent by the terminal device is negotiated with the PLC controller in advance, and the negotiated data packet format is adopted, so that after the PLC receives the first control instruction of the negotiated data packet format, the first control instruction can be identified and converted into the control instruction of the preset format. For example, the first control command may include a start character, a data bit, and an end character, where the start character and the end character are preset, so as to identify the first control command by the start character and the end character, and convert the first control command into a control command in a preset format. For example, if the start character is 67H, the data length bit is 8 bits, and the end character is BB, then the frame data may be represented as 67 08 11 22 33 44 55 66 77 88 BB. When the RF network sends a frame data 67 08 11 22 33 44 55 66 77 88 BB to the Internet of things network, a first PLC (programmable logic controller) in the Internet of things detects a start character and an end character, the frame data is packaged and encapsulated according to a preset format, and the encapsulated data frame can be 68 0000 0000 01 11 68 08 11 22 33 44 55 66 77 88 4E 16; the first PLC controller transmits the data frame through the power carrier, meanwhile, the encapsulated data frame is split into frame data which is originally received, namely 68 0000 0000 01 11 68 08 11 22 33 44 55 66 77 88 4E 16 is split and converted into 67 08 11 22 33 44 55 66 77 88 BB to be transmitted to corresponding controlled equipment, and therefore the PLC controller can transmit the frame data through the power carrier and the network simultaneously.
Further, the controlled device may be a device directly controlled by a slave PLC controller, for example, a smart lamp or the like. The slave PLC controller is connected with the controlled equipment through a driving interface, and the slave PLC controller directly sends the control instruction to the corresponding controlled equipment through the driving interface so that the controlled equipment executes the operation corresponding to the control instruction. In addition, the controlled device may be connected to the slave PLC controller through a wire, that is, the controlled device is connected to the slave PLC controller through a serial port, and the slave PLC controller transmits the control instruction to the controlled device in the form of serial port data, so that the controlled device performs an operation corresponding to the control instruction. In addition, the controlled device can be connected with the slave PLC through the wireless device, and the slave PLC sends a control instruction to the controlled device in a wireless radio frequency mode, so that the controlled device executes an operation corresponding to the control instruction. That is, the internet of things system may include a first controlled device connected to a slave PLC controller through a driving interface, a second controlled device connected to a slave PLC controller through a serial port, and a third controlled device in communication with a slave PLC controller through a wireless radio frequency manner. Of course, in practical application, the slave PLC controller may communicate with the controlled device through a wireless network or a wired network, where the communication protocol that may be adopted by the network may be Zigbee, Z-wave, bluetooth, DALI, wiFi, DMX, KEX, etc.
In addition, the internet of things system based on the PLC can further comprise a transmitting end, the transmitting end can be communicated with a PLC controller, the transmitting end respectively transmits control instructions received or generated by the transmitting end in a wireless radio frequency mode, and on the other hand, the control instructions are broadcasted in a serial port data mode. The transmitting end transmits the control instruction to other user ends which are configured with the same communication, and broadcasts the control instruction in a serial data form, so that the PLC controller capable of identifying the serial data receives the control instruction and broadcasts the control instruction to other PLC controllers through a power carrier wave, and continuous transmission and expansion of the control instruction are realized.
Further, a networking key and a network-quitting key are arranged on the PLC, and when the networking key is triggered, the PLC enters a networking mode; when the off-network key is triggered, the PLC controller advances and retreats the network mode. The networking key and the off-network key can be mechanical keys, touch keys and the like. In this embodiment, the networking key and the off-network key adopt the same mechanical key, and the PLC controller is controlled to enter different states by different time of triggering the mechanical key, for example, triggering the mechanical key 3s to enter the networking mode, triggering the mechanical key 8s to enter the off-network mode, and so on. Of course, in practical application, the networking key and the off-network key may correspond to one mechanical key respectively, and use different colors for identification, for example, use a red key to represent the off-network key, use a green key to use the networking key, and so on. In addition, the PLC controller can be further provided with an indicator lamp, the working state of the PLC controller is indicated through the indicator lamp, and the working state at least comprises a networking state and a network-withdrawal state.
Meanwhile, in this embodiment, the server and the user side are respectively connected with the main PLC controller and the user side, and the user side is configured to receive the addresses of the PLC controllers and send the addresses of the PLC controllers to the server, where the server is configured to associate the addresses of the PLC controllers with the device identifiers of the PLC controllers corresponding to the server, so as to determine the addresses of the PLC controllers corresponding to the server according to the device identifiers. The address refers to an installation address of the PLC controller, namely an installation position of the PLC controller. That is, the user side receives an address (for example, bedroom, toilet, etc.) input by the user for each PLC controller, binds the address with a device identifier (unique identity) of the PLC controller corresponding to the address, and sends the address information after binding to the server, so that the server can acquire and store the corresponding relationship between each PLC controller and the corresponding address, and when receiving the network access information or the network exit information sent by the master PLC controller, the address of the PLC controller can be determined according to the device identifier carried to the PLC controller by the network access information and the network exit information, so as to facilitate better management of devices in the internet of things. In addition, in practical application, in order to facilitate quick determination of the address of each PLC controller, when the user receives the address of each PLC controller, the name of each PLC controller may be modified to the address. For example, a PLC controller to be in a bedroom may be named bedroom, etc.
Based on the above-mentioned internet of things based on the PLC, the application also provides a network access method of the internet of things system based on the PLC, as shown in figure 2, comprising the following steps:
s10, the master PLC receives a network access request sent by the slave PLC, wherein the network access request carries the equipment identifier controlled by the slave PLC.
Specifically, the network access request is generated by the slave PLC controller and sent to the master PLC controller, and the network access request may be generated automatically by the slave PLC controller or may be generated by receiving an external control instruction from the PLC controller. In this embodiment, when the network access request is generated for receiving an external control instruction, the process of generating the network access request may be: the slave PLC controller is provided with a control key, a user enters a 2-time/S flash through short pressing 3S, enters a searching network access mode, presses again, changes the LED indicator into a 1-time/2S slow flash, enters a networking allowed added mode, and simultaneously sends a network access request to the master PLC controller. The case where the network access request is automatically generated may be: and when the slave PLC controller is added into the Internet of things and the Internet of things or the slave PLC controller is powered down and restarted, the slave PLC controller automatically enters a network access mode, and generates and transmits a network sending request.
S20, searching the equipment identifier in a preset equipment identifier list.
Specifically, the device identifier list is pre-stored, and records device identifiers and installation positions of all the PLC controllers in the internet of things. When a network access request is received, whether the PLC controller corresponding to the equipment identifier is in the Internet of things or not can be determined according to the equipment identifier list and the received equipment identifier. In practical application, the device identifier list may be stored in a background server, and the master PLC controller may be connected to the background server, and perform a check on the device identifier through the background server, and receive a query result sent by the background server, so as to execute a corresponding operation according to the query result.
And S30, if the equipment identifier is found, controlling the slave PLC to access the Internet of things system.
Specifically, the finding of the device identifier indicates that the slave PLC controller corresponding to the device identifier is located in the internet of things, and the slave PLC controller can be controlled to access the internet of things system. Of course, if the equipment identifier is not found, it is indicated that the PLC controller corresponding to the equipment identifier is not located in the internet of things, so that the master PLC controller is required to be also in the network access mode to add the PLC controller into the internet of things system. Corresponding to the above. The networking method of the internet of things system based on the PLC further comprises the following steps:
s40, if the equipment identifier is not found, monitoring a network access instruction allowing network access;
and S50, when the network access instruction is monitored, controlling the slave PLC to access the Internet of things system.
Specifically, the network access instruction is received by the master PLC controller, which may be generated by the master PLC controller itself or may be sent by an external device received by the master PLC controller. In an embodiment, the network access instruction is generated for the master PLC controller itself. For example, the main short button 3S, the LED indicator lights 2 times/S flash, enter the network access mode, press again, the LED indicator lights enter 1 time/2S slow flash, which means that the slave network access request can be received initially, press again, the LED indicator lights are always on, the network access mode is exited and provided with a networking button and an indicator light, by pressing 3S for 2 times/S flash of the LED indicator lights, the main PLC controller enters the network access mode, press again the networking button, the LED indicator lights enter 1 time/2S slow flash, the main PLC controller generates the network access instruction and starts to receive the network access request from the PLC controller. In addition, when the network access instruction is monitored, the method further comprises the following steps of: and adding the equipment identifier of the slave PLC controller to the equipment identifier list, wherein the equipment identifier is the address of the slave PLC controller. Therefore, the equipment identification list can be updated in time, so that the power-down recombination of each PLC controller is more accurate.
In addition, each slave PLC controller in the Internet of things system can also exit the Internet of things system, and the master PLC controller can also exit the Internet of things system, and correspondingly, the network access method of the Internet of things system based on the PLC further comprises the following steps:
S60, when the master PLC receives a network-quitting instruction, the master PLC quits the Internet of things system according to the network-quitting instruction and empties the equipment identification list;
s70, when the master controller receives a network-quitting request sent by the slave PLC controller, the network-quitting request carries the equipment identifier of the slave PLC controller;
S80, controlling the slave PLC to exit the Internet of things system according to the network exit request, and deleting the equipment identifier from the equipment identifier list.
Specifically, the network-exiting command of the main PLC controller may be in the form of a program command or in the form of an external signal trigger, that is, the network-exiting command may be generated by triggering a key of the main PLC controller or may be sent by an external device. In this embodiment, the logout instruction is generated by triggering a configured networking key, for example, the device identifier list may be pressed for a long time by 8S or more, the LED indicator is flashed 8 times/S, and then extinguished 2S. The network-quitting request of the slave PLC controller can be triggered to be configured by a networking key 8S, the LED indicator lamp enters 8 times/S flash, the slave PLC controller enters a network-quitting mode for sending the request, and the network-quitting request is sent to the master PLC controller. And the master PLC receives the network-quit request, adds the slave PLC into a blacklist, and extinguishes the LED indicator lamp controlled by the slave PLC.
In one embodiment of the present invention, the network access method of the PLC-based internet of things system further includes:
When a PLC (programmable logic controller) in the Internet of things system receives a control instruction sent in a wireless radio frequency mode, reading a start bit and an end code of the control instruction;
comparing the start bit and the end code with a preset start bit and a preset end code respectively;
when the two control instructions are identical, converting the control instructions into first control instructions in a preset format according to a preset rule, and broadcasting and transmitting the first control instructions in a power carrier mode;
Splitting the first control instruction into the control instruction according to the preset rule, and sending the control instruction to the corresponding controlled equipment in a wireless radio frequency mode.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (6)

1. The utility model provides a thing networking system based on PLC which characterized in that, it includes: at least two PLC controllers, the at least two PLC controllers comprising a master PLC controller and at least one slave PLC controller;
the master PLC is connected with each slave PLC through a power line;
The master PLC is used for receiving control instructions sent by each slave PLC through a power carrier and sending the control instructions to each slave PLC in a broadcast mode through the power carrier;
The PLC comprises a PLC unit and a communication unit, wherein the communication unit receives a first control instruction sent by a terminal device, converts the first control instruction into a control instruction in a preset format, sends the control instruction to the PLC unit in a serial data form, and sends the control instruction through a power carrier;
the data packet format of the first control instruction sent by the terminal equipment is negotiated with the PLC in advance, and the negotiated data packet format is adopted;
Each slave PLC controller is used for receiving a control instruction sent by the master PLC controller and sending the control instruction to corresponding controlled equipment;
The slave PLC receives a control instruction sent in a radio wave mode and sends the received control instruction to the master PLC through a power carrier, the master PLC receives the control instruction and sends the control instruction to each slave PLC through the power carrier, and each slave PLC sends the control instruction to a corresponding controlled device, so that the controlled device executes an operation corresponding to the control instruction;
The master PLC controller is used for controlling the monitoring control instruction, judging the receiving mode of the control instruction after the monitoring control instruction, and when the master PLC controller receives the control instruction sent by the slave PLC controller through the power carrier, the master PLC controller is also used for acquiring the equipment identifier of the slave PLC controller and sending the control instruction to all the slave PLC controllers except the slave PLC controller corresponding to the equipment identifier.
2. The PLC based internet of things system of claim 1, wherein the preset format includes a start bit, an address bit, a control code, a data length, a data bit, a check code, and an end code.
3. A networking method based on the PLC-based internet of things system according to any one of claims 1-2, comprising:
the method comprises the steps that a master PLC receives a network access request sent by a slave PLC, wherein the network access request carries a device identifier controlled by the slave PLC;
searching the equipment identifier in a preset equipment identifier list;
If the equipment identifier is found, controlling the slave PLC to access the Internet of things system;
If the equipment identifier is not found, monitoring a network access instruction allowing network access;
When the network access instruction is monitored, controlling the slave PLC to access the Internet of things system;
When the network access instruction is monitored, the control of the slave PLC controller to access the Internet of things system further comprises:
Adding the equipment identifier of the slave PLC controller to the equipment identifier list, wherein the equipment identifier is the address of the slave PLC controller;
The server associates the address of each PLC controller with the equipment identifier of the corresponding PLC controller so as to determine the address of the corresponding PLC controller according to the equipment identifier.
4. The networking method of the PLC-based internet of things system of claim 3, further comprising:
and the master PLC receives a network-quitting instruction, quits the Internet of things system according to the network-quitting instruction, and empties the equipment identification list.
5. The networking method of the PLC-based internet of things system of claim 3, further comprising:
receiving a network-quitting request sent by a slave PLC controller, wherein the network-quitting request carries a device identifier of the slave PLC controller;
And controlling the slave PLC to exit the Internet of things system according to the network exit request, and deleting the equipment identifier from the equipment identifier list.
6. The networking method of the PLC-based internet of things system of claim 3, further comprising:
When a PLC (programmable logic controller) in the Internet of things system receives a control instruction sent in a wireless radio frequency mode, reading configuration information of the control instruction, wherein the configuration information at least comprises a start bit, a data length and an end code;
comparing the configuration information with preset configuration information;
when the two control instructions are identical, converting the control instructions into first control instructions in a preset format according to a preset rule, and broadcasting and transmitting the first control instructions in a power carrier mode;
Splitting the first control instruction into the control instruction according to the preset rule, and sending the control instruction to the corresponding controlled equipment in a wireless radio frequency mode.
CN201810442933.4A 2018-05-10 2018-05-10 Internet of things system based on PLC and network access method Active CN108449117B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810442933.4A CN108449117B (en) 2018-05-10 2018-05-10 Internet of things system based on PLC and network access method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810442933.4A CN108449117B (en) 2018-05-10 2018-05-10 Internet of things system based on PLC and network access method

Publications (2)

Publication Number Publication Date
CN108449117A CN108449117A (en) 2018-08-24
CN108449117B true CN108449117B (en) 2024-04-26

Family

ID=63202919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810442933.4A Active CN108449117B (en) 2018-05-10 2018-05-10 Internet of things system based on PLC and network access method

Country Status (1)

Country Link
CN (1) CN108449117B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669389B (en) * 2018-12-27 2024-07-19 山西双环重工集团有限公司 Wireless communication system and method for industrial equipment
CN110009895A (en) * 2019-04-22 2019-07-12 重庆房地产职业学院 Electrical control system based on power carrier communication
CN110418362B (en) * 2019-08-02 2023-05-09 深圳市无眼界科技有限公司 One-key self-configuration networking method and system thereof
CN110636147B (en) * 2019-09-12 2022-05-20 公牛集团股份有限公司 Network distribution method and device with double-control switch, switch and intelligent switch system
CN112039559A (en) * 2020-08-27 2020-12-04 深圳市力合微电子股份有限公司 Communication method of PLC-DALI intelligent lighting system based on power line carrier communication
CN113301182B (en) * 2021-05-26 2022-06-17 绵阳市维博电子有限责任公司 Networking communication system based on PLC bus
CN113518030B (en) * 2021-06-23 2021-11-19 北京智芯微电子科技有限公司 Dual-mode inter-mode cooperation method and electric power internet of things system
CN113825122B (en) * 2021-08-03 2024-02-27 中联重科股份有限公司 Device and communication method for engineering machinery, controller and engineering machinery
CN117914355A (en) * 2022-10-12 2024-04-19 华为技术有限公司 Equipment control method and device
CN116033039B (en) * 2023-02-14 2023-05-30 广东金朋科技有限公司 Equipment access method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012157060A1 (en) * 2011-05-16 2012-11-22 株式会社メガチップス Communication system, and communication device
CN105024890A (en) * 2015-05-29 2015-11-04 青岛海尔智能家电科技有限公司 Intelligent household electrical appliance network access method and device and intelligent household electrical appliance
CN105141342A (en) * 2015-02-15 2015-12-09 美的集团股份有限公司 Method and system used for adding power line carrier wave communication network to electric appliance equipment
CN106325084A (en) * 2015-06-25 2017-01-11 中兴通讯股份有限公司 Intelligent home central controller, terminal, system and control method
CN106899327A (en) * 2017-02-24 2017-06-27 华为技术有限公司 The method and apparatus of data transfer
CN206517411U (en) * 2016-12-30 2017-09-22 珠海慧信微电子有限公司 A kind of dual-mode communication system wireless based on power line carrier and micropower

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6089359B2 (en) * 2012-09-28 2017-03-08 パナソニックIpマネジメント株式会社 COMMUNICATION SYSTEM, COMMUNICATION DEVICE, RELAY DEVICE, AND PROGRAM

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012157060A1 (en) * 2011-05-16 2012-11-22 株式会社メガチップス Communication system, and communication device
CN105141342A (en) * 2015-02-15 2015-12-09 美的集团股份有限公司 Method and system used for adding power line carrier wave communication network to electric appliance equipment
CN105024890A (en) * 2015-05-29 2015-11-04 青岛海尔智能家电科技有限公司 Intelligent household electrical appliance network access method and device and intelligent household electrical appliance
CN106325084A (en) * 2015-06-25 2017-01-11 中兴通讯股份有限公司 Intelligent home central controller, terminal, system and control method
CN206517411U (en) * 2016-12-30 2017-09-22 珠海慧信微电子有限公司 A kind of dual-mode communication system wireless based on power line carrier and micropower
CN106899327A (en) * 2017-02-24 2017-06-27 华为技术有限公司 The method and apparatus of data transfer

Also Published As

Publication number Publication date
CN108449117A (en) 2018-08-24

Similar Documents

Publication Publication Date Title
CN108449117B (en) Internet of things system based on PLC and network access method
CN111052687B (en) Apparatus and method for controlling addition of network nodes to a multihop network
US7126291B2 (en) Radio frequency lighting control system programming device and method
CN109450704B (en) Plug-and-play intelligent distribution transformer terminal and distribution data communication system
CN101647028B (en) Method for establishing a wireless communication connection between an automation component and a mobile operating terminal
CN105573142A (en) Intelligent household control system
RU2011153965A (en) ENHANCED COMMISSIONING OF WIRELESS NETWORK SYSTEMS
CN105471686A (en) Terminal control method, terminal control apparatus and system
TW201409887A (en) Smart home network system and its smart gateway
CN106355873B (en) Internet of things intelligent traffic gateway and system thereof
WO2015096182A1 (en) Intelligent home control system and control method
CN104837217A (en) Network access method and device
US11419175B2 (en) Reconstructing a personal area network or system after a failure in the network or system
CN108012305A (en) Smart machine matches somebody with somebody network method, system and smart machine
CN110045705B (en) Intelligent home control method, device and system adopting heterogeneous wireless network
CN101887638A (en) Intelligent domestic remote control system
KR20100013090A (en) Smart illumination device
CN107798835A (en) A kind of household electric appliance control method and device, system
US9357497B2 (en) Controlling the power consumption of a receiving unit
CN110493338A (en) A kind of equipment mutual control method, system and computer readable storage medium
CN106292301B (en) Method, device and system architecture for realizing smart home
CN110719580B (en) Communication method, device, terminal, gateway and computer storage medium
CN208968830U (en) A kind of host computer and automotive diagnostic system
CN110149254B (en) Wireless switch control method, wireless switch and computer readable storage medium
KR101917616B1 (en) Iot system using lora network

Legal Events

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