WO2023125108A1 - Controller, control system, and communication method for controller - Google Patents

Controller, control system, and communication method for controller Download PDF

Info

Publication number
WO2023125108A1
WO2023125108A1 PCT/CN2022/140008 CN2022140008W WO2023125108A1 WO 2023125108 A1 WO2023125108 A1 WO 2023125108A1 CN 2022140008 W CN2022140008 W CN 2022140008W WO 2023125108 A1 WO2023125108 A1 WO 2023125108A1
Authority
WO
WIPO (PCT)
Prior art keywords
controller
board
module
interface
data
Prior art date
Application number
PCT/CN2022/140008
Other languages
French (fr)
Chinese (zh)
Inventor
刘文喜
Original Assignee
广东美的白色家电技术创新中心有限公司
美的集团股份有限公司
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 广东美的白色家电技术创新中心有限公司, 美的集团股份有限公司 filed Critical 广东美的白色家电技术创新中心有限公司
Publication of WO2023125108A1 publication Critical patent/WO2023125108A1/en

Links

Classifications

    • 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/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors

Definitions

  • the present application relates to the technical field of electronic circuits, in particular to a controller, a control system and a communication method of the controller.
  • the controller In order to reduce development and maintenance costs, the controller usually standardizes the motherboard and reserves a bus expansion interface. According to different needs, choose corresponding expansion modules and install them on the bus expansion interface to realize the functions of communication interface and IO.
  • the existing control field contains a wide variety of communication protocols, and devices developed based on various protocols emerge in endlessly. When each device is connected to the controller, it is necessary to set up a data processing unit for protocol conversion and interface adaptation, resulting in various Such devices have a single interface and waste resources, and it is difficult to realize the wide compatibility and applicability of the controller.
  • the main purpose of this application is to propose a controller, a terminal control system and electrical equipment, aiming at improving the compatibility of the controller.
  • a controller which includes:
  • the main controller is arranged on the control board;
  • a connector arranged on the control board, for plugging in the module board;
  • the data processing unit is arranged on the control board, and is electrically connected to the module board connected to the connector through the connector; the data processing unit is used to, according to the module type of the connected module board, Configuring a data interface and a communication protocol corresponding to the module board to realize information exchange between the main controller and the module board.
  • the connector is provided with an IO interface pin and a data interface pin
  • the data interface of the data processing unit includes an IO interface and a data interface
  • the IO interface and the data interface are respectively connected to the IO interface.
  • the interface pins are electrically connected to the data interface pins
  • the data processing unit is specifically configured to configure the IO interface configuration and/or data interface as an internal bus interface according to the module type of the connected module board.
  • ID pins and address pins are arranged in the connector
  • the data processing unit is further configured to obtain the data connected from the ID pin and/or address, so as to determine the module type of the connected module board.
  • the data processing unit is FPGA.
  • the controller further includes a power supply, which is electrically connected to the main controller, the connector, and the data processing unit, so as to supply power to the main controller and the data processing unit , and supply power to the connected module board through the connector;
  • a memory is electrically connected to the main controller and the data processing unit.
  • the present application also proposes a control system, including at least one modular single board and the above-mentioned controller, and the modular single board is plugged into a connector of the controller.
  • an ID configuration circuit is integrated in the module board, and the ID configuration circuit can output a preset ID data.
  • the ID configuration circuit includes multiple resistor series circuits, and each resistor series circuit can output one bit of the ID data.
  • an address configuration circuit is integrated in the module single board, and the address configuration circuit can output a preset address data.
  • the address configuration circuit includes a dial switch, and the dial switch has multiple sets of switches, and each set of switches can output one bit of address data when it is turned on/off.
  • the present application also proposes a controller communication method, which is applied to the above-mentioned controller.
  • the controller includes a control board, a connector and a main controller arranged on the control board, and the module single board Pluggable and electrically connected to the control board, the communication method of the controller includes:
  • the controller of this application configures the data interface and communication protocol corresponding to the module board through the data processing unit according to the module type of the module board connected, so as to realize the information interaction between the main controller and the module board .
  • the slot of this application has higher compatibility. After any module board is plugged into the slot, the data processing unit on the control board will automatically identify the identity and address of the module board, call the corresponding software driver, and realize the corresponding function. With a motherboard of this architecture, the product will become very flexible in structural design.
  • This application has good compatibility and wide applicability, and can simultaneously access a variety of module boards with different protocols, which improves the compatibility of the controller. Higher compatibility will have higher versatility for the product. be more widely used.
  • Fig. 1 is a schematic structural diagram of an embodiment of the application of the controller to the control system
  • FIG. 2 is a schematic diagram of a circuit structure of an embodiment of the controller of the present application.
  • Fig. 3 is a schematic structural diagram of an embodiment of connector pin definition in the controller of the present application.
  • FIG. 4 is a schematic flowchart of an embodiment of a communication method of a controller of the present application.
  • label name label name 110 main controller 140 Power supply 120 Connector 150 memory 130 data processing unit 200 Module board
  • the directional indications are only used to explain the position in a certain posture (as shown in the attached figure). If the specific posture changes, the directional indication will also change accordingly.
  • This application proposes a controller.
  • the controller generally refers to the main control unit responsible for the monitoring or control of the entire system or a certain key module in various automation equipment and systems, such as the application in various industrial control sites, road and bridge toll collection, medical treatment, environmental protection, intelligent transportation, communication , monitoring, CNC machine tools, robots and other automation equipment industrial computer or customized special controller. Generally, it has attributes and characteristics such as motherboard, CPU, hard disk (flash memory), memory, IO, communication interface, operating system, computing power, and human-machine interface.
  • the external communication interface of the controller can generally be Gigabit/100M Ethernet, USB, RS232, RS485, CAN, etc.
  • IO interface classification can be divided into dry contact, wet node, source type, and sink type; it can also be further refined according to power level, voltage level, and isolation requirements.
  • the requirements for communication interfaces and IO are also different.
  • the controller In order to reduce development and maintenance costs, the controller usually standardizes the motherboard and reserves a bus expansion interface. According to different needs, choose corresponding expansion modules and install them on the bus expansion interface to realize the functions of communication interface and IO.
  • each module Since each module communicates with the CPU in the form of a board bus, each module must have a data processing and forwarding unit in addition to the physical layer driver Transceiver, which can be a dedicated chip, MCU, CPU, FPGA or DSP. There is a data processing and forwarding unit inside each module, which brings high hardware costs. Moreover, the compatibility between slots is poor, mainly due to the limited number of one type of internal bus, so each slot generally cannot use the same bus, so the functions of the slots will be relatively fixed, that is, they cannot be changed casually after the functions are defined.
  • the present application proposes a controller, referring to Fig. 1 to Fig. 3, in an embodiment of the present application, the controller includes:
  • the main controller 110 is arranged on the control board;
  • the connector 120 is arranged on the control board and is used for inserting the module single board 200;
  • the data processing unit 130 is arranged on the control board and is electrically connected to the module single board 200 connected to the connector 120 through the connector 120; the data processing unit 130 is used to
  • the module type of the board 200 is configured with a data interface and a communication protocol corresponding to the module board 200 to realize information exchange between the main controller 110 and the module board 200 .
  • control board is used as a carrier of electronic components in the controller, and may be formed with circuit wiring for installation of the connector 120 , the main controller 110 and the data processing unit 130 .
  • the main controller 110 can be a microprocessor such as a single-chip microcomputer, DSP, and the main controller 110, as the control center of the controller, utilizes various interfaces and lines to connect the various parts of the whole controller, and runs or executes the software stored in the memory 150.
  • the programs and/or modules, as well as calling data stored in the memory 150 execute various functions of the controller and process data, so as to monitor the controller as a whole.
  • the connector 120 may be realized by using a slot, and the module single board 200 may be inserted into the control board through the slot.
  • the connector 120 may also be implemented in other forms, such as pads or other devices for implementing the electrical connector 120 .
  • This embodiment takes the slot as an example.
  • the slot is provided with power pins, data (DATA) pins, IO interface pins, ID pins and address pins (Address), and the slot pins are defined on the control board. All are the same, this setting can improve the compatibility between the slots, and can solve the problem that due to the limited number of internal buses of one type, each slot generally cannot use the same bus, so the functions of the slots will be relatively fixed, that is, well-defined functions A problem that cannot be changed casually.
  • the type of external connection interface used by the data processing unit 130 to connect to the module single board 200 can be configured.
  • the data interface of the external access module single board 200 can be configured as an isolated RS422/485 interface, a configurable IO interface, an AD signal acquisition interface, One or more combinations of isolated RS232 interface, isolated CAN interface, DA signal interface and other interfaces.
  • the internal connection interface used by the data processing unit 130 to connect to the main controller 110 may be PCIe, of course, in other embodiments, SPI, IIC or input/output interface may also be used, which is not limited here.
  • the data processing unit 130 may use FPGA as a hardware platform, and various interface configuration data and various communication protocol data are stored in the FPGA.
  • the functions of the connected module board 200 are also different, and the interfaces and communication protocol types of the module board 200 are also different.
  • the interface used by the module board 200 may be an RTU bus (RS485 /RS232), I2C interface, SPI interface and so on. Since the connected module boards 200 are different, the interface can be automatically selected according to the actual application scenario. The identity and address of the module board 200 can be automatically identified by the data processing unit 130, and the interface type and communication of the connected module board 200 can be judged.
  • Protocol type configure the interface of the data processing unit 130 as the interface type that matches the module single board 200, and call the preset protocol, and build an interface bus based on FPGA to realize communication.
  • the data transmitted by the module single board 200 on the board is decoded, analyzed, processed, encoded, and protocol converted, and the processed data is output to the main controller 110 through the interface communicating with the main controller 110, so as to realize the communication between the main controller 110 and the module Protocol conversion and output transmission between boards 200 .
  • the control commands and communication data issued by the main controller 110 are decoded, analyzed, encoded, protocol converted, etc., and the processed data are transmitted to the module single board 200 through the connector 120, so that the main controller 110 Protocol conversion and output transmission with the module single board 200.
  • the module single board 200 does not need a data processing unit 130 such as a CPU or an FPGA, but only needs a physical layer transceiver or an IO driver.
  • a data processing unit 130 such as a CPU or an FPGA
  • a physical layer transceiver or an IO driver In the slot-type communication and IO expansion scheme, since the shared data processing unit 130 is used, it is avoided to set up a data processing unit 130 on each module board 200 , thereby reducing the cost.
  • the controller of this application configures the data interface and communication protocol corresponding to the module board 200 through the data processing unit 130 according to the module type of the module board 200 connected, so as to realize the connection between the main controller 110 and the module board 200. information exchange between them.
  • the slot of the present application has higher compatibility. After any module board 200 is plugged into the slot, the data processing unit 130 on the control board automatically recognizes the identity and address of the module board 200, calls the corresponding software driver, and realizes the corresponding function. , using this architecture of the motherboard, the product structure design will become very flexible.
  • This application has good compatibility and wide applicability, and can simultaneously access a variety of module single boards 200 of different protocols, which improves the compatibility of the controller, and higher compatibility will have higher versatility for the product , to be more widely used.
  • described connector 120 is provided with IO interface pin and data interface pin
  • the data interface of described data processing unit 130 comprises IO interface and DATA interface, namely data interface
  • the IO interface and the data interface are electrically connected to the IO interface pin and the data interface pin respectively
  • the data processing unit 130 is specifically used to convert the IO
  • the interface configuration and/or the data interface is configured as an internal bus interface.
  • the internal bus of each slot can be configured as a board-level communication bus such as PCIe, LPC, USB, SPI, IIC, and UART.
  • the data interface in the FPGA can be configured as UART, IIC, SPI, CAN, GPIO, PWM, and the IO interface can be configured as an IO interface; or, the data interface in the FPGA can be configured as UART, IIC, SPI, CAN, GPIO, PWM, and the IO interface is idle, or only the IO interface is used, and the data interface is idle.
  • the core and interface of the FPGA support physical layer interfaces of various buses, including communication and IO physical layers, and different internal bus interfaces are realized through driver chips of different communication protocol physical layers for communication level conversion, such as RS485 interface, RS232 interface, etc. , for the same bus interface, different types of internal bus interface communication protocols can also be implemented by changing the internal bus interface communication application layer.
  • the compatibility and wide applicability of the controller can be fully realized, and the compatibility with multiple bus protocols can be realized at the same time, and the data interaction and control functions between the module single board 200 and the main controller 110 can be realized.
  • select the bus interface in different controllers to connect the control system, and then call the driver interface of different protocols to operate the corresponding bus through the application program, so as to realize different internal bus interfaces built according to the needs.
  • the connector 120 is provided with an ID pin and an address pin;
  • the data processing unit 130 is further configured to acquire the data connected from the ID pin and/or address, so as to determine the module type of the connected module single board 200 .
  • the controller further includes a power supply 140, which is electrically connected to the main controller 110, the connector 120 and the data processing unit 130 respectively, so as to provide power to all The main controller 110 and the data processing unit 130 are powered, and the connected module board 200 is powered through the connector 120;
  • the memory 150 is electrically connected to the main controller 110 and the data processing unit 130 .
  • the memory 150 can be used to store the configuration data used by the data processing unit 130 for configuration, and to store various communication protocols.
  • the data processing unit 130 determines the interface type and communication protocol of the connected module board 200 type, the configuration data for configuration can be called from the memory 150, the interface of the data processing unit 130 is configured to match the interface type of the module board 200, and the preset protocol is called from the memory 150, so that based on the data processing unit 130 builds an interface bus to implement communication.
  • the power supply 140 can supply power to the circuit modules in the controller, and the power supply 140 can supply power to the connected module board 200 through the power pin of the electrical connector 120 .
  • the number of the connectors 120 is multiple, and the multiple connectors 120 are plugged into at least one type of modular single board 200 .
  • a controller may need to be connected to multiple modular single boards 200 at the same time, and the number of corresponding connectors 120 may be set to be multiple, and multiple connectors 120 may be connected to the same type of modular single board 200, or Different types of modular single boards 200 are connected, which can be specifically set according to actual applications.
  • the IO configuration of the FPGA has high flexibility.
  • the number of connectors 120 can be multiple, for example, 3.
  • the 3 data interfaces in the connector 120 are respectively Data1, Data2, and Data3.
  • the 3 data interfaces can be configured as arbitrary Internal bus interface, such as UART, IIC, SPI, CAN, GPIO, PWM output, etc.
  • the present application also proposes a control system, which includes at least one module board 200 and the above-mentioned controller, and the module board 200 is plugged into the connector 120 of the controller.
  • controller can refer to the above-mentioned embodiment, and will not be repeated here; it can be understood that, since the above-mentioned controller is used in the electrical equipment of the present application, the embodiment of the electrical equipment of the present application includes all of the above-mentioned controllers. All the technical solutions of the embodiments, and the achieved technical effects are also completely the same, and will not be repeated here.
  • the modular single board 200 is pluggably and electrically connected to the electrical connector 120 on the controller.
  • the module board 200 is integrated with an ID configuration circuit 210 , and the ID configuration circuit 210 can output a preset ID data.
  • the ID configuration circuit 210 includes multiple resistor series circuits, and each resistor series circuit can output one bit of the ID data.
  • the modular single board 200 is integrated with an address configuration circuit 220, and the address configuration circuit 220 can output a preset address data.
  • the address configuration circuit 220 includes a dial switch, and the dial switch has multiple sets of switches, and each set of switches can output one bit of address data when it is turned on/off.
  • ID is not separated from Address, that is, there is only ID or address.
  • Functions can be distinguished by address segment or ID number segment. Its essence is the same as the separation of ID and address.
  • each module single board 200 has its corresponding ID information and address information.
  • the data processing unit 130 is set on the control board of the controller, so that no CPU and FPGA are needed on the module single board 200.
  • the data processing unit 130 only needs a physical layer transceiver or an IO driver.
  • An ID configuration circuit 210 and an address configuration circuit 220 are added to the module single board 200, which are used to define the identity and address of the module respectively.
  • a set of signals can be configured with pull-up and pull-down resistors or dial switches, for example, 4 sets of pull-up and pull-down signals can be defined 16 different module IDs such as 0000 ⁇ 1111.
  • the 4-bit DIP switch can also define 16 different module addresses such as 0000 ⁇ 1111.
  • each ID configuration circuit 210 includes 4 sets of resistor series circuits, each set of resistor series circuits has two upper and lower resistor installation positions set in series, each set of resistor installation positions can choose to install resistors or not to install resistors, according to the resistance installation Whether the position is installed with a resistor can output signals of different levels. For example, if a resistor is installed at the upper resistance installation position and no resistance is installed at the lower resistance installation position, the series circuit of this group of resistances will output high-level ID data. When a resistor is installed at the lower resistor installation position and no resistor is installed at the upper resistor installation position, the series circuit of the group of resistors outputs low-level ID data.
  • each switch of the 4-bit DIP switch is connected with a pull-up resistor, and the other end is grounded.
  • a high-level address data is output, and when the DIP switch is closed, a low-level address signal is output.
  • the present application also proposes a controller communication method, which is applied to the above-mentioned controller.
  • the controller includes a control board, a connector and a main controller arranged on the control board, and the module single board Pluggable and electrically connected to the control board, referring to Figure 4, the communication method of the controller includes:
  • Step S100 when a module board is inserted into the connector, obtain the module type of the module board connected;
  • Step S200 configure the data interface and communication protocol corresponding to the module board according to the module type of the module board, so as to realize the information exchange between the main controller and the module board.
  • the function of the connected module board is also different, and the interface and communication protocol type of the module board are also different.
  • the interface used by the module board may be an RTU bus (RS485/RS232), I2C interface, SPI interface, etc. Since the connected module boards are different, the interface can be automatically selected according to the actual application scenario. The identity and address of the module board can be automatically identified through the actual application scene, and the interface type and communication protocol type of the connected module board can be judged.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Information Transfer Systems (AREA)
  • Selective Calling Equipment (AREA)

Abstract

Disclosed in the present application are a controller, a control system, and a communication method for a controller. The controller comprises: a control board; a main controller, which is arranged on the control board; a connector, which is arranged on the control board and is used for the plugging of a modular single board; and a data processing unit, which is arranged on the control board and is electrically connected, by means of the connector, to the modular single board that is connected to the connector, wherein the data processing unit is used for configuring, according to the module type of the connected modular single board, a data interface and a communication protocol that correspond to the modular single board, so as to realize information interaction between the main controller and the modular single board.

Description

控制器、控制系统及控制器的通讯方法Controller, control system and communication method of controller
本申请要求于2021年12月31日申请的、申请号为202111683166.4的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application with application number 202111683166.4 filed on December 31, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及电子电路技术领域,特别涉及一种控制器、控制系统及控制器的通讯方法。The present application relates to the technical field of electronic circuits, in particular to a controller, a control system and a communication method of the controller.
背景技术Background technique
针对不同的行业、产品及不同的应用场景,对通讯接口和IO的需求也不尽相同。控制器为了降低开发和维护成本、通常会将主板标准化,预留总线扩展接口。针对不同的需求来选配相应的扩展模块,安装到总线扩展接口上来实现通讯接口和IO的功能。现有的控制领域包含的通信协议种类繁多,而且基于各种协议开发设备的也层出不穷,每个设备与控制器连接时,均需要设置一个协议转换和接口适配的数据处理单元,造成了各类设备的接口单一、资源浪费,难以实现控制器的广泛的兼容性和适用性问题。For different industries, products and different application scenarios, the requirements for communication interfaces and IO are also different. In order to reduce development and maintenance costs, the controller usually standardizes the motherboard and reserves a bus expansion interface. According to different needs, choose corresponding expansion modules and install them on the bus expansion interface to realize the functions of communication interface and IO. The existing control field contains a wide variety of communication protocols, and devices developed based on various protocols emerge in endlessly. When each device is connected to the controller, it is necessary to set up a data processing unit for protocol conversion and interface adaptation, resulting in various Such devices have a single interface and waste resources, and it is difficult to realize the wide compatibility and applicability of the controller.
技术问题technical problem
本申请的主要目的是提出一种控制器、终端控制系统及电器设备,旨在解决提高控制器的兼容性。The main purpose of this application is to propose a controller, a terminal control system and electrical equipment, aiming at improving the compatibility of the controller.
技术解决方案technical solution
为实现上述目的,本申请提出一种控制器,所述控制器包括:In order to achieve the above purpose, the present application proposes a controller, which includes:
控制板;control panel;
主控制器,设置于所述控制板上;the main controller is arranged on the control board;
连接器,设置于所述控制板上,用于插接模块单板;a connector, arranged on the control board, for plugging in the module board;
数据处理单元,设置于控制板上,通过所述连接器与所述连接器接入的模块单板电连接;所述数据处理单元,用于根据接入的所述模块单板的模块类型,配置与所述模块单板对应的数据接口及通讯协议,以实现所述主控制器与模块单板之间的信息交互。The data processing unit is arranged on the control board, and is electrically connected to the module board connected to the connector through the connector; the data processing unit is used to, according to the module type of the connected module board, Configuring a data interface and a communication protocol corresponding to the module board to realize information exchange between the main controller and the module board.
在一实施例中,所述连接器内设置有IO接口引脚及数据接口引脚,所述数据处理单元的数据接口包括IO接口及数据接口,所述IO接口及数据接口分别与所述IO接口引脚及数据接口引脚电连接,所述数据处理单元具体用于根据接入的模块单板的模块类型,将所述IO接口配置和/或数据接口配置为内部总线接口。In one embodiment, the connector is provided with an IO interface pin and a data interface pin, and the data interface of the data processing unit includes an IO interface and a data interface, and the IO interface and the data interface are respectively connected to the IO interface. The interface pins are electrically connected to the data interface pins, and the data processing unit is specifically configured to configure the IO interface configuration and/or data interface as an internal bus interface according to the module type of the connected module board.
在一实施例中,所述连接器内设置有ID引脚及地址引脚;In one embodiment, ID pins and address pins are arranged in the connector;
所述数据处理单元,还用于获取自所述ID引脚和/或地址引接入的数据,以确定接入的模块单板的模块类型。The data processing unit is further configured to obtain the data connected from the ID pin and/or address, so as to determine the module type of the connected module board.
在一实施例中,所述数据处理单元为FPGA。In one embodiment, the data processing unit is FPGA.
在一实施例中,所述控制器还包括供电电源,分别与所述主控制器、所述连接器及所述数据处理单元电连接,以给所述主控制器及所述数据处理单元供电,并通过所述连接器与给接入的所述模块单板供电;In one embodiment, the controller further includes a power supply, which is electrically connected to the main controller, the connector, and the data processing unit, so as to supply power to the main controller and the data processing unit , and supply power to the connected module board through the connector;
存储器,与所述主控制器及所述数据处理单元电连接。A memory is electrically connected to the main controller and the data processing unit.
在一实施例中,所述连接器的数量为多个,多个所述连接器供至少一种模块单板插接。In one embodiment, there are multiple connectors, and the multiple connectors are plugged into at least one type of modular board.
本申请还提出一种控制系统,包括至少一个模块单板及如上所述的控制器,所述模块单板插接于所述控制器的连接器上。The present application also proposes a control system, including at least one modular single board and the above-mentioned controller, and the modular single board is plugged into a connector of the controller.
在一实施例中,所述模块单板内集成有ID配置电路,所述ID配置电路能够输出一预设的ID数据。In an embodiment, an ID configuration circuit is integrated in the module board, and the ID configuration circuit can output a preset ID data.
在一实施例中,所述ID配置电路包括多路电阻串联电路,每一路所述电阻串联电路能够输出一位所述ID数据。In one embodiment, the ID configuration circuit includes multiple resistor series circuits, and each resistor series circuit can output one bit of the ID data.
在一实施例中,所述模块单板内集成有地址配置电路,所述地址配置电路能够输出一预设的地址数据。In an embodiment, an address configuration circuit is integrated in the module single board, and the address configuration circuit can output a preset address data.
在一实施例中,所述地址配置电路包括拨码开关,所述拨码开关具有多组开关,每一组开关在闭合/断开时,能够输出一位地址数据。In an embodiment, the address configuration circuit includes a dial switch, and the dial switch has multiple sets of switches, and each set of switches can output one bit of address data when it is turned on/off.
本申请还提出一种控制器的通讯方法,应用于如上所述的控制器中,所述控制器包括控制板及设置于所述控制板上的连接器及主控制器,所述模块单板可插拔电连接于所述控制板,所述控制器的通讯方法包括:The present application also proposes a controller communication method, which is applied to the above-mentioned controller. The controller includes a control board, a connector and a main controller arranged on the control board, and the module single board Pluggable and electrically connected to the control board, the communication method of the controller includes:
在连接器内有模块单板插入时,获取接入的所述模块单板的模块类型;When a module board is inserted into the connector, obtain the module type of the module board that is connected;
根据所述模块单板的模块类型配置与所述模块单板对应的数据接口及通讯协议,以实现所述主控制器与模块单板之间的信息交互。Configure the data interface and communication protocol corresponding to the module board according to the module type of the module board, so as to realize the information exchange between the main controller and the module board.
有益效果Beneficial effect
本申请控制器通过数据处理单元根据接入的所述模块单板的模块类型,配置与所述模块单板对应的数据接口及通讯协议,以实现主控制器与模块单板之间的信息交互。本申请的插槽的兼容性更高,插槽插上任意模块单板后,控制板上的数据处理单元自动识别模块单板的身份及地址,调用相应的软件驱动,实现相应功能,使用此种架构的主板,产品在结构设计时也会变得非常灵活。本申请具有很好的兼容性和广泛的适用性,可以同时接入多种不同协议的模块单板,提高了控制器的兼容性,更高的兼容性对于产品来说通用性会更高,得到更广泛的应用。The controller of this application configures the data interface and communication protocol corresponding to the module board through the data processing unit according to the module type of the module board connected, so as to realize the information interaction between the main controller and the module board . The slot of this application has higher compatibility. After any module board is plugged into the slot, the data processing unit on the control board will automatically identify the identity and address of the module board, call the corresponding software driver, and realize the corresponding function. With a motherboard of this architecture, the product will become very flexible in structural design. This application has good compatibility and wide applicability, and can simultaneously access a variety of module boards with different protocols, which improves the compatibility of the controller. Higher compatibility will have higher versatility for the product. be more widely used.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图示出的结构获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to the structures shown in these drawings without creative effort.
图1为本申请控制器应用于控制系统一实施例的结构示意图;Fig. 1 is a schematic structural diagram of an embodiment of the application of the controller to the control system;
图2为本申请控制器一实施例的电路结构示意图;FIG. 2 is a schematic diagram of a circuit structure of an embodiment of the controller of the present application;
图3为本申请控制器中连接器引脚定义一实施例的结构示意图;Fig. 3 is a schematic structural diagram of an embodiment of connector pin definition in the controller of the present application;
图4为本申请控制器的通讯方法一实施例的流程示意图。FIG. 4 is a schematic flowchart of an embodiment of a communication method of a controller of the present application.
附图标号说明:Explanation of reference numbers:
标号 label 名称 name 标号 label 名称 name
110 110 主控制器 main controller 140 140 供电电源 Power supply
120 120 连接器 Connector 150 150 存储器 memory
130 130 数据处理单元 data processing unit 200 200 模块单板 Module board
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional features and advantages of the present application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
本发明的实施方式Embodiments of the present invention
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.
需要说明,若本申请实施例中有涉及方向性指示(诸如上、下、左、右、前、后……),则该方向性指示仅用于解释在某一特定姿态(如附图所示)下各部件之间的相对位置关系、运动情况等,如果该特定姿态发生改变时,则该方向性指示也相应地随之改变。It should be noted that if there are directional indications (such as up, down, left, right, front, back...) in the embodiment of the present application, the directional indications are only used to explain the position in a certain posture (as shown in the attached figure). If the specific posture changes, the directional indication will also change accordingly.
另外,若本申请实施例中有涉及“第一”、“第二”等的描述,则该“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only for descriptive purposes, and cannot be interpreted as indications or hints Its relative importance or implicitly indicates the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In addition, the technical solutions of the various embodiments can be combined with each other, but it must be based on the realization of those skilled in the art. When the combination of technical solutions is contradictory or cannot be realized, it should be considered that the combination of technical solutions does not exist , nor within the scope of protection required by the present application.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A 和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.
本申请提出一种控制器。This application proposes a controller.
控制器泛指各种自动化设备、系统中,负责整个系统或某个关键模块的监控或控制的主控单元,如应用的在各种工业控制现场、路桥收费、医疗、环保、智能交通、通讯、监控、数控机床、机器人等各种自动化设备中的工控机或定制的专用控制器。一般具有主板、CPU、硬盘(闪存)、内存、IO、通讯接口、操作系统、计算能力、人机界面等属性和特征。控制器的对外通讯接口一般可以为千兆/百兆以太网、USB、RS232、RS485、CAN等等,以上各种类型的接口还可以按通讯速率、防护等级、隔离要求不同进一步细化分类;IO接口分类,可分为干接点、湿节点、源型、漏型;还可按功率等级、电压等级、隔离要求不同进一步细化分类。针对不同的行业、产品及不同的应用场景,对通讯接口和IO的需求也不尽相同。控制器为了降低开发和维护成本、通常会将主板标准化,预留总线扩展接口。针对不同的需求来选配相应的扩展模块,安装到总线扩展接口上来实现通讯接口和IO的功能。由于各模块对CPU的通信是板极总线方式,所以各模块上除了物理层的驱动Transceiver外必然还有一个数据处理、转发单元,可以是专用芯片、MCU、CPU、FPGA或DSP。每个模块内部都有一个数据处理、转发单元会带来较高的硬件成本。并且,插槽间的兼容性差,主要由于一种类型的内部总线数量有限,所以各插槽一般不能使用相同的总线,所以插槽的功能会相对固定,即定义好功能后不能随便更改。The controller generally refers to the main control unit responsible for the monitoring or control of the entire system or a certain key module in various automation equipment and systems, such as the application in various industrial control sites, road and bridge toll collection, medical treatment, environmental protection, intelligent transportation, communication , monitoring, CNC machine tools, robots and other automation equipment industrial computer or customized special controller. Generally, it has attributes and characteristics such as motherboard, CPU, hard disk (flash memory), memory, IO, communication interface, operating system, computing power, and human-machine interface. The external communication interface of the controller can generally be Gigabit/100M Ethernet, USB, RS232, RS485, CAN, etc. The above-mentioned various types of interfaces can also be further classified according to different communication speeds, protection levels, and isolation requirements; IO interface classification can be divided into dry contact, wet node, source type, and sink type; it can also be further refined according to power level, voltage level, and isolation requirements. For different industries, products and different application scenarios, the requirements for communication interfaces and IO are also different. In order to reduce development and maintenance costs, the controller usually standardizes the motherboard and reserves a bus expansion interface. According to different needs, choose corresponding expansion modules and install them on the bus expansion interface to realize the functions of communication interface and IO. Since each module communicates with the CPU in the form of a board bus, each module must have a data processing and forwarding unit in addition to the physical layer driver Transceiver, which can be a dedicated chip, MCU, CPU, FPGA or DSP. There is a data processing and forwarding unit inside each module, which brings high hardware costs. Moreover, the compatibility between slots is poor, mainly due to the limited number of one type of internal bus, so each slot generally cannot use the same bus, so the functions of the slots will be relatively fixed, that is, they cannot be changed casually after the functions are defined.
为了解决上述问题,本申请提出一种控制器,参照图1至图3,在本申请一实施例中,该控制器包括:In order to solve the above problems, the present application proposes a controller, referring to Fig. 1 to Fig. 3, in an embodiment of the present application, the controller includes:
控制板;control panel;
主控制器110,设置于所述控制板上;The main controller 110 is arranged on the control board;
连接器120,设置于所述控制板上,用于插接模块单板200;The connector 120 is arranged on the control board and is used for inserting the module single board 200;
数据处理单元130,设置于控制板上,通过所述连接器120与所述连接器120接入的模块单板200电连接;所述数据处理单元130,用于根据接入的所述模块单板200的模块类型,配置与所述模块单板200对应的数据接口及通讯协议,以实现所述主控制器110与模块单板200之间的信息交互。The data processing unit 130 is arranged on the control board and is electrically connected to the module single board 200 connected to the connector 120 through the connector 120; the data processing unit 130 is used to The module type of the board 200 is configured with a data interface and a communication protocol corresponding to the module board 200 to realize information exchange between the main controller 110 and the module board 200 .
本实施例中,控制板作为控制器中电子元件的载体,可以形成有电路布线,供连接器120、主控制器110及数据处理单元130安装。主控制器110可以是单片机、DSP等微处理器,主控制器110作为控制器的控制中心,利用各种接口和线路连接整个控制器的各个部分,通过运行或执行存储在存储器150内的软件程序和/或模块,以及调用存储在存储器150内的数据,执行控制器的各种功能和处理数据,从而对控制器进行整体监控。In this embodiment, the control board is used as a carrier of electronic components in the controller, and may be formed with circuit wiring for installation of the connector 120 , the main controller 110 and the data processing unit 130 . The main controller 110 can be a microprocessor such as a single-chip microcomputer, DSP, and the main controller 110, as the control center of the controller, utilizes various interfaces and lines to connect the various parts of the whole controller, and runs or executes the software stored in the memory 150. The programs and/or modules, as well as calling data stored in the memory 150, execute various functions of the controller and process data, so as to monitor the controller as a whole.
连接器120可以采用插槽来实现,模块单板200可以通过插槽插接至控制板上。当然,连接器120还可以采用其他形式来实现,例如焊盘或者其他实现电连接器120的器件。本实施例以插槽为例,插槽内设置有电源引脚、数据(DATA)引脚、IO接口引脚、ID引脚及地址引脚(Address),在控制板上插槽pin脚定义全部相同,如此设置可以提高插槽间的兼容性,可以解决由于一种类型的内部总线数量有限,所以各插槽一般不能使用相同的总线,所以插槽的功能会相对固定,即定义好功能后不能随便更改的问题。The connector 120 may be realized by using a slot, and the module single board 200 may be inserted into the control board through the slot. Of course, the connector 120 may also be implemented in other forms, such as pads or other devices for implementing the electrical connector 120 . This embodiment takes the slot as an example. The slot is provided with power pins, data (DATA) pins, IO interface pins, ID pins and address pins (Address), and the slot pins are defined on the control board. All are the same, this setting can improve the compatibility between the slots, and can solve the problem that due to the limited number of internal buses of one type, each slot generally cannot use the same bus, so the functions of the slots will be relatively fixed, that is, well-defined functions A problem that cannot be changed casually.
数据处理单元130用于连接模块单板200的对外连接接口类型可以配置,具体可以将对外接入模块单板200的数据接口配置为隔离RS422/485接口、可配置IO接口、AD信号采集接口、隔离RS232接口、隔离CAN接口、DA信号接口等接口中的一种或者多种组合。数据处理单元130用于连接主控制器110的对内连接接口可以为PCIe,当然在其他实施例中,也可以采用SPI、IIC或者输入/输出接口,此处不作限制。The type of external connection interface used by the data processing unit 130 to connect to the module single board 200 can be configured. Specifically, the data interface of the external access module single board 200 can be configured as an isolated RS422/485 interface, a configurable IO interface, an AD signal acquisition interface, One or more combinations of isolated RS232 interface, isolated CAN interface, DA signal interface and other interfaces. The internal connection interface used by the data processing unit 130 to connect to the main controller 110 may be PCIe, of course, in other embodiments, SPI, IIC or input/output interface may also be used, which is not limited here.
数据处理单元130可以采用FPGA为硬件平台,FPGA中存储有多种接口配置数据和多种通讯协议数据。根据控制器的应用场景的不同,接入的模块单板200的功能也就不同,同时模块单板200的接口和通讯协议类型也不同,例如模块单板200采用的接口可能为RTU总线(RS485/RS232)、I2C接口,SPI接口等等。由于接入的模块单板200不同,接口可根据实际应用的场景进行自动选择,通过数据处理单元130自动识别模块单板200的身份及地址,判断接入的模块单板200的接口类型和通讯协议类型,将数据处理单元130的接口配置为与模块单板200匹配的接口类型,并调用预置的协议,基于FPGA构建接口总线实现通信,在正常工作时,数据处理单元130对连接器120上的模块单板200传输的数据进行解码、分析、处理、编码,协议转换,并将处理后的数据通过与主控制器110通讯的接口输出至主控制器110,实现主控制器110与模块单板200之间协议转换和输出传输。或者,将主控制器110发出的控制指令、通讯数据等等进行解码、分析、编码,协议转换等处理,并将处理后的数据通过连接器120传输至模块单板200,实现主控制器110与模块单板200之间协议转换和输出传输。如此设置,使得模块单板200上则不再需要CPU、FPGA等数据处理单元130,只需要物理层的收发器或IO驱动即可。在采用插槽式的通信及IO扩展方案中,由于使用了共用的数据处理单元130,避免了每个模块单板200上设置一个数据处理单元130,进而降低了成本。The data processing unit 130 may use FPGA as a hardware platform, and various interface configuration data and various communication protocol data are stored in the FPGA. According to the different application scenarios of the controller, the functions of the connected module board 200 are also different, and the interfaces and communication protocol types of the module board 200 are also different. For example, the interface used by the module board 200 may be an RTU bus (RS485 /RS232), I2C interface, SPI interface and so on. Since the connected module boards 200 are different, the interface can be automatically selected according to the actual application scenario. The identity and address of the module board 200 can be automatically identified by the data processing unit 130, and the interface type and communication of the connected module board 200 can be judged. Protocol type, configure the interface of the data processing unit 130 as the interface type that matches the module single board 200, and call the preset protocol, and build an interface bus based on FPGA to realize communication. The data transmitted by the module single board 200 on the board is decoded, analyzed, processed, encoded, and protocol converted, and the processed data is output to the main controller 110 through the interface communicating with the main controller 110, so as to realize the communication between the main controller 110 and the module Protocol conversion and output transmission between boards 200 . Alternatively, the control commands and communication data issued by the main controller 110 are decoded, analyzed, encoded, protocol converted, etc., and the processed data are transmitted to the module single board 200 through the connector 120, so that the main controller 110 Protocol conversion and output transmission with the module single board 200. With such an arrangement, the module single board 200 does not need a data processing unit 130 such as a CPU or an FPGA, but only needs a physical layer transceiver or an IO driver. In the slot-type communication and IO expansion scheme, since the shared data processing unit 130 is used, it is avoided to set up a data processing unit 130 on each module board 200 , thereby reducing the cost.
本申请控制器通过数据处理单元130根据接入的所述模块单板200的模块类型,配置与所述模块单板200对应的数据接口及通讯协议,以实现主控制器110与模块单板200之间的信息交互。本申请的插槽的兼容性更高,插槽插上任意模块单板200后,控制板上的数据处理单元130自动识别模块单板200的身份及地址,调用相应的软件驱动,实现相应功能,使用此种架构的主板,产品在结构设计时也会变得非常灵活。本申请具有很好的兼容性和广泛的适用性,可以同时接入多种不同协议的模块单板200,提高了控制器的兼容性,更高的兼容性对于产品来说通用性会更高,得到更广泛的应用。The controller of this application configures the data interface and communication protocol corresponding to the module board 200 through the data processing unit 130 according to the module type of the module board 200 connected, so as to realize the connection between the main controller 110 and the module board 200. information exchange between them. The slot of the present application has higher compatibility. After any module board 200 is plugged into the slot, the data processing unit 130 on the control board automatically recognizes the identity and address of the module board 200, calls the corresponding software driver, and realizes the corresponding function. , using this architecture of the motherboard, the product structure design will become very flexible. This application has good compatibility and wide applicability, and can simultaneously access a variety of module single boards 200 of different protocols, which improves the compatibility of the controller, and higher compatibility will have higher versatility for the product , to be more widely used.
参照图1至图3,在一实施例中,所述连接器120内设置有IO接口引脚及数据接口引脚,所述数据处理单元130的数据接口包括IO接口及DATA 接口,也即数据接口,所述IO接口及数据接口分别与所述IO接口引脚及数据接口引脚电连接,所述数据处理单元130具体用于根据接入的模块单板200的模块类型,将所述IO接口配置和/或数据接口配置为内部总线接口。Referring to Fig. 1 to Fig. 3, in one embodiment, described connector 120 is provided with IO interface pin and data interface pin, and the data interface of described data processing unit 130 comprises IO interface and DATA interface, namely data interface, the IO interface and the data interface are electrically connected to the IO interface pin and the data interface pin respectively, and the data processing unit 130 is specifically used to convert the IO The interface configuration and/or the data interface is configured as an internal bus interface.
本实施例中,根据接入的模块单板200不同,各插槽的内部总线可以配置为PCIe、LPC、USB、SPI、IIC、UART等板极通信总线。并且,根据实际应用的需求,可以将FPGA中的数据接口配置为UART、IIC、SPI、CAN、GPIO、PWM,而将IO接口配置为IO接口;或者,将FPGA中的数据接口配置为UART、IIC、SPI、CAN、GPIO、PWM,而IO接口进行闲置,或者仅使用IO接口,而数据接口闲置。在同时使用IO接口及数据接口时,两个接口上传输不同的数据,以满足模块单板200与主控制器110之间的数据传输需求。In this embodiment, according to the different module boards 200 connected, the internal bus of each slot can be configured as a board-level communication bus such as PCIe, LPC, USB, SPI, IIC, and UART. Moreover, according to the actual application requirements, the data interface in the FPGA can be configured as UART, IIC, SPI, CAN, GPIO, PWM, and the IO interface can be configured as an IO interface; or, the data interface in the FPGA can be configured as UART, IIC, SPI, CAN, GPIO, PWM, and the IO interface is idle, or only the IO interface is used, and the data interface is idle. When the IO interface and the data interface are used at the same time, different data are transmitted on the two interfaces, so as to meet the data transmission requirements between the module board 200 and the main controller 110 .
FPGA的内核及接口内部支持多种总线的物理层接口,包括通信和IO物理层,通过不同通信协议物理层的驱动芯片进行通信电平转换实现不同的内部总线接口,如RS485接口、RS232接口等,对于同一个总线接口,也可以通过改变内部总线接口通信应用层来实现不同种类内部总线接口通信的协议。通过接口配置的方法可以充分实现控制器的兼容性以及广泛的适用性,可以实现同时兼容多个总线协议,实现模块单板200与主控制器110的数据交互和控制功能,用户可以根据不同的控制需要,选择不同的控制器中总线接口进行控制系统的连线,然后通过应用程序调用不同协议的驱动接口对相应的总线进行操作,从而实现根据需要构建的不同的内部总线接口。The core and interface of the FPGA support physical layer interfaces of various buses, including communication and IO physical layers, and different internal bus interfaces are realized through driver chips of different communication protocol physical layers for communication level conversion, such as RS485 interface, RS232 interface, etc. , for the same bus interface, different types of internal bus interface communication protocols can also be implemented by changing the internal bus interface communication application layer. Through the method of interface configuration, the compatibility and wide applicability of the controller can be fully realized, and the compatibility with multiple bus protocols can be realized at the same time, and the data interaction and control functions between the module single board 200 and the main controller 110 can be realized. For control needs, select the bus interface in different controllers to connect the control system, and then call the driver interface of different protocols to operate the corresponding bus through the application program, so as to realize different internal bus interfaces built according to the needs.
参照图1至图3,在一实施例中,所述连接器120内设置有ID引脚及地址引脚;1 to 3, in one embodiment, the connector 120 is provided with an ID pin and an address pin;
所述数据处理单元130,还用于获取自所述ID引脚和/或地址引接入的数据,以确定接入的模块单板200的模块类型。The data processing unit 130 is further configured to acquire the data connected from the ID pin and/or address, so as to determine the module type of the connected module single board 200 .
本实施例中,每个模块单板200具有各自的ID和地址,接入的模块单板200的不同,其ID和地址也就不同,本实施例中数据处理单元130可以根据模块单板200的ID和地址,判断接入的模块单板200的接口类型和通讯协议类型,将数据处理单元130的接口配置为与模块单板200匹配的接口类型,并调用预置的协议,以基于FPGA构建接口总线实现通信。In this embodiment, each modular single board 200 has its own ID and address. The different modular single boards 200 connected have different IDs and addresses. In this embodiment, the data processing unit 130 can ID and address of the module board 200 to determine the interface type and communication protocol type of the connected module board 200, configure the interface of the data processing unit 130 as an interface type that matches the module board 200, and call the preset protocol to use FPGA-based Construct the interface bus to realize the communication.
参照图1至图3,在一实施例中,所述控制器还包括供电电源140,分别与所述主控制器110、所述连接器120及所述数据处理单元130电连接,以给所述主控制器110及所述数据处理单元130供电,并通过所述连接器120与给接入的所述模块单板200供电;1 to 3, in one embodiment, the controller further includes a power supply 140, which is electrically connected to the main controller 110, the connector 120 and the data processing unit 130 respectively, so as to provide power to all The main controller 110 and the data processing unit 130 are powered, and the connected module board 200 is powered through the connector 120;
存储器150,与所述主控制器110及所述数据处理单元130电连接。The memory 150 is electrically connected to the main controller 110 and the data processing unit 130 .
本实施例中,存储器150可以用于存储数据处理单元130用于配置的配置数据,以及用于存储多种通讯协议,数据处理单元130在判断接入的模块单板200的接口类型和通讯协议类型,可以从存储器150中调取配置用的配置数据,将数据处理单元130的接口配置为与模块单板200匹配的接口类型,并从存储器150中调用预置的协议,从而基于数据处理单元130构建接口总线实现通信。供电电源140可以给控制器中的电路模块进行供电,供电电源140通过电连接器120的电源引脚可以给接入的模块单板200进行供电。In this embodiment, the memory 150 can be used to store the configuration data used by the data processing unit 130 for configuration, and to store various communication protocols. The data processing unit 130 determines the interface type and communication protocol of the connected module board 200 type, the configuration data for configuration can be called from the memory 150, the interface of the data processing unit 130 is configured to match the interface type of the module board 200, and the preset protocol is called from the memory 150, so that based on the data processing unit 130 builds an interface bus to implement communication. The power supply 140 can supply power to the circuit modules in the controller, and the power supply 140 can supply power to the connected module board 200 through the power pin of the electrical connector 120 .
参照图1至图3,在一实施例中,所述连接器120的数量为多个,多个所述连接器120供至少一种模块单板200插接。Referring to FIG. 1 to FIG. 3 , in an embodiment, the number of the connectors 120 is multiple, and the multiple connectors 120 are plugged into at least one type of modular single board 200 .
本实施例中,一个控制器可能需要同时接入多个模块单板200,对应的连接器120的数量可以设置为多个,多个连接器120可以接入同一种模块单板200,也可以接入不同种模块单板200,具体可以根据实际应用进行设置。FPGA的IO配置具有较高的灵活性,连接器120的数量可以为多个,例如3个,连接器120中3个数据接口分别为Data1、Data2、Data3,3个数据接口可以配置为任意的内部总线接口,例如UART、IIC、SPI、CAN、GPIO、PWM输出等等。In this embodiment, a controller may need to be connected to multiple modular single boards 200 at the same time, and the number of corresponding connectors 120 may be set to be multiple, and multiple connectors 120 may be connected to the same type of modular single board 200, or Different types of modular single boards 200 are connected, which can be specifically set according to actual applications. The IO configuration of the FPGA has high flexibility. The number of connectors 120 can be multiple, for example, 3. The 3 data interfaces in the connector 120 are respectively Data1, Data2, and Data3. The 3 data interfaces can be configured as arbitrary Internal bus interface, such as UART, IIC, SPI, CAN, GPIO, PWM output, etc.
本申请还提出一种控制系统,包括至少一个模块单板200及如上所述的控制器,所述模块单板200插接于所述控制器的连接器120上。The present application also proposes a control system, which includes at least one module board 200 and the above-mentioned controller, and the module board 200 is plugged into the connector 120 of the controller.
该控制器的详细结构可参照上述实施例,此处不再赘述;可以理解的是,由于在本申请电器设备中使用了上述控制器,因此,本申请电器设备的实施例包括上述控制器全部实施例的全部技术方案,且所达到的技术效果也完全相同,在此不再赘述。The detailed structure of the controller can refer to the above-mentioned embodiment, and will not be repeated here; it can be understood that, since the above-mentioned controller is used in the electrical equipment of the present application, the embodiment of the electrical equipment of the present application includes all of the above-mentioned controllers. All the technical solutions of the embodiments, and the achieved technical effects are also completely the same, and will not be repeated here.
模块单板200与通过控制器上的电连接器120可插拔电连接。The modular single board 200 is pluggably and electrically connected to the electrical connector 120 on the controller.
参照图1至图3,在一实施例中,所述模块单板200内集成有ID配置电路210,所述ID配置电路210能够输出一预设的ID数据。Referring to FIG. 1 to FIG. 3 , in an embodiment, the module board 200 is integrated with an ID configuration circuit 210 , and the ID configuration circuit 210 can output a preset ID data.
其中,所述ID配置电路210包括多路电阻串联电路,每一路所述电阻串联电路能够输出一位所述ID数据。Wherein, the ID configuration circuit 210 includes multiple resistor series circuits, and each resistor series circuit can output one bit of the ID data.
和/或,所述模块单板200内集成有地址配置电路220,所述地址配置电路220能够输出一预设的地址数据。And/or, the modular single board 200 is integrated with an address configuration circuit 220, and the address configuration circuit 220 can output a preset address data.
其中,所述地址配置电路220包括拨码开关,所述拨码开关具有多组开关,每一组开关在闭合/断开时,能够输出一位地址数据。Wherein, the address configuration circuit 220 includes a dial switch, and the dial switch has multiple sets of switches, and each set of switches can output one bit of address data when it is turned on/off.
上述标准化插槽定义中,ID与Address不分开,即只有ID或地址。可以按地址段或ID号段来区分功能。其本质是与ID跟地址分开是一样的。In the above standardized slot definition, ID is not separated from Address, that is, there is only ID or address. Functions can be distinguished by address segment or ID number segment. Its essence is the same as the separation of ID and address.
本实施例中,每个模块单板200具有其对应的ID信息和地址信息,本实施例通过在控制器的控制板上设置数据处理单元130,使得模块单板200上不再需要CPU、FPGA等数据处理单元130,只需要物理层的收发器或IO驱动即可。模块单板200上增加一个ID配置电路210及地址配置电路220,分别用来定义模块的身份和地址,可以用上下拉电阻或拨码开关来配置一组信号,例如4组上下拉信号可以定义0000~1111等16个不同的模块的ID。同理,4位拨码开关也可以定义0000~1111等16个不同的模块的地址。具体地,每个ID配置电路210包括4组电阻串联电路,每组电阻串联电路具有两个串联设置的上下电阻安装位,每组电阻安装位上可以选择安装电阻或者不安装电阻,根据电阻安装位是否安装电阻,可以输出不同电平的信号,例如在上电阻安装位安装有电阻,下电阻安装位未安装电阻时,则该组电阻串联电路输出高电平的ID数据。在下电阻安装位安装有电阻,上电阻安装位未安装电阻时,则该组电阻串联电路输出低电平的ID数据。4位拨码开关的每一位开关的一端连接有上拉电阻,一端接地,在拨码开关断开时输出高电平的地址数据,再闭合时输出低电平的地址信号。In this embodiment, each module single board 200 has its corresponding ID information and address information. In this embodiment, the data processing unit 130 is set on the control board of the controller, so that no CPU and FPGA are needed on the module single board 200. The data processing unit 130 only needs a physical layer transceiver or an IO driver. An ID configuration circuit 210 and an address configuration circuit 220 are added to the module single board 200, which are used to define the identity and address of the module respectively. A set of signals can be configured with pull-up and pull-down resistors or dial switches, for example, 4 sets of pull-up and pull-down signals can be defined 16 different module IDs such as 0000~1111. Similarly, the 4-bit DIP switch can also define 16 different module addresses such as 0000~1111. Specifically, each ID configuration circuit 210 includes 4 sets of resistor series circuits, each set of resistor series circuits has two upper and lower resistor installation positions set in series, each set of resistor installation positions can choose to install resistors or not to install resistors, according to the resistance installation Whether the position is installed with a resistor can output signals of different levels. For example, if a resistor is installed at the upper resistance installation position and no resistance is installed at the lower resistance installation position, the series circuit of this group of resistances will output high-level ID data. When a resistor is installed at the lower resistor installation position and no resistor is installed at the upper resistor installation position, the series circuit of the group of resistors outputs low-level ID data. One end of each switch of the 4-bit DIP switch is connected with a pull-up resistor, and the other end is grounded. When the DIP switch is disconnected, a high-level address data is output, and when the DIP switch is closed, a low-level address signal is output.
本申请还提出一种控制器的通讯方法,应用于如上所述的控制器中,所述控制器包括控制板及设置于所述控制板上的连接器及主控制器,所述模块单板可插拔电连接于所述控制板,参照图4,所述控制器的通讯方法包括:The present application also proposes a controller communication method, which is applied to the above-mentioned controller. The controller includes a control board, a connector and a main controller arranged on the control board, and the module single board Pluggable and electrically connected to the control board, referring to Figure 4, the communication method of the controller includes:
步骤S100、在连接器内有模块单板插入时,获取接入的所述模块单板的模块类型;Step S100, when a module board is inserted into the connector, obtain the module type of the module board connected;
步骤S200、根据所述模块单板的模块类型配置与所述模块单板对应的数据接口及通讯协议,以实现所述主控制器与模块单板之间的信息交互。Step S200, configure the data interface and communication protocol corresponding to the module board according to the module type of the module board, so as to realize the information exchange between the main controller and the module board.
本实施例中,根据控制器的应用场景的不同,接入的模块单板的功能也就不同,同时模块单板的接口和通讯协议类型也不同,例如模块单板采用的接口可能为RTU总线(RS485/RS232)、I2C接口,SPI接口等等。由于接入的模块单板不同,接口可根据实际应用的场景进行自动选择,通过实际应用的场景自动识别模块单板的身份及地址,判断接入的模块单板的接口类型和通讯协议类型,将实际应用的场景的接口配置为与模块单板匹配的接口类型,并调用预置的协议,基于FPGA构建接口总线实现通信,在控制器给模块单板200上电,正常工作时,实际应用的场景对连接器上的模块单板传输的数据进行解码、分析、处理、编码,协议转换,并将处理后的数据通过与主控制器通讯的接口输出至主控制器,实现主控制器与模块单板之间协议转换和输出传输。或者,将主控制器发出的控制指令、通讯数据等等进行解码、分析、编码,协议转换等处理,并将处理后的数据通过连接器传输至模块单板,实现主控制器与模块单板之间协议转换和输出传输。如此设置,使得模块单板上则不再需要CPU、FPGA等实际应用的场景,只需要物理层的收发器或IO驱动即可。在采用插槽式的通信及IO扩展方案中,由于使用了共用的实际应用的场景,避免了每个模块单板上设置一个实际应用的场景,进而降低了成本。各插槽的兼容性更高,任意插槽插上任意模块单板后,控制板上的实际应用的场景FPGA自动识别模块单板的身份及地址,调用相应的软件驱动,实现相应功能,使用此种架构的主板,产品在结构设计时也会变得非常灵活。本申请具有很好的兼容性和广泛的适用性,可以同时接入多种不同协议的模块单板,提高了控制系统的兼容性,更高的兼容性对于产品来说通用性会更高,得到更广泛的应用。In this embodiment, according to the different application scenarios of the controller, the function of the connected module board is also different, and the interface and communication protocol type of the module board are also different. For example, the interface used by the module board may be an RTU bus (RS485/RS232), I2C interface, SPI interface, etc. Since the connected module boards are different, the interface can be automatically selected according to the actual application scenario. The identity and address of the module board can be automatically identified through the actual application scene, and the interface type and communication protocol type of the connected module board can be judged. Configure the interface of the actual application scene as the interface type that matches the module board, and call the preset protocol, build an interface bus based on the FPGA to realize communication, and when the controller powers on the module board 200 and works normally, the actual application The data transmitted by the module board on the connector is decoded, analyzed, processed, encoded, and the protocol is converted, and the processed data is output to the main controller through the communication interface with the main controller, so as to realize the communication between the main controller and the main controller. Protocol conversion and output transmission between module boards. Or, decode, analyze, encode, protocol convert and process the control commands and communication data sent by the main controller, and transmit the processed data to the module board through the connector, so as to realize the connection between the main controller and the module board. Between protocol conversion and output transmission. With such a setting, the actual application scenarios such as CPU and FPGA are no longer needed on the module board, and only the transceiver or IO driver of the physical layer is required. In the slot-type communication and IO expansion solution, since a shared practical application scenario is used, it is avoided to set up a practical application scenario on each module board, thereby reducing costs. The compatibility of each slot is higher. After any module board is plugged into any slot, the actual application scene FPGA on the control board will automatically recognize the identity and address of the module board, call the corresponding software driver, and realize the corresponding function. With this kind of architecture motherboard, the structure design of the product will also become very flexible. This application has good compatibility and wide applicability, and can be connected to a variety of module boards with different protocols at the same time, which improves the compatibility of the control system. Higher compatibility will have higher versatility for the product. be more widely used.
以上所述仅为本申请的可选实施例,并非因此限制本申请的专利范围,凡是在本申请的发明构思下,利用本申请说明书及附图内容所作的等效结构变换,或直接/间接运用在其他相关的技术领域均包括在本申请的专利保护范围内。The above are only optional embodiments of the present application, and are not intended to limit the patent scope of the present application. Under the inventive concept of the present application, the equivalent structural transformations made by using the description of the application and the contents of the accompanying drawings, or direct/indirect Applications in other relevant technical fields are included in the patent protection scope of the present application.

Claims (12)

  1. 一种控制器,其中,所述控制器包括:A controller, wherein the controller includes:
    控制板;control panel;
    主控制器,设置于所述控制板上;the main controller is arranged on the control board;
    连接器,设置于所述控制板上,用于插接模块单板;a connector, arranged on the control board, for plugging in the module board;
    数据处理单元,设置于控制板上,通过所述连接器与所述连接器接入的模块单板电连接;所述数据处理单元,用于根据接入的所述模块单板的模块类型,配置与所述模块单板对应的数据接口及通讯协议,以实现所述主控制器与模块单板之间的信息交互。The data processing unit is arranged on the control board, and is electrically connected to the module board connected to the connector through the connector; the data processing unit is used to, according to the module type of the connected module board, Configuring a data interface and a communication protocol corresponding to the module board to realize information exchange between the main controller and the module board.
  2. 如权利要求1所述的控制器,其中,所述连接器内设置有IO接口引脚及数据接口引脚,所述数据处理单元的数据接口包括IO接口及数据接口,所述IO接口及数据接口分别与所述IO接口引脚及数据接口引脚电连接,所述数据处理单元具体用于根据接入的模块单板的模块类型,将所述IO接口和/或数据接口配置为内部总线接口。The controller according to claim 1, wherein the connector is provided with IO interface pins and data interface pins, the data interface of the data processing unit includes an IO interface and a data interface, and the IO interface and data interface The interfaces are respectively electrically connected to the IO interface pins and the data interface pins, and the data processing unit is specifically configured to configure the IO interface and/or the data interface as an internal bus according to the module type of the connected module board interface.
  3. 如权利要求1所述的控制器,其中,所述连接器内设置有ID引脚及地址引脚;The controller according to claim 1, wherein an ID pin and an address pin are arranged in the connector;
    所述数据处理单元,还用于获取自所述ID引脚和/或地址引接入的数据,以确定接入的模块单板的模块类型。The data processing unit is further configured to obtain the data connected from the ID pin and/or address, so as to determine the module type of the connected module board.
  4. 如权利要求1所述的控制器,其中,所述数据处理单元为FPGA。The controller according to claim 1, wherein the data processing unit is an FPGA.
  5. 如权利要求1至4任意一项所述的控制器,其中,所述控制器还包括供电电源,分别与所述主控制器、所述连接器及所述数据处理单元电连接,以给所述主控制器及所述数据处理单元供电,并通过所述连接器与给接入的所述模块单板供电;The controller according to any one of claims 1 to 4, wherein the controller further includes a power supply, which is electrically connected to the main controller, the connector and the data processing unit respectively, so as to provide power to the The main controller and the data processing unit are powered, and the connected module board is powered through the connector;
    存储器,与所述主控制器及所述数据处理单元电连接。A memory is electrically connected to the main controller and the data processing unit.
  6. 如权利要求1至4任意一项所述的控制器,其中,所述连接器的数量为多个,多个所述连接器供至少一种模块单板插接。The controller according to any one of claims 1 to 4, wherein the number of said connectors is multiple, and said multiple connectors are plugged into at least one type of module board.
  7. 一种控制系统,其中,包括至少一个模块单板及如权利要求1至6任意一项所述的控制器,所述模块单板插接于所述控制器的连接器上。A control system, comprising at least one modular single board and the controller according to any one of claims 1 to 6, the modular single board is plugged into a connector of the controller.
  8. 如权利要求7所述的控制系统,其中,所述模块单板内集成有ID配置电路,所述ID配置电路能够输出一预设的ID数据。The control system according to claim 7, wherein an ID configuration circuit is integrated in the module single board, and the ID configuration circuit can output a preset ID data.
  9. 如权利要求6所述的控制系统,其中,所述ID配置电路包括多路电阻串联电路,每一路所述电阻串联电路能够输出一位所述ID数据。The control system according to claim 6, wherein the ID configuration circuit comprises multiple resistance series circuits, and each resistance series circuit can output one bit of the ID data.
  10. 如权利要求7所述的控制系统,其中,所述模块单板内集成有地址配置电路,所述地址配置电路能够输出一预设的地址数据。The control system according to claim 7, wherein an address configuration circuit is integrated in the module single board, and the address configuration circuit can output a preset address data.
  11. 如权利要求10所述的控制系统,其中,所述地址配置电路包括拨码开关,所述拨码开关具有多组开关,每一组开关在闭合/断开时,能够输出一位地址数据。The control system according to claim 10, wherein the address configuration circuit comprises a dial switch, and the dial switch has multiple groups of switches, and each group of switches can output one bit of address data when it is closed/disconnected.
  12. 一种控制器的通讯方法,应用于如权利要求1至6任意一项所述的控制器中,所述控制器包括控制板及设置于所述控制板上的连接器及主控制器,所述模块单板可插拔电连接于所述控制板,其中,所述控制器的通讯方法包括:A controller communication method, applied to the controller according to any one of claims 1 to 6, the controller includes a control board, a connector and a main controller arranged on the control board, the The module single board is pluggably electrically connected to the control board, wherein the communication method of the controller includes:
    在连接器内有模块单板插入时,获取接入的所述模块单板的模块类型;以及,When a module board is inserted into the connector, obtain the module type of the module board; and,
    根据所述模块单板的模块类型配置与所述模块单板对应的数据接口及通讯协议,以实现所述主控制器与模块单板之间的信息交互。Configure the data interface and communication protocol corresponding to the module board according to the module type of the module board, so as to realize the information exchange between the main controller and the module board.
PCT/CN2022/140008 2021-12-31 2022-12-19 Controller, control system, and communication method for controller WO2023125108A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111683166.4 2021-12-31
CN202111683166.4A CN114355815A (en) 2021-12-31 2021-12-31 Controller, control system and communication method of controller

Publications (1)

Publication Number Publication Date
WO2023125108A1 true WO2023125108A1 (en) 2023-07-06

Family

ID=81105353

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/140008 WO2023125108A1 (en) 2021-12-31 2022-12-19 Controller, control system, and communication method for controller

Country Status (2)

Country Link
CN (1) CN114355815A (en)
WO (1) WO2023125108A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114355815A (en) * 2021-12-31 2022-04-15 广东美的白色家电技术创新中心有限公司 Controller, control system and communication method of controller

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005259040A (en) * 2004-03-15 2005-09-22 Seiko Epson Corp Bus controller, microcomputer, and electronic equipment
CN201550139U (en) * 2009-09-23 2010-08-11 大连捷成实业发展有限公司 Communication control device among various protocol equipments
CN104765321A (en) * 2015-01-22 2015-07-08 镇江同舟螺旋桨有限公司 Motion controller being compatible with various field bus protocols
CN105468098A (en) * 2015-12-11 2016-04-06 航天恒星科技有限公司 Mainboard of industrial personal computer
CN106201946A (en) * 2016-06-29 2016-12-07 北京航天自动控制研究所 A kind of satellite borne electronic system data interface based on FPGA and DSP
CN207817688U (en) * 2017-12-12 2018-09-04 河南思维轨道交通技术研究院有限公司 A kind of serial communication bus interface circuit of compatible different agreement
CN114355815A (en) * 2021-12-31 2022-04-15 广东美的白色家电技术创新中心有限公司 Controller, control system and communication method of controller

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005259040A (en) * 2004-03-15 2005-09-22 Seiko Epson Corp Bus controller, microcomputer, and electronic equipment
CN201550139U (en) * 2009-09-23 2010-08-11 大连捷成实业发展有限公司 Communication control device among various protocol equipments
CN104765321A (en) * 2015-01-22 2015-07-08 镇江同舟螺旋桨有限公司 Motion controller being compatible with various field bus protocols
CN105468098A (en) * 2015-12-11 2016-04-06 航天恒星科技有限公司 Mainboard of industrial personal computer
CN106201946A (en) * 2016-06-29 2016-12-07 北京航天自动控制研究所 A kind of satellite borne electronic system data interface based on FPGA and DSP
CN207817688U (en) * 2017-12-12 2018-09-04 河南思维轨道交通技术研究院有限公司 A kind of serial communication bus interface circuit of compatible different agreement
CN114355815A (en) * 2021-12-31 2022-04-15 广东美的白色家电技术创新中心有限公司 Controller, control system and communication method of controller

Also Published As

Publication number Publication date
CN114355815A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
CN100468378C (en) SPI apparatus telecommunication circuit
US7117272B2 (en) Interchangeable power over Ethernet module
US20060194460A1 (en) Universal backplane connection or computer storage chassis
CN204633058U (en) USB Type-C connector modules
CN101436170A (en) SPI equipment communication circuit
WO2023125108A1 (en) Controller, control system, and communication method for controller
CN212135417U (en) Device and single board for configuring slave equipment address
CN208188815U (en) BMC module system
CN114564428A (en) Airborne electronic equipment I/O port expansion system
CN102637453A (en) Phase change memory including serial input/output interface
CN110362525A (en) A kind of method, system and board for realizing Multi-serial port switching based on CPLD
CN110262346A (en) A kind of industrial robot controller hardware platform with bus compatible
CN102445981B (en) Data transmission system and data transmission method
JP2003099105A (en) Method and system for configuring input/output point
CN111522774A (en) Autonomous controllable universal controller
CN105180383B (en) A kind of communication modes control method, system and debugging air conditioner device
CN209895159U (en) Industrial robot controller hardware platform with bus compatibility
CN205608716U (en) Multiunit optical module communication interface switching circuit
CN206178791U (en) PCIE bus bridge interface based on FPGA
CN204633059U (en) USB Type-C connector modules
CN100490605C (en) Pcb
CN204480237U (en) A kind of connector, universal serial bus device and intelligent terminal
CN219916340U (en) COM-E core board based on Feiteng platform
CN219496943U (en) Multi-protocol and extensible integrated remote IO module
CN106299893B (en) USB Type-C connector modules

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22914362

Country of ref document: EP

Kind code of ref document: A1