CN115314543A - Method for realizing SCPI communication based on TCP - Google Patents
Method for realizing SCPI communication based on TCP Download PDFInfo
- Publication number
- CN115314543A CN115314543A CN202210684635.2A CN202210684635A CN115314543A CN 115314543 A CN115314543 A CN 115314543A CN 202210684635 A CN202210684635 A CN 202210684635A CN 115314543 A CN115314543 A CN 115314543A
- Authority
- CN
- China
- Prior art keywords
- scpi
- board card
- communication
- upper computer
- tcpclient
- 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.)
- Pending
Links
- 230000006854 communication Effects 0.000 title claims abstract description 83
- 238000004891 communication Methods 0.000 title claims abstract description 76
- 238000000034 method Methods 0.000 title claims abstract description 32
- 230000005540 biological transmission Effects 0.000 claims description 11
- 230000000903 blocking effect Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 230000002950 deficient Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
- G01R31/28—Testing of electronic circuits, e.g. by signal tracer
- G01R31/2832—Specific tests of electronic circuits not provided for elsewhere
- G01R31/2834—Automated test systems [ATE]; using microprocessors or computers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0751—Error or fault detection not based on redundancy
- G06F11/0754—Error or fault detection not based on redundancy by exceeding limits
- G06F11/0757—Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/163—In-band adaptation of TCP data exchange; In-band control procedures
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Environmental & Geological Engineering (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Quality & Reliability (AREA)
- Computer And Data Communications (AREA)
Abstract
A method for realizing SCPI communication based on TCP is used for realizing SCPI instruction communication between an upper computer and a board card in ATE equipment; the method comprises the steps that in an upper computer, a TCPClient class of a client is packaged on the basis of a C + + language, and the TCPClient class is used as an SCPI communication module of upper computer test software; the SCPI communication module is used for communicating with the board card, so that the SCPI instruction can be reliably transmitted, and the information of the board card can be accurately acquired. Therefore, the invention can enable the upper computer and the board card to carry out SCPI instruction communication, namely, ATE test software can accurately send the SCPI instruction to the board card, the board card receives the instruction and returns corresponding board card information to the upper computer, even if errors of connection, sending or receiving occur in the whole communication process, the error information can be timely fed back, the phenomenon of blocking is avoided, and the safety and the accuracy of communication are improved.
Description
Technical Field
The invention relates to the field of Automatic Test Equipment (ATE for short), in particular to a method for realizing SCPI (Standard Commands for Programmable Instruments) communication based on TCP (Transmission control protocol).
Background
ATE is a device that performs tests on devices, circuit boards, subsystems, etc. under computer control, and it automatically completes test sequences by computer programming instead of manual labor. ATE exists in each link of a former procedure and a latter procedure, and the ATE is specifically determined by the requirements of process design. The method aims to screen defective products, prevent the defective products from entering the next procedure and reduce redundant manufacturing cost in the next procedure.
In a semiconductor test ATE system, a programmable instrument standard command SCPI between an upper computer and a board card is usually used for communication, and the SCPI command actually defines a set of standard syntax and commands for controlling a programmable measurement instrument. That is, the SCPI command actually interacts with the instrument in the form of an ASCII string.
However, in the SCPI command communication between the upper computer and the board card, problems such as low transmission precision and deadlocking may occur.
Disclosure of Invention
The invention aims to provide a method for realizing SCPI communication based on TCP, which is used for reliably transmitting an SCPI instruction and accurately acquiring board card information.
In order to achieve the purpose, the technical scheme of the invention is as follows:
a method for realizing SCPI communication based on TCP is used for realizing SCPI instruction communication between an upper computer and a board card in ATE equipment; which comprises the following steps:
step S11: in an upper computer, a TCPClient class of a client is packaged by using a C + + language as a basis, and the TCPClient class is used as an SCPI communication module of upper computer test software;
step S12: the SCPI communication module is communicated with the board card, so that the SCPI instruction can be reliably transmitted, and the information of the board card can be accurately acquired.
Further, the step S12 includes the following steps:
step S121: adopting a TCP protocol and three-way handshaking, and establishing a TCP formal connection between the TCPClient class upper computer client and the board card;
step S122: the SCPI communication module sends an SCPI instruction to the board card, and the board card receives the instruction and returns corresponding board card information to the upper computer client TCPClient;
step S123: and (6) ending.
In order to achieve the above object, another technical solution of the present invention is as follows:
a method for realizing SCPI communication based on TCP is used for realizing SCPI instruction communication between an upper computer and a board card in ATE equipment; the method is characterized by comprising the following steps:
step S21: in an upper computer, a TCPClient class + communication timeout control unit of a client is packaged by using C + + language as a basis, and the TCPClient class + communication timeout control module is used as an SCPI communication module of upper computer test software;
step S22: the SCPI communication module is communicated with the board card, so that the SCPI instruction can be reliably transmitted, and the board card information can be accurately acquired.
Further, the step S22 includes the following steps:
step S221: adopting a TCP protocol and three-way handshaking, wherein the TCPClient class establishes a TCP formal connection between the TCPClient of the upper computer client and the board card; and the communication timeout control unit monitors whether the connection between the client TCPClient and the board card is successful, if the connection is not successful, the communication timeout control unit jumps out to wait within a specified time, throws out the information of connection timeout error, and executes step S223; otherwise, go to step S222;
step S222: the SCPI communication module sends an SCPI instruction to the board card, and the board card receives the instruction and returns corresponding board card information to the upper computer client TCPClient; the communication timeout control unit monitors whether the data transmission/reception is successful in the communication process, and if data feedback cannot be obtained within the specified time, the communication timeout control unit waits for the data transmission/reception and throws out transmission/reception error information; otherwise, executing step S223 until all SCPI instructions are sent to the board card;
step S223: and (6) ending.
According to the technical scheme, the method for realizing SCPI communication based on TCP can enable the upper computer and the board card to carry out SCPI instruction communication, namely ATE test software can accurately send SCPI instructions to the board card, the board card receives the instructions and returns corresponding board card information to the upper computer, even if connection, sending or receiving errors occur in the whole communication process, the error information can be fed back in time, the phenomenon of deadlocking is avoided, and therefore safety and accuracy of communication are improved.
Drawings
FIG. 1 is a flow chart illustrating a method for implementing SCPI communication based on TCP according to the present invention
Fig. 2 is a schematic diagram illustrating a process of communicating with the board through the SCPI communication module in the embodiment of the present invention
FIG. 3 is a flow chart of another method for implementing SCPI communication based on TCP according to the present invention
Fig. 4 is a schematic diagram illustrating another process of communicating with the board through the SCPI communication module according to the embodiment of the present invention
Detailed Description
The following description of the present invention will be made in detail with reference to the accompanying drawings 1 to 4.
Example 1
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for implementing SCPI communication based on TCP according to the present invention. As shown in fig. 1, the method is used for realizing SCPI instruction communication between an upper computer and a board card in ATE equipment; which comprises the following steps:
step S11: in an upper computer, a TCPClient class of a client is packaged by using a C + + language as a basis, and the TCPClient class is used as an SCPI communication module of upper computer test software;
step S12: the SCPI communication module is communicated with the board card, so that the SCPI instruction can be reliably transmitted, and the information of the board card can be accurately acquired.
In the embodiment of the invention, a TCPClient class is mainly encapsulated by using a C + + language and is used for communicating with a board.
Firstly, TCP is a communication protocol based on byte stream, connection-oriented and reliable transport layer, which is two communication-oriented endpoints, and does not consider an intermediate network segment and a node, that is, a TCP connection is established between a client and a server before data exchange, so that data can be mutually transmitted, and a three-way handshake is established during transmission, thereby ensuring that data can be accurately and reliably transmitted between the client and the server. By utilizing the advantage of TCP communication, the invention encapsulates an SCPI communication module taking TCPClient as upper computer test software based on C + + language, and communicates with the board card through the SCPI communication module, thereby achieving the purposes of reliably transmitting SCPI instructions and accurately acquiring the information of the board card.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a process of communicating with the board through the SCPI communication module according to an embodiment of the present invention. As shown in fig. 2, the step S12 includes the following steps:
step S121: adopting a TCP protocol and three-way handshaking, wherein the TCPClient class establishes a TCP formal connection between the upper computer client and the board card;
step S122: the SCPI communication module sends an SCPI instruction to the board card, and the board card receives the instruction and returns corresponding board card information to the upper computer client TCPClient;
step S123: and (6) ending.
Example 2
Referring to fig. 3, fig. 3 is a flowchart illustrating another method for implementing SCPI communication based on TCP according to the present invention. As shown in fig. 3, a method for implementing SCPI communication based on TCP is used to implement SCPI instruction communication between an upper computer and a board card in ATE equipment; which comprises the following steps:
step S21: in an upper computer, a TCPClient class + communication timeout control unit of a client is packaged by using a C + + language as a basis, and the TCPClient class + communication timeout control module is used as an SCPI (System configuration and input protocol) communication module of upper computer test software;
step S22: the SCPI communication module is communicated with the board card, so that the SCPI instruction can be reliably transmitted, and the information of the board card can be accurately acquired.
In the embodiment of the invention, a communication timeout control module is added on the basis of the embodiment 1, so that the problem of deadlocking caused by the fact that data feedback cannot be obtained in the data connection, sending or receiving operation in the communication process of the upper computer and the board card is solved.
Specifically, the communication timeout control module mainly includes three parts: connection Timeout control (Connect Timeout), send Timeout control (Send Timeout), and receive Timeout control (Recv Timeout). The connection timeout control is mainly responsible for monitoring whether the connection between the TCPClient and the board card is successful, if the connection is not successful, the connection timeout control jumps out of the waiting time within the specified time to throw out the connection timeout error, and the program is prevented from being blocked. Similarly, the sending and receiving overtime control is respectively responsible for monitoring whether the sending/receiving data is successful in the communication process, and if data feedback cannot be obtained within the specified time, the sending/receiving overtime control jumps out of waiting and throws out sending/receiving errors, thereby avoiding the program from being stuck due to infinite waiting.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating another process of communicating with the board through the SCPI communication module according to the embodiment of the present invention. As shown in fig. 4, the step S22 includes the following steps:
step S221: adopting a TCP protocol and three-way handshaking, wherein the TCPClient class establishes a TCP formal connection between the TCPClient of the upper computer client and the board card; and the communication timeout control unit monitors whether the connection between the client TCPClient and the board card is successful, if the connection is not successful, the communication timeout control unit jumps out to wait within a specified time, throws out the information of connection timeout error, and executes step S223; otherwise, go to step S222;
step S222: the SCPI communication module sends an SCPI instruction to the board card, and the board card receives the instruction and returns corresponding board card information to the upper computer client TCPClient; the communication timeout control unit monitors whether the data transmission/reception is successful in the communication process, and if data feedback cannot be obtained within the specified time, the communication timeout control unit waits for the data transmission/reception and throws out transmission/reception error information; otherwise, executing step S223 until all SCPI instructions are sent to the board card;
step S223: and (6) ending.
The above description is only for the preferred embodiment of the present invention, and the embodiment is not intended to limit the scope of the present invention, so that all the equivalent structural changes made by using the contents of the description and the drawings of the present invention should be included in the scope of the present invention.
Claims (4)
1. A method for realizing SCPI communication based on TCP is used for realizing SCPI instruction communication between an upper computer and a board card in ATE equipment; the method is characterized by comprising the following steps:
step S11: in an upper computer, a TCPClient class of a client is packaged by using a C + + language as a basis, and the TCPClient class is used as an SCPI communication module of upper computer test software;
step S12: the SCPI communication module is communicated with the board card, so that the SCPI instruction can be reliably transmitted, and the information of the board card can be accurately acquired.
2. The method for implementing SCPI communication based on TCP as claimed in claim 1, wherein the step S12 comprises the following steps:
step S121: adopting a TCP protocol and three-way handshaking, and establishing a TCP formal connection between the TCPClient class upper computer client and the board card;
step S122: the SCPI communication module sends an SCPI instruction to the board card, and the board card receives the instruction and returns corresponding board card information to the upper computer client TCPClient;
step S123: and (6) ending.
3. A method for realizing SCPI communication based on TCP is used for realizing SCPI instruction communication between an upper computer and a board card in ATE equipment; the method is characterized by comprising the following steps:
step S21: in an upper computer, a TCPClient class + communication timeout control unit of a client is packaged by using a C + + language as a basis, and the TCPClient class + communication timeout control module is used as an SCPI (System configuration and input protocol) communication module of upper computer test software;
step S22: the SCPI communication module is communicated with the board card, so that the SCPI instruction can be reliably transmitted, and the information of the board card can be accurately acquired.
4. The method according to claim 3, wherein the step S22 comprises the following steps:
step S221: adopting a TCP protocol and three-way handshaking, wherein the TCPClient class establishes a TCP formal connection between the TCPClient of the upper computer client and the board card; and the communication timeout control unit monitors whether the connection between the client TCPClient and the board card is successful, if the connection is not successful, the communication timeout control unit jumps out to wait within a specified time, throws out the information of connection timeout error, and executes step S223; otherwise, go to step S222;
step S222: the SCPI communication module sends an SCPI instruction to the board card, and the board card receives the instruction and returns corresponding board card information to the upper computer client TCPClient; the communication timeout control unit monitors whether the data transmission/reception is successful in the communication process, and jumps out of waiting if no data feedback is obtained within a specified time and throws out transmission/reception error information; otherwise, executing step S223 until all SCPI instructions are sent to the board card;
step S223: and (6) ending.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2022101933640 | 2022-03-01 | ||
CN202210193364 | 2022-03-01 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115314543A true CN115314543A (en) | 2022-11-08 |
Family
ID=83854666
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210684635.2A Pending CN115314543A (en) | 2022-03-01 | 2022-06-16 | Method for realizing SCPI communication based on TCP |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115314543A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050232302A1 (en) * | 2004-04-15 | 2005-10-20 | Tillotson Timothy N | Translation between SCPI protocol communications and .NET protocol communications |
US20050251564A1 (en) * | 2004-04-15 | 2005-11-10 | Tillotson Timothy N | Remote instrument control by multiple clients |
CN103257910A (en) * | 2013-04-26 | 2013-08-21 | 北京航空航天大学 | LX I embedded type reconfigurable general test platform capable of being used for on-site test |
CN112783794A (en) * | 2021-02-10 | 2021-05-11 | 西南电子技术研究所(中国电子科技集团公司第十研究所) | Aviation communication radio station software test system |
-
2022
- 2022-06-16 CN CN202210684635.2A patent/CN115314543A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050232302A1 (en) * | 2004-04-15 | 2005-10-20 | Tillotson Timothy N | Translation between SCPI protocol communications and .NET protocol communications |
US20050251564A1 (en) * | 2004-04-15 | 2005-11-10 | Tillotson Timothy N | Remote instrument control by multiple clients |
CN103257910A (en) * | 2013-04-26 | 2013-08-21 | 北京航空航天大学 | LX I embedded type reconfigurable general test platform capable of being used for on-site test |
CN112783794A (en) * | 2021-02-10 | 2021-05-11 | 西南电子技术研究所(中国电子科技集团公司第十研究所) | Aviation communication radio station software test system |
Non-Patent Citations (2)
Title |
---|
胡欣宇;陈博;: "基于PXI平台的MEMS电场传感器自动测试系统的设计", 计算机科学, vol. 44, no. 11, 15 November 2017 (2017-11-15), pages 580 - 582 * |
胡欣宇等: "基于PXI平台的MEMS电场传感器自动测试系统的设计", 计算机科学, vol. 44, no. 11, pages 580 - 582 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8219216B2 (en) | Method and apparatus for synchronizing configuration changes across multiple components of an industrial control system | |
CN107704346B (en) | SOC chip debugging method and system | |
US20180151003A1 (en) | System and method for transferring diagnostic commands to a vehicle | |
CN101170438B (en) | A remote serial port debugging method and its system | |
CN107832250A (en) | A kind of master-slave communication timing method and method for reliable transmission based on SPI | |
CN101853173A (en) | Software upgrading method and device of programmable logic device of distributed system | |
CN110405759A (en) | A kind of chip control system | |
CN113138779B (en) | FPGA (field programmable Gate array) online program updating device and method based on multifunctional interface | |
CN104516798A (en) | Wireless one-to-many test system | |
JPS6041846A (en) | Transparent interface unit | |
CN112671898A (en) | Remote communication control system based on embedded equipment | |
CN104639663A (en) | Method and system for simultaneously and automatically upgrading software of multiple optical modems | |
CN102609353A (en) | Method, device and system for managing program debugging | |
CN115314543A (en) | Method for realizing SCPI communication based on TCP | |
CN110928608A (en) | Extensible communication framework supporting multiple communication protocols and communication method | |
US20220291283A1 (en) | Automatic chip testing system and method | |
CN101267350B (en) | Debugging method and debugging system | |
CN115981928A (en) | Processor remote debugging method, system and storage medium | |
US7016800B1 (en) | Centralized console API testing architecture | |
KR100325663B1 (en) | a system of in-line equipments and a controlling method thereof | |
CN113778796B (en) | Method for monitoring serial port communication through USB | |
CN109981394B (en) | Communication method and device based on enhanced CAN bus protocol analyzer | |
CN112667412A (en) | Debugging device and method for embedded system core dump | |
CN118376867B (en) | Automatic testing device and method for power distribution terminal | |
CN115373927B (en) | Product testing method, device, electronic equipment and computer readable medium |
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 |