CN112527720A - Data communication method applied to rack-mounted plant station terminal - Google Patents

Data communication method applied to rack-mounted plant station terminal Download PDF

Info

Publication number
CN112527720A
CN112527720A CN202011406236.7A CN202011406236A CN112527720A CN 112527720 A CN112527720 A CN 112527720A CN 202011406236 A CN202011406236 A CN 202011406236A CN 112527720 A CN112527720 A CN 112527720A
Authority
CN
China
Prior art keywords
queue
daughter board
data
frame
channel
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.)
Withdrawn
Application number
CN202011406236.7A
Other languages
Chinese (zh)
Inventor
范建华
单长军
徐加路
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Topscomm Communication Co Ltd
Original Assignee
Qingdao Topscomm Communication 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 Qingdao Topscomm Communication Co Ltd filed Critical Qingdao Topscomm Communication Co Ltd
Priority to CN202011406236.7A priority Critical patent/CN112527720A/en
Publication of CN112527720A publication Critical patent/CN112527720A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

The invention discloses a data communication method applied to a rack-mounted plant station terminal, which comprises the following steps: 1) the mainboard application opens the virtual equipment nodes of each channel of each daughter board; 2) writing data into a virtual node through system call by an application, packaging the data with a device address and a channel number into a bus frame by a driver, and inserting the bus frame into a data queue for queuing; 3) the kernel main process checks the queue, if the queue is empty, the queue waits, and if the queue is not empty, the step 4 is carried out; 4) writing the current head node of the queue into an RS485 serial port and broadcasting to each daughter board; 5) the daughter board matched with the broadcast frame identifies and receives the frame; 6) the daughter board sends the multiframe back to the mainboard; 7) after receiving the reply frame, the main board analyzes the data contained in the reply frame into FIFO, and then the step 3 is skipped. The invention creates virtual equipment nodes of each channel of each daughter board in a system layer, realizes bus protocol analysis and communication, enables applications to be concentrated in processing service data, and also saves system resources and performance.

Description

Data communication method applied to rack-mounted plant station terminal
Technical Field
The invention relates to the technical field of computer bus communication, in particular to a data communication method applied to a rack-mounted station terminal.
Background
The station terminal is a terminal device applied to a power plant and a transformer substation, can realize the collection and storage of electric energy meter information and the detection of the operation condition of the electric energy meter, and manages and forwards the collected information. The rack type station terminal is a plug-in board type station terminal which can be installed in a standard screen cabinet of a power plant and a transformer substation, and can flexibly configure various types of acquisition modules and communication modules according to requirements.
For communication of a rack-mounted station terminal, in the prior art, bus protocol analysis is usually realized at an application layer, so that resources are consumed by the application to distinguish physically connected sub-devices, and the application cannot be dedicated to service data processing; moreover, analyzing the bus protocol at the application layer requires that the bottom layer transmits all the data received on the bus to the application layer, which includes the bus protocol unrelated to the service data, and performing a large amount of data memory copy at the application layer inevitably wastes system resources and performance.
Disclosure of Invention
Aiming at the defects and shortcomings of the prior art, the invention provides a data communication method applied to a rack-mounted station terminal, virtual equipment nodes of each channel of each daughter board equipment are established on a system layer, the process of distinguishing physical connection is omitted for mainboard application, the virtual nodes can be directly read and written like reading and writing common serial ports, and the bus protocol analysis and communication are realized.
The purpose of the invention can be realized by the following technical scheme:
a data communication method applied to a rack-mounted plant station terminal comprises the following steps:
step 1: the mainboard application opens the virtual equipment node/dev/ttyVESxx _ x of each channel of each daughter board equipment;
wherein xx is the daughter board address and x is the channel number;
step 2: the mainboard application writes service data into the virtual equipment nodes through write system call, and the kernel layer driver encapsulates the data with equipment node addresses and channel numbers into bus frames and inserts the bus frames into a data queue BusFrameQueue to serve as nodes to queue;
and step 3: checking the queue by the kernel main process BusThread, waiting if the queue is empty, and entering the step 4 if the queue is not empty;
and 4, step 4: writing the current first node of the queue into an RS485 serial port and broadcasting the frame to each daughter board;
and 5: identifying and receiving the broadcast frame by the daughter board matched with the equipment node address and the channel number contained in the broadcast frame;
step 6: the daughter board sends back the multiframe to the mainboard;
and 7: and after the main board receives the reply frame, analyzing the data contained in the reply frame into the FIFO corresponding to the daughter board equipment, and skipping to the step 3.
Further, each virtual device node/dev/ttyvesxxx _ x in the step 1 is created and stored in the system layer.
The invention has the beneficial technical effects that: virtual device nodes of each channel of each daughter board device are created in a system layer, a process of distinguishing physical connection is omitted for mainboard application, the virtual nodes can be directly read and written like reading and writing a common serial port, and bus protocol analysis and communication are achieved, so that application design is simplified, application can be concentrated in processing of service data, memory copy is reduced, and system resources and performance are saved.
Drawings
FIG. 1 is a general flow diagram of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
Examples are given.
As shown in fig. 1, a data communication method applied to a rack-mounted station terminal includes the following steps:
step 1: the mainboard application opens the virtual equipment node/dev/ttyVESxx _ x of each channel of each daughter board equipment; wherein each virtual device node/dev/ttyVESxx _ x is created and stored in a system layer;
wherein xx is the daughter board address and x is the channel number;
step 2: the mainboard application writes service data into the virtual equipment nodes through write system call, and the kernel layer driver encapsulates the data with equipment node addresses and channel numbers into bus frames and inserts the bus frames into a data queue BusFrameQueue to serve as nodes to queue;
the bus protocol designed in the embodiment is as follows:
/*
*Busframeprotocol
*
lead (8bit)0xfe frame preamble
Head (8bit)0xaa frame header
Direction (1 bit)? reply is the data direction of request, 0 is the main board request, 1 is the sub board reply
Reserved (3bit) reservation for extension
Index (4bit) frame sequence number, retry unchanged frame number, retry unchanged
Channel (4bit) channlindex Channel number
Card (4bit) Card address, mainboard 0
Length (8bit) datalength data segment Length
Data (
Check SumL (8bit) CRC-16(Modbus) LowCRC check low byte
Check sum h (8bit) CRC-16(Modbus) HighCRC check byte
Tail (8bit)0x16 frame Tail
*/
And step 3: checking the queue by the kernel main process BusThread, waiting if the queue is empty, and entering the step 4 if the queue is not empty;
and 4, step 4: writing the current first node of the queue into an RS485 serial port and broadcasting the frame to each daughter board;
and 5: identifying and receiving the broadcast frame by the daughter board matched with the equipment node address and the channel number contained in the broadcast frame;
step 6: the daughter board sends back the multiframe to the mainboard;
and 7: and after the main board receives the reply frame, the data contained in the reply frame is analyzed in the FIFO corresponding to the daughter board equipment, and the step 3 is skipped.
The above-mentioned embodiments are illustrative of the specific embodiments of the present invention, and are not restrictive, and those skilled in the relevant art can make various changes and modifications to obtain corresponding equivalent technical solutions without departing from the spirit and scope of the present invention, so that all equivalent technical solutions should be included in the scope of the present invention.

Claims (2)

1. A data communication method applied to a rack-mounted plant station terminal is characterized by comprising the following steps:
step 1: the mainboard application opens the virtual equipment node/dev/ttyVESxx _ x of each channel of each daughter board equipment;
wherein xx is the daughter board address and x is the channel number;
step 2: the mainboard application writes service data into the virtual equipment nodes through write system call, and the kernel layer driver encapsulates the data with equipment node addresses and channel numbers into Bus frames and inserts the Bus Frame Queue of data Queue as nodes for queuing;
and step 3: checking the queue by the Bus Thread of the kernel main process, waiting if the queue is empty, and entering the step 4 if the queue is not empty;
and 4, step 4: writing the current first node of the queue into an RS485 serial port and broadcasting the frame to each daughter board;
and 5: identifying and receiving the broadcast frame by the daughter board matched with the equipment node address and the channel number contained in the broadcast frame;
step 6: the daughter board sends back the multiframe to the mainboard;
and 7: and after the main board receives the reply frame, analyzing the data contained in the reply frame into the FIFO corresponding to the daughter board equipment, and skipping to the step 3.
2. The data communication method applied to the rack-mounted plant station terminal as claimed in claim 1, wherein each virtual device node/dev/ttyVESxx _ x in the step 1 is created and stored in a system layer.
CN202011406236.7A 2020-12-05 2020-12-05 Data communication method applied to rack-mounted plant station terminal Withdrawn CN112527720A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011406236.7A CN112527720A (en) 2020-12-05 2020-12-05 Data communication method applied to rack-mounted plant station terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011406236.7A CN112527720A (en) 2020-12-05 2020-12-05 Data communication method applied to rack-mounted plant station terminal

Publications (1)

Publication Number Publication Date
CN112527720A true CN112527720A (en) 2021-03-19

Family

ID=74998410

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011406236.7A Withdrawn CN112527720A (en) 2020-12-05 2020-12-05 Data communication method applied to rack-mounted plant station terminal

Country Status (1)

Country Link
CN (1) CN112527720A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1777142A (en) * 2005-11-21 2006-05-24 西安电子科技大学 Method for realizing data communication utilizing virtual network adapting card in network environment simulating
CN101808132A (en) * 2010-03-23 2010-08-18 武汉若比特机器人有限公司 Communication method of application layer in CAN bus system
CN105491017A (en) * 2015-11-23 2016-04-13 泰华智慧产业集团股份有限公司 RS485 bus multi-device multi-protocol analysis method and RS485 bus multi-device multi-protocol analysis system
CN108235802A (en) * 2017-03-15 2018-06-29 深圳中兴力维技术有限公司 Communication control method and control device
CN111447103A (en) * 2020-03-09 2020-07-24 杭州海康威视系统技术有限公司 Virtual device management system, electronic device, virtual device management method, and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1777142A (en) * 2005-11-21 2006-05-24 西安电子科技大学 Method for realizing data communication utilizing virtual network adapting card in network environment simulating
CN101808132A (en) * 2010-03-23 2010-08-18 武汉若比特机器人有限公司 Communication method of application layer in CAN bus system
CN105491017A (en) * 2015-11-23 2016-04-13 泰华智慧产业集团股份有限公司 RS485 bus multi-device multi-protocol analysis method and RS485 bus multi-device multi-protocol analysis system
CN108235802A (en) * 2017-03-15 2018-06-29 深圳中兴力维技术有限公司 Communication control method and control device
CN111447103A (en) * 2020-03-09 2020-07-24 杭州海康威视系统技术有限公司 Virtual device management system, electronic device, virtual device management method, and medium

Similar Documents

Publication Publication Date Title
CN102118283B (en) Method and device for testing communication equipment
EP2071494A1 (en) Method for increasing speed of detection and activation of communication interface between terminal and uicc
CN112839231A (en) Video compression transmission method and system
CN111818060A (en) Communication protocol, method and system supporting hybrid and discrete data transmission
CN109359073A (en) A kind of communication between devices method and apparatus topological structure based on spi bus
CN110941582B (en) USB bus structure of BMC chip and communication method thereof
CN101001199A (en) Data processing method of high speed multidigit parallel data bus
CN112527720A (en) Data communication method applied to rack-mounted plant station terminal
CN113177015B (en) Frame header-based serial port communication method and serial port chip
CN110209605A (en) The register reading/writing method and calculating equipment of PCIE Cardbus NIC Cardbus
CN102629235A (en) Method for increasing read-write speed of double data rate (DDR) memory
CN107332725B (en) Method for rapidly analyzing PCAP message
CN114036085B (en) DDR 4-based multitasking read-write scheduling method, computer equipment and storage medium
CN113806277B (en) FPGA and DSP data transmission system based on SRIO protocol
CN112214429B (en) Data transmission device and method based on SRIO
CN210836089U (en) Digital embedded oscillograph mainboard
CN212084122U (en) NVMe controller
CN209313953U (en) A kind of spaceborne imaging device data transmission and acquisition system
CN112214451B (en) High-speed monitoring recording equipment and method based on system on chip
CN111459819A (en) Software testing method and device, electronic equipment and computer readable medium
CN105472390B (en) A kind of video encoding/decoding method and system
US20230388253A1 (en) Packet forwarding system and associated packet forwarding method
CN103605622B (en) A kind of method and apparatus transmitting data
CN114401238B (en) Switch management control method, system, computer equipment and data processing terminal
CN105528312A (en) System for ensuring integrity of received data between communication processor and host and method thereof

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20210319

WW01 Invention patent application withdrawn after publication