CN109471737A - The software adaptation method and apparatus of high-speed magnetic floating operation control system HWIL simulation - Google Patents

The software adaptation method and apparatus of high-speed magnetic floating operation control system HWIL simulation Download PDF

Info

Publication number
CN109471737A
CN109471737A CN201811183150.5A CN201811183150A CN109471737A CN 109471737 A CN109471737 A CN 109471737A CN 201811183150 A CN201811183150 A CN 201811183150A CN 109471737 A CN109471737 A CN 109471737A
Authority
CN
China
Prior art keywords
data
digital quantity
serial ports
logical layer
socket
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811183150.5A
Other languages
Chinese (zh)
Other versions
CN109471737B (en
Inventor
陈义军
赵华华
虞翊
袁建军
林辉
张仿琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tongji University
CRRC Qingdao Sifang Co Ltd
Original Assignee
Tongji University
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 Tongji University filed Critical Tongji University
Priority to CN201811183150.5A priority Critical patent/CN109471737B/en
Publication of CN109471737A publication Critical patent/CN109471737A/en
Application granted granted Critical
Publication of CN109471737B publication Critical patent/CN109471737B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Abstract

The present invention relates to a kind of software adaptation method and apparatus of high-speed magnetic floating operation control system HWIL simulation, logically it is decomposed into two parts, that is Serial Communication Software interface adaptation and digital quantity software interface adaptation, Serial Communication Software interface is adapted to artificial service logical layer and provides three interfaces, i.e. serial ports channel initialization interface, data message receiving interface and data message transmission interface;Digital quantity software interface is adapted to artificial service logical layer and provides three interfaces, i.e. digital quantity channel initialization interface, digital quantity receiving interface and digital quantity transmission interface.Compared with prior art, the physical interface adaptation of HWIL simulation is converted to software logic interface adaptation by the present invention, and the functional component of analogue system is no longer limited by the extended capability of industrial personal computer physical interface, and deployment is got up more flexible.

Description

The software adaptation method and apparatus of high-speed magnetic floating operation control system HWIL simulation
Technical field
The present invention relates to rail traffic HWIL simulation fields, more particularly, to a kind of high-speed magnetic floating operation control system half The software adaptation method and apparatus of matter emulation.
Background technique
For quickly running ground rail vehicle transportation tool as high-speed maglev train, safely and efficiently run from The control and protection of not open shop control system.System of the operation control system as safety_critical, must be into before online Row adequately test and test.However, actual environment can not provide test condition, therefore often use HWIL simulation The entity device of verifying to be tested is linked into emulation circuit by (Hardware in the Loop Simulation) mode In, to realize a kind of check system of economic and reliable.
To realize HWIL simulation, for operation control system entity device, the physical interface of external emulator It must be consistent with entity device.External emulator generallys use industrial personal computer and is developed.Traditional method for interface adaptation To be adapted to based on hardware interface, i.e., according to the requirement of connect entity device, the corresponding hardware interface of external emulator configuration into Row adaptation.The interface capability for being limited to industrial personal computer is limited, and often an industrial personal computer can only emulate a certain functional component.High speed magnetic transportation by driving The system that row control system is a highly integrated, all with pull-in control system, tractive power supply system, railway points system and Vehicular system Have there are interface, therefore there are many external analogue system that high-speed magnetic floating operation control system needs to dock.
Summary of the invention
It is an object of the present invention to overcome the above-mentioned drawbacks of the prior art and provide a kind of high-speed magnetic floatings to run The software adaptation method and apparatus of control system HWIL simulation.
The purpose of the present invention can be achieved through the following technical solutions:
A kind of serial ports software adaptation method of high-speed magnetic floating operation control system HWIL simulation, comprising:
The initialization of serial ports channel is carried out based on serial ports configuration file, to obtain the socket in serial communication channel;
It is recycled based on socket and receives data, the data message for extracting data message and being provided by artificial service logical layer It receives call back function and data message and serial ports channel number is sent to artificial service logical layer;
The data message that artificial service logical layer issues is packaged to obtain data block, and is based on artificial service logical layer Socket corresponding to the serial ports channel number of offer externally sends packaged data block.
Configuration information in the serial ports configuration file comprising serial ports port number information and each serial ports channel.
It is described that data are received based on socket circulation, the data extracting data message and being provided by artificial service logical layer Message receives call back function and data message and serial ports channel number is sent to artificial service logical layer, comprising:
Data are received based on socket and are stored in data receiver buffer area;
According to interface protocol, scanning recognition frame head and postamble, are extracted since the queue head of data receiver buffer area To data block;
CRC check is carried out, if verification passes through, handles data block progress escape to obtain data message;
Call back function is received by data message and serial ports channel number by the data message that artificial service logical layer provides It is sent to artificial service logical layer.
It is described according to interface protocol, scanning recognition frame head and postamble, mention since the queue head of data receiver buffer area During obtaining data block,
If not recognizing frame head, journal file is recorded.
It is described that the initialization of serial ports channel is carried out based on serial ports configuration file, to obtain the socket in serial communication channel, tool Body are as follows: the initialization of serial ports channel is carried out based on serial ports configuration file, to obtain the socket in serial communication channel and be stored in serial ports Channel information shared region;
The data message issued to artificial service logical layer is packaged to obtain data block, and is patrolled based on artificial service It collects socket corresponding to the serial ports channel number that layer provides externally to send packaged data block, specifically include:
The data that artificial service logical layer is issued according to the interface protocol of high-speed magnetic floating operation control system entity device Message is packaged to obtain data block,
According to the serial ports channel number that artificial service logical layer provides, obtained from serial ports channel information shared region logical with serial ports The corresponding socket in road,
The transmission function of socket is called to send data blocks to corresponding COTS serial ports-network interface adaptation.
A kind of digital interface software adaptation method of high-speed magnetic floating operation control system HWIL simulation, comprising:
The initialization of digital quantity communication channel is carried out based on digital quantity configuration file, to obtain the socket of digital quantity communication channel Word;
Data are received based on socket, deposit digital quantity receives in buffer area, and provided by artificial service logical layer Digital data receives call back function and digital quantity reception buffer area is sent to artificial service logical layer;
Set corresponding to the digital quantity number provided based on artificial service logical layer the data that artificial service logical layer issues Word is connect externally to send.
The digital quantity configuration file includes the configuration in digital interface port number information and each digital interface channel Information.
Described to receive data based on socket, deposit digital quantity receives in buffer area, and is mentioned by artificial service logical layer The digital data of confession receives call back function and digital quantity reception buffer area is sent to artificial service logical layer, specifically includes:
It receives data and is stored in digital quantity and receive buffer area;
The periodical each socket of poll extracts effective number according to the corresponding digital input signals number of socket Information is measured, and step-by-step moves left to the high position that digital data receives buffer area valid data part;
After all socket polls are complete, call back function is received by the digital data that artificial service logical layer provides Digital quantity is received into the data in buffer area and is sent to artificial service logical layer together with effective length.
It is described that the initialization of digital quantity communication channel is carried out based on digital quantity configuration file, to obtain digital quantity communication channel Socket, specifically: the initialization of digital quantity communication channel is carried out based on digital quantity configuration file, to obtain digital quantity communication channel Socket, and by socket together with channel number, digital signal number and numeral output array at after tuple be stored in digital quantity channel Information share space;
Corresponding to the digital quantity number that the data issued to artificial service logical layer are provided based on artificial service logical layer Socket externally send, specifically include:
Obtain suction parameter, wherein the suction parameter includes the value of digital quantity position number He digital quantity;
It is scanned since No. 1 tuple data from digital quantity channel information shared region, if the position number is greater than the number of tuples The value of digital output signal number in, then subtract digital output signal number for the position number, continues to scan on until position number is not more than Until the value of digital output signal number in Current Scan tuple data;
Current tuple data is adapted to the COTS digital quantity in requisition for connection-network interface after the end of scan, position number The as COTS digital quantity-corresponding serial number of network interface adaptation numeral output;
In such a way that Modbus Transmission Control Protocol sends command word, the value of position number and the corresponding digital quantity of suction parameter is sent out It is sent to COTS digital quantity-network interface adaptation.
A kind of software adaptation equipment of high-speed magnetic floating operation control system HWIL simulation, including test host, COTS connect Mouth adaptive device, the test host is connected to operation control system entity device by COTS interface adaptive device, described COTS interface adaptive device includes COTS serial ports-network interface adaptation and COTS number-network interface adaptation, the test host Including memory, processor, and the program for being stored in memory and being executed by the processor, the processor execute institute It is performed the steps of when stating program
The initialization of serial ports channel is carried out based on serial ports configuration file, to obtain the socket in serial communication channel,
It is recycled based on socket and receives data, the data message for extracting data message and being provided by artificial service logical layer It receives call back function and data message and serial ports channel number is sent to artificial service logical layer,
The data message that artificial service logical layer issues is packaged to obtain data block, and is based on artificial service logical layer Socket corresponding to the serial ports channel number of offer externally sends packaged data block;
The initialization of digital quantity communication channel is carried out based on digital quantity configuration file, to obtain the socket of digital quantity communication channel Word,
Data are received based on socket, deposit digital quantity receives in buffer area, and provided by artificial service logical layer Digital data receives call back function and digital quantity reception buffer area is sent to artificial service logical layer,
Set corresponding to the digital quantity number provided based on artificial service logical layer the data that artificial service logical layer issues Word is connect externally to send.
Compared with prior art, the invention has the following advantages: the physical interface of HWIL simulation is adapted to conversion For software logic interface adaptation, the functional component of analogue system is no longer limited by the extended capability of industrial personal computer physical interface, disposes Get up more flexible.
Detailed description of the invention
Fig. 1 is the Serial Communication Software interface adaptation, logic block diagram that the present invention is implemented;
Fig. 2 is the digital quantity software interface adaptation, logic block diagram that the present invention is implemented.
Specific embodiment
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.The present embodiment is with technical solution of the present invention Premised on implemented, the detailed implementation method and specific operation process are given, but protection scope of the present invention is not limited to Following embodiments.
The purpose of the application is the exploitation in order to simplify analogue system outside high-speed maglev train control system, by will be with height The connected physical interface of speed magnetic suspension train control system entity device (including RS232/422/485 serial communication interface and number Input/output interface) it is external, the interface section of analogue system is converted to the mode of software interface adaptation.Interface is external to be can be used Customization or COTS hardware, i.e., commercial matured product, by physical interface used in high-speed maglev train control system entity device Uniformly be converted to Ethernet interface.
The application proposes the software interface adaptation of high-speed maglev train control system semi-matter simulating system, passes through Ethernet Physical interface conversion is realized with external COTS interface adapter, while being docked with the Business Logic of analogue system, realizes column The information exchange of vehicle control entity device and analogue system Business Logic.There is network-based software interface to be adapted to, The functional component of analogue system is just not only restricted to the extended capability of industrial personal computer physical interface, and deployment is got up more flexible.Such as it is right In the not high track switch analogue system of requirement of real-time, if one group of track switch simulation software is only using traditional HWIL simulation mode It can be deployed on an industrial personal computer, if suitable using software interface that is external based on physical interface and being adapted for network interface Match, then an industrial personal computer can dispose multiple groups track switch simulation software.
That is, the application is logically decomposed into two parts, i.e. Serial Communication Software method for interface adaptation and digital quantity software Method for interface adaptation.
A kind of serial ports software adaptation method of high-speed magnetic floating operation control system HWIL simulation, comprising:
A1: the initialization of serial ports channel is carried out based on serial ports configuration file, to obtain the socket in serial communication channel and deposit Enter serial ports channel information shared region, wherein matching comprising serial ports port number information and each serial ports channel in serial ports configuration file Confidence breath;
A2: data are received based on socket circulation, the data extracting data message and providing by artificial service logical layer Message receives call back function and data message and serial ports channel number is sent to artificial service logical layer, specifically includes:
Data are received based on socket and are stored in data receiver buffer area;
According to interface protocol, scanning recognition frame head and postamble, are extracted since the queue head of data receiver buffer area To data block, wherein if not recognizing frame head, journal file is recorded;
CRC check is carried out, if verification passes through, handles data block progress escape to obtain data message;
Call back function is received by data message and serial ports channel number by the data message that artificial service logical layer provides It is sent to artificial service logical layer.
According to interface protocol, scanning recognition frame head and postamble, are extracted since the queue head of data receiver buffer area During data block,
A3: the data message issued to artificial service logical layer is packaged to obtain data block, and is patrolled based on artificial service It collects socket corresponding to the serial ports channel number that layer provides externally to send packaged data block, specifically include:
The data that artificial service logical layer is issued according to the interface protocol of high-speed magnetic floating operation control system entity device Message is packaged to obtain data block,
According to the serial ports channel number that artificial service logical layer provides, obtained from serial ports channel information shared region logical with serial ports The corresponding socket in road,
The transmission function of socket is called to send data blocks to corresponding COTS serial ports-network interface adaptation.
Specifically, for the implementation process of Serial Communication Software method for interface adaptation, Fig. 1 provides logic diagram.This method Three interfaces are provided to high-speed magnetic floating traction/track switch/vehicle function part artificial service logical layer, i.e. serial ports channel initializes Interface, data message receiving interface and data message transmission interface.These three interfaces are respectively by serial ports channel initialization procedure, string Mouth data receiver treatment process and serial data send treatment process and realize docking respectively.
Serial ports channel initialization procedure is called by the serial ports channel initialization interface of artificial service logical layer, and suction parameter is The data message that artificial service logical layer provides receives call back function.
Serial ports channel initialization procedure calls in the serial ports configuration file of XML format when running, this document is responsible for configuring COTS Serial ports-network interface adaptation channel information.Here is the implementation sample of a serial ports configuration file.
According to the configuration information of serial ports configuration file, by XML Node, " < serial communication connects serial communication interface port number n Mouth port number></serial communication interface channel number >" determine.
The initiation parameter in each channel by XML Node "<channel xadaptation information ></channel xadaptation information >" determine, x Range be [1, n].Its child node "<iP></IP>" and "<port></port>" to provide corresponding COTS serial ports-network interface suitable The IP address and port numbers matched.
For each serial communication channel, corresponding socket is successively created according to channel number.Socket and channel number group It is managed at serial ports channel information shared region is put into after tuple { channel number, socket }.
Serial ports channel initialization procedure creates the thread of respective numbers, i.e. TCP data according to serial communication interface port number Receiving thread.The principal function of thread is that serial data receives treatment process, and serial ports channel number and socket connect as serial data Receive the suction parameter for the treatment of process.
Serial data receives serial data built in treatment process and receives buffer area.The buffer area is a round-robin queue, is responsible for The received serial data of buffering.The main flow that serial data receives treatment process is to recycle to receive data simultaneously by socket It is handled.Once receiving new data, then data supplementing to serial data is received in buffer area, and then executes one and mention Take the process of data message:
According to interface protocol, high-speed magnetic floating operation control system entity device includes frame head by the data that serial ports is sent STX (02H), postamble ETX (03H), CRC check and and data message, wherein the data in data message must be by escape Reason.It extracts data message and is based on serial data reception buffer area, scanned since queue head.Queue head under normal circumstances Data are frame head STX, and the queue position comprising frame head STX data is arrived in otherwise scanning always, and by this before the queue position Block number is recorded in journal file according to extraction, while setting queue head pointer for the position.Extreme case is entire queue In all do not find frame head STX data, then the total data in buffer area is all recorded in journal file, while by queue It empties, i.e., head pointer is assigned a value of tail pointer.After finding frame head STX data, postamble ETX data are looked in continuation in the queue. If it is found, then extracting the data block, and CRC check is carried out, if correctly, which is stored to temporary digital storage Area, and escape processing is carried out, data block that treated is data message, receives call back function for datagram by data message Text and serial ports channel number are sent to artificial service logical layer.Continue such process, until complete datagram cannot be extracted Until text.
Data message sends treatment process and receives calling directly for artificial service logical layer, and suction parameter is serial ports channel number And data message.In order to send high-speed magnetic floating operation control system entity device for data message, need according to high-speed magnetic floating The interface protocol of operation control system entity device is packaged data message.Escape is carried out to data message first, then CRC check is calculated, affix frame head STX and postamble ETX, obtains being sent to high-speed magnetic floating operation control system on this basis The data block of entity device.According to the serial ports channel number that artificial service logical layer provides, taken from serial ports channel information shared region Corresponding socket is obtained with serial ports channel.Then the transmission function of socket is called to send data blocks to corresponding COTS string Mouth-network interface adaptation.
For the implementation process of digital quantity software interface adaptation method, comprising:
B1: the initialization of digital quantity communication channel is carried out based on digital quantity configuration file, to obtain digital quantity communication channel Socket, and socket is believed together with channel number, digital signal number and numeral output array at deposit digital quantity channel after tuple Cease shared region, wherein digital quantity configuration file includes matching for digital interface port number information and each digital interface channel Confidence breath;
B2: data are received based on socket, deposit digital quantity receives in buffer area, and provides by artificial service logical layer Digital data receive call back function by digital quantity reception buffer area be sent to artificial service logical layer, specifically include:
It receives data and is stored in digital quantity and receive buffer area;
The periodical each socket of poll extracts effective number according to the corresponding digital input signals number of socket Information is measured, and step-by-step moves left to the high position that digital data receives buffer area valid data part;
After all socket polls are complete, call back function is received by the digital data that artificial service logical layer provides Digital quantity is received into the data in buffer area and is sent to artificial service logical layer together with effective length.
B3: corresponding to the digital quantity number provided based on artificial service logical layer the data that artificial service logical layer issues Socket is externally sent, and is specifically included:
Obtain suction parameter, wherein suction parameter includes the value of digital quantity position number He digital quantity;
It is scanned since No. 1 tuple data from digital quantity channel information shared region, if the position number is greater than the number of tuples The value of digital output signal number in, then subtract digital output signal number for the position number, continues to scan on until position number is not more than Until the value of digital output signal number in Current Scan tuple data;
Current tuple data is adapted to the COTS digital quantity in requisition for connection-network interface after the end of scan, position number The as COTS digital quantity-corresponding serial number of network interface adaptation numeral output;
In such a way that Modbus Transmission Control Protocol sends command word, the value of position number and the corresponding digital quantity of suction parameter is sent out It is sent to COTS digital quantity-network interface adaptation.
Fig. 2 provides logic diagram.Party's normal direction high-speed magnetic floating traction/track switch/vehicle function part artificial service logic Layer provides three interfaces, i.e. digital quantity channel initialization interface, digital quantity receiving interface and digital quantity transmission interface.These three connect Mouth receives treatment process by digital quantity initialization procedure, digital quantity respectively and digital quantity sends treatment process and realizes docking respectively.
Digital quantity channel initialization procedure is called by artificial service logical layer, and suction parameter is that artificial service logical layer provides Data volume receive call back function.
Digital interface channel initialization procedure calls in the digital quantity configuration file of XML format when running, this document is responsible for Configure COTS digital quantity-network interface adaptation channel information.Here is the implementation sample of a digital quantity configuration file.
According to the configuration information of digital quantity configuration file, digital interface port number n is by XML Node " < digital interface Port number></number of digital interface channels >" determine.
The initiation parameter in each channel by XML Node "<channel xadaptation information ></channel xadaptation information >" determine, x Range be [1, n].Its child node "<iP></IP>" and "<port></port>" corresponding COTS digital quantity-network interface is provided The IP address and port numbers of adaptation, child node "<number of digital input signals ></number of digital input signals >" and "<numeral input letter Number></number of digital input signals >" corresponding COTS digital quantity-network interface adaptation digital input signals number and number are provided Output signal number.
For each digital quantity channel, corresponding socket is successively created according to channel number.Socket is together with channel number, number Word signal number and numeral output array after tuple { channel number, socket, digital input signals number, digital output signal number } at putting Enter digital quantity channel information shared region to be managed.
Digital quantity channel initialization procedure creates a TCP data receiving thread.The principal function of thread is digital quantity reception Treatment process.
Digital quantity receives treatment process embedded digital amount data receiver buffer area.The buffer area is an INT64 type variable, is born The received digital data of duty buffering.Digital data receive treatment process main flow be by be arranged a clock, Periodical poll digital data.When reaching polling cycle, digital data is received into buffer empty first, then poll All sockets in channel information shared region.For each socket, the side of command word is sent by Modbus Transmission Control Protocol Formula reads COTS digital quantity-network interface adaptation register information of institute's interface, then according to the corresponding number of the socket Input signal number extracts effective digital information, and step-by-step moves left to digital data and receives buffer area valid data portion The high position divided, while the length of accumulative digital quantity data receiver buffer area.
After all socket polls are complete, call back function is received by digital data and receives digital quantity in buffer area Data be sent to artificial service logical layer together with effective length.
Digital data sends treatment process and receives calling directly for artificial service logical layer, and suction parameter is digital quantity position Number and digital quantity value (0 or 1).Corresponding socket is navigated to according to the position number of digital quantity, algorithm is from digital quantity channel It is scanned since No. 1 tuple data in information share space, if this number is greater than the digital output signal number in the tuple data Value, then the position number is subtracted into digital output signal number, continued to scan on until position number is no more than in Current Scan tuple data Until the value of digital output signal number.Current tuple data is i.e. to COTS digital quantity-net in requisition for connection after the end of scan Network interface adaptation, position number are COTS digital quantity-corresponding serial number of network interface adaptation numeral output.It is assisted by Modbus TCP View sends the mode of command word, sends COTS digital quantity-network interface for the value of position number digital quantity corresponding with suction parameter Adaptation.

Claims (10)

1. a kind of serial ports software adaptation method of high-speed magnetic floating operation control system HWIL simulation characterized by comprising
The initialization of serial ports channel is carried out based on serial ports configuration file, to obtain the socket in serial communication channel;
It is recycled based on socket and receives data, extract data message and received by the data message that artificial service logical layer provides Data message and serial ports channel number are sent to artificial service logical layer by call back function;
The data message that artificial service logical layer issues is packaged to obtain data block, and is provided based on artificial service logical layer Serial ports channel number corresponding to socket packaged data block is externally sent.
2. a kind of serial ports software adaptation side of high-speed magnetic floating operation control system HWIL simulation according to claim 1 Method, which is characterized in that the configuration information in the serial ports configuration file comprising serial ports port number information and each serial ports channel.
3. a kind of serial ports software adaptation side of high-speed magnetic floating operation control system HWIL simulation according to claim 1 Method, which is characterized in that it is described that data are received based on socket circulation, it extracts data message and is provided by artificial service logical layer Data message receive call back function data message and serial ports channel number be sent to artificial service logical layer, comprising:
Data are received based on socket and are stored in data receiver buffer area;
According to interface protocol, scanning recognition frame head and postamble since the queue head of data receiver buffer area, extraction are counted According to block;
CRC check is carried out, if verification passes through, handles data block progress escape to obtain data message;
Call back function is received by the data message that artificial service logical layer provides to send data message and serial ports channel number Give artificial service logical layer.
4. a kind of serial ports software adaptation side of high-speed magnetic floating operation control system HWIL simulation according to claim 3 Method, which is characterized in that described according to interface protocol, scanning recognition frame head and frame since the queue head of data receiver buffer area Tail, during extraction obtains data block,
If not recognizing frame head, journal file is recorded.
5. a kind of serial ports software adaptation side of high-speed magnetic floating operation control system HWIL simulation according to claim 1 Method, which is characterized in that it is described that the initialization of serial ports channel is carried out based on serial ports configuration file, to obtain the socket in serial communication channel Word, specifically: the initialization of serial ports channel is carried out based on serial ports configuration file, to obtain socket and the deposit in serial communication channel Serial ports channel information shared region;
The data message issued to artificial service logical layer is packaged to obtain data block, and is based on artificial service logical layer Socket corresponding to the serial ports channel number of offer externally sends packaged data block, specifically includes:
The data message that artificial service logical layer is issued according to the interface protocol of high-speed magnetic floating operation control system entity device It is packaged to obtain data block,
According to the serial ports channel number that artificial service logical layer provides, obtain from serial ports channel information shared region with serial ports channel phase Corresponding socket,
The transmission function of socket is called to send data blocks to corresponding COTS serial ports-network interface adaptation.
6. a kind of digital interface software adaptation method of high-speed magnetic floating operation control system HWIL simulation, which is characterized in that Include:
The initialization of digital quantity communication channel is carried out based on digital quantity configuration file, to obtain the socket of digital quantity communication channel;
Data are received based on socket, deposit digital quantity receives in buffer area, and the number provided by artificial service logical layer Digital quantity reception buffer area is sent to artificial service logical layer by amount data receiver call back function;
Socket corresponding to the digital quantity number provided based on artificial service logical layer the data that artificial service logical layer issues Externally send.
7. a kind of digital interface software of high-speed magnetic floating operation control system HWIL simulation according to claim 6 is suitable Method of completing the square, which is characterized in that the digital quantity configuration file includes digital interface port number information and each digital interface The configuration information in channel.
8. a kind of digital interface software of high-speed magnetic floating operation control system HWIL simulation according to claim 6 is suitable Method of completing the square, which is characterized in that described to receive data based on socket, deposit digital quantity receives in buffer area, and passes through emulation industry The digital data that business logical layer provides receives call back function and digital quantity reception buffer area is sent to artificial service logical layer, has Body includes:
It receives data and is stored in digital quantity and receive buffer area;
The periodical each socket of poll extracts effective digital quantity according to the corresponding digital input signals number of socket and believes Breath, and step-by-step moves left to the high position that digital data receives buffer area valid data part;
After all socket polls are complete, the digital data provided by artificial service logical layer receives call back function and will count The data that word amount receives in buffer area are sent to artificial service logical layer together with effective length.
9. a kind of digital interface software of high-speed magnetic floating operation control system HWIL simulation according to claim 6 is suitable Method of completing the square, which is characterized in that it is described that the initialization of digital quantity communication channel is carried out based on digital quantity configuration file, to obtain digital quantity The socket of communication channel, specifically: the initialization of digital quantity communication channel is carried out based on digital quantity configuration file, to obtain number Measure the socket of communication channel, and by socket together with channel number, digital signal number and numeral output array at being stored in after tuple Digital quantity channel information shared region;
Set corresponding to the digital quantity number that the data issued to artificial service logical layer are provided based on artificial service logical layer It connects word externally to send, specifically include:
Obtain suction parameter, wherein the suction parameter includes the value of digital quantity position number He digital quantity;
It is scanned since No. 1 tuple data from digital quantity channel information shared region, if the position number is greater than in the tuple data Digital output signal number value, then the position number is subtracted into digital output signal number, continued to scan on until position number is no more than current Until the value for scanning the digital output signal number in tuple data;
Current tuple data is adapted to the COTS digital quantity in requisition for connection-network interface after the end of scan, and position number is COTS digital quantity-corresponding the serial number of network interface adaptation numeral output;
In such a way that Modbus Transmission Control Protocol sends command word, send the value of position number and the corresponding digital quantity of suction parameter to COTS digital quantity-network interface adaptation.
10. a kind of software adaptation equipment of high-speed magnetic floating operation control system HWIL simulation, which is characterized in that led including test Machine, COTS interface adaptive device, the test host are connected to operation control system entity by COTS interface adaptive device and set Standby, the COTS interface adaptive device includes that COTS serial ports-network interface adaptation and COTS number-network interface are adapted to, described Testing host includes memory, processor, and the program for being stored in memory and being executed by the processor, the processing Device performs the steps of when executing described program
The initialization of serial ports channel is carried out based on serial ports configuration file, to obtain the socket in serial communication channel,
It is recycled based on socket and receives data, extract data message and received by the data message that artificial service logical layer provides Data message and serial ports channel number are sent to artificial service logical layer by call back function,
The data message that artificial service logical layer issues is packaged to obtain data block, and is provided based on artificial service logical layer Serial ports channel number corresponding to socket packaged data block is externally sent;
The initialization of digital quantity communication channel is carried out based on digital quantity configuration file, to obtain the socket of digital quantity communication channel,
Data are received based on socket, deposit digital quantity receives in buffer area, and the number provided by artificial service logical layer Digital quantity reception buffer area is sent to artificial service logical layer by amount data receiver call back function,
Socket corresponding to the digital quantity number provided based on artificial service logical layer the data that artificial service logical layer issues Externally send.
CN201811183150.5A 2018-10-11 2018-10-11 Software adaptation method and device for high-speed magnetic levitation operation control system semi-physical simulation Expired - Fee Related CN109471737B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811183150.5A CN109471737B (en) 2018-10-11 2018-10-11 Software adaptation method and device for high-speed magnetic levitation operation control system semi-physical simulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811183150.5A CN109471737B (en) 2018-10-11 2018-10-11 Software adaptation method and device for high-speed magnetic levitation operation control system semi-physical simulation

Publications (2)

Publication Number Publication Date
CN109471737A true CN109471737A (en) 2019-03-15
CN109471737B CN109471737B (en) 2020-11-27

Family

ID=65663707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811183150.5A Expired - Fee Related CN109471737B (en) 2018-10-11 2018-10-11 Software adaptation method and device for high-speed magnetic levitation operation control system semi-physical simulation

Country Status (1)

Country Link
CN (1) CN109471737B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110262989A (en) * 2019-06-14 2019-09-20 福建星云电子股份有限公司 A kind of multifunctional communication converter and the means of communication
CN110489843A (en) * 2019-08-09 2019-11-22 江苏核电有限公司 A method of simulation radiation measuring instrument data feedback
CN112987700A (en) * 2021-04-27 2021-06-18 湖南中车时代通信信号有限公司 Integrated test system of magnetic suspension traffic operation control system
CN113253703A (en) * 2021-04-30 2021-08-13 中车株洲电力机车研究所有限公司 Simulation test system and test method for high-speed maglev train

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887379A (en) * 2010-06-18 2010-11-17 北京航空航天大学 Virtual network card-based wireless channel simulation method
CN104598663A (en) * 2014-07-30 2015-05-06 徐松林 Virtual generating system and method for ocean mechanical environment
CN104751692A (en) * 2013-12-31 2015-07-01 中国人民解放军军械工程学院 Virtual and physical synchronization equipment training simulator
CN107404350A (en) * 2017-07-31 2017-11-28 北京邮电大学 Satellite network simulation method, apparatus, electronic equipment and readable storage medium storing program for executing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887379A (en) * 2010-06-18 2010-11-17 北京航空航天大学 Virtual network card-based wireless channel simulation method
CN104751692A (en) * 2013-12-31 2015-07-01 中国人民解放军军械工程学院 Virtual and physical synchronization equipment training simulator
CN104598663A (en) * 2014-07-30 2015-05-06 徐松林 Virtual generating system and method for ocean mechanical environment
CN107404350A (en) * 2017-07-31 2017-11-28 北京邮电大学 Satellite network simulation method, apparatus, electronic equipment and readable storage medium storing program for executing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YIJUN CHEN ET AL.: "Establishment and Application of Simulation Test Platform of Guideway Switch Control System in High-Speed Maglev Transportation System", 《15TH COTA INTERNATIONAL CONFERENCE OF TRANSPORTATION PROFESSIONALS》 *
林创欢: "无人机飞控半物理仿真系统设计与实现", 《中国优秀硕士学位论文全文数据库 工程科技II辑》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110262989A (en) * 2019-06-14 2019-09-20 福建星云电子股份有限公司 A kind of multifunctional communication converter and the means of communication
CN110262989B (en) * 2019-06-14 2024-02-20 福建星云电子股份有限公司 Multifunctional communication converter and communication method
CN110489843A (en) * 2019-08-09 2019-11-22 江苏核电有限公司 A method of simulation radiation measuring instrument data feedback
CN112987700A (en) * 2021-04-27 2021-06-18 湖南中车时代通信信号有限公司 Integrated test system of magnetic suspension traffic operation control system
CN113253703A (en) * 2021-04-30 2021-08-13 中车株洲电力机车研究所有限公司 Simulation test system and test method for high-speed maglev train

Also Published As

Publication number Publication date
CN109471737B (en) 2020-11-27

Similar Documents

Publication Publication Date Title
CN109471737A (en) The software adaptation method and apparatus of high-speed magnetic floating operation control system HWIL simulation
RU2473442C2 (en) Method and system for identification of data about train
CN103197231B (en) Field programmable gate array (FPGA) device for diagnosing and predicting artificial circuit faults
US7562276B1 (en) Apparatus and method for testing and debugging an integrated circuit
CN104486169B (en) Reusable automatic detection and accidental validation system and method
CN101093521B (en) FPGA emulation device and method
CN109558371A (en) Serial connection between Management Controller and microcontroller
CN103925853B (en) A kind of carrier rocket ground testing system device
CN101174283A (en) Software and hardware cooperating simulation platform based on network
CN106657149A (en) Communication protocol conversion method and device
CN109264519A (en) A kind of vibration of elevator Signal Pre-Processing Method and elevator gateway system
CN102096410A (en) Dynamic function test method of high-speed train operation control system
CN102591757A (en) Verification method and verification environment platform based on intelligent card universal serial bus (IC-USB) interface module of verification methodology (VMM)
CN108763981A (en) A kind of RFID reader verification platform and verification method based on UVM
CN110958295A (en) Testing method and system based on vehicle-mounted ATP equipment
CN104462626A (en) RFIF verification platform based on VMM verification methodology and implementation method
CN100366003C (en) Device and method for emulated route analysis test
CN109743241A (en) A kind of long-range aeronautical data bus switch equipment based on high-performance processor
CN106237613B (en) A kind of game paddle and control method
CN110288668A (en) Image generating method, device, computer equipment and storage medium
CN110472410A (en) Identify method, equipment and the data processing method of data
CN108984136A (en) print data transmission method, device, equipment and storage medium
CN108667663A (en) Flow method of adjustment, related device, platform, system, equipment and storage medium
CN113492890B (en) Central control system data acquisition and storage method and central control system
CN108614901A (en) A kind of PCIE verification method

Legal Events

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

Effective date of registration: 20210210

Address after: 200092 Siping Road 1239, Shanghai, Yangpu District

Patentee after: TONGJI University

Patentee after: CRRC QINGDAO SIFANG Co.,Ltd.

Address before: 200092 Siping Road 1239, Shanghai, Yangpu District

Patentee before: TONGJI University

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201127