Method for realizing Agilent M9187 digital IO remote control function
By creating a SCPI instruction tree and instruction responder, the remote control of Agilent M9187 digital IO is achieved using the TCP/IP protocol, which solves the problem that the module cannot be remotely controlled and improves the controllability and combination of the device.
Patent Information
- Application Number
- CN202410936618.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The Agilent M9187 digital IO module lacks remote control function, which makes it uncontrollable when the device to be tested is far from the external PC, and it is difficult to combine it with other test equipment into a test system.
By creating a SCPI instruction tree and instruction responder, the TCP/IP protocol enables external PCs to send SCPI instructions to control the Agilent M9187 digital IO, realizing remote reading and control of input and output states.
The remote control function of Agilent M9187 digital IO is realized, allowing the device to be controlled through the network, increasing the control distance, simplifying the test process, and enhancing the composability of the device.
Smart Images

Figure CN118964055A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automatic testing technology, and in particular to a method for realizing the remote control function of Agilent M9187 digital IO. Background Art
[0002] AgilentM9187 digital IO is a PXI module, which is the key to detect the device under test in the PXI automatic test system. Controlling the output pin status of the digital IO module can change the working state of the device under test, and can also read the current electrical parameters of the device under test through the input pin to achieve automatic control and monitoring of the device under test. When used in the automatic test system, it can shorten the time spent in the test process and reduce the errors that may be caused by human operation. Therefore, AgilentM9187 digital IO is widely used in automatic testing in various fields.
[0003] In the previous AgilentM9187 digital IO control technology, it can only be used in the mainframe of the matching AgilentM9187 control chassis through the matching driver and operation interface. There is no SCPI control command, and the external PC cannot control it.
[0004] In practical applications, there are the following disadvantages:
[0005] 1. Since the AgilentM9187 digital IO needs to be arranged near the device under test, when the device under test is far away from the external PC, the working status of the device under test cannot be controlled by the PC;
[0006] 2. It is difficult to combine with other test equipment into a test system. Summary of the invention
[0007] The present application provides a method for realizing the remote control function of the Agilent M9187 digital IO, which can be used to solve the problem that the Agilent M9187 digital IO does not have the remote control function.
[0008] The present application provides a method for realizing the remote control function of Agilent M9187 digital IO, the method comprising:
[0009] Step 1, divide the functions of AgilentM9187 digital IO into two basic types: input and output; subdivide the sub-functions contained in the basic type into: the input type includes querying all channel input voltages, querying single channel input voltage, threshold voltage setting and reading; the output type includes querying all channel output voltages, setting all channel output voltages, querying single channel output voltage, and setting single channel output voltage;
[0010] Step 2, according to the relevant standards of SCPI instructions, take input INPut and output OUTPut as root nodes, and take each sub-function as a leaf node to create a SCPI instruction tree; the sub-functions include voltage threshold setting / reading, full channel setting / reading, and single channel setting / reading;
[0011] Step 3, create a SCPI command responder for Agilent M9187; the command responder is used to convert the received SCPI command into the corresponding control function of each leaf node of Agilent M9187 digital IO;
[0012] Step 4, create a TCP server in the SCPI command responder, so that the external PC can connect to the Agilent M9187 digital IO as a client through the TCP / IP protocol and send the SCPI command designed in step 2 to the Agilent M9187 digital IO;
[0013] Step 5, when the external PC sends a SCPI command to the Agilent M9187 digital IO, the command responder controls the Agilent M9187 digital IO to switch to the state corresponding to the sub-function or reads the current state.
[0014] Furthermore, in step 2, the SCPI command is as follows:
[0015] a. Read the input value of all IO input channels INPut:ALL?
[0016] The format of the read value is<val1,val2,val3,...,val32>
[0017] b. Read the input value INPut[channel] of the IO single input channel?
[0018] The format of the read value is <val>
[0019] c. Set the IO full input channel input threshold 1 INPut[channel]:VOLtage:THREshold:LEVel1 <val>
[0020] d. Set the IO full input channel input threshold 2 INPut[channel]:VOLtage:THREshold:LEVel2 <val>
[0021] e. Set the output status of all IO output channels OUTPut:ALL[status1,status2,status3,...,status32]
[0022] f. Read the output status of all IO output channels OUTPut:ALL?
[0023] The format of the read value is<status1,status2,status3,...,status32>
[0024] g. Set the output status of the IO single output channel OUTPut[channel] <status>
[0025] h. Read the output status of the IO single output channel OUTPut[channel]?
[0026] The format of the read value is <status>
[0027] Furthermore, the command responder is specifically used to determine whether the command is a status query command based on whether the command ends with a question mark when receiving a SCPI command; split the command according to semicolons, query the corresponding nodes from top to bottom in the command tree for the split commands, and finally determine the leaf node to which the command belongs, and associate each leaf node with the control function in the Agilent M9187 driver.
[0028] Furthermore, the external PC is connected to the PXI controller via a network cable.
[0029] Furthermore, in step 4, the TCP server is a sub-function of the command responder.
[0030] Furthermore, the Agilent M9187 digital IO in step 1 is a PXI module and needs to be used with a corresponding PXI chassis and a PXI controller.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] (1) New remote control function, users can connect and control Agilent M9187 digital IO through the network, increasing the control distance and eliminating the need for on-site monitoring;
[0033] (2) New SCPI control commands are added. Users can read and control the input and output status of the Agilent M9187 digital IO by sending SCPI commands.
[0034] (3) Add a command responder to establish the association between SCPI commands and control functions in the driver program, and control the Agilent M9187 status according to the received SCPI commands. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a hardware connection diagram of Agilent M9187, PC, Agilent M9018A chassis, and Agilent M9036A controller;
[0036] Figure 2 This is the working principle diagram of the output pin of Agilent M9187;
[0037] Figure 3 The SCPI command tree for Agilent M9187 is created;
[0038] Figure 4 This is a schematic diagram of the command responder interface;
[0039] Figure 5 Define the output interface diagram for Agilent M9187;
[0040] Figure 6 This is a hardware connection diagram of Agilent M9187, PC, DC power supply, and digital multimeter. DETAILED DESCRIPTION
[0041] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0042] The following first introduces the embodiments of the present application in conjunction with the accompanying drawings.
[0043] Agilent M9187 digital IO remotely uses a PC, Agilent M9018A chassis, and Agilent M9036A controller. The PC is connected to the Agilent M9036A controller in the Agilent M9018A chassis with the Agilent M9187 installed via a network cable. Figure 1 The output pin working principle of Agilent M9187 is as follows Figure 2 shown.
[0044] Step 1, divide the functions of Agilent M9187 digital IO into two basic types: input and output; subdivide them into the following sub-functions according to the basic class: Input class: query all channel input voltages, query single channel input voltage, threshold voltage setting and reading; Output class: query all channel output voltages, set all channel output voltages, query single channel output voltage, set single channel output voltage;
[0045] Step 2: According to the SCPI instruction standards, take input (INPut) and output (OUTPut) as root nodes, and take sub-functions such as voltage threshold setting / reading, full channel setting / reading, and single channel setting / reading as leaf nodes to create the SCPI instruction tree for Agilent M9187, as shown in the following figure: Figure 3 As shown; create all the corresponding SCPI commands as follows:
[0046] a. Read the input value of all IO input channels INPut:ALL?
[0047] The format of the read value is<val1,val2,val3,...,val32>
[0048] b. Read the input value INPut[channel] of the IO single input channel?
[0049] The format of the read value is <val>
[0050] c. Set the IO full input channel input threshold 1 INPut[channel]:VOLtage:THREshold:LEVel1 <val>
[0051] d. Set the IO full input channel input threshold 2 INPut[channel]:VOLtage:THREshold:LEVel2 <val>
[0052] e. Set the output status of all IO output channels OUTPut:ALL[status1,status2,status3,...,status32]
[0053] f. Read the output status of all IO output channels OUTPut:ALL?
[0054] The format of the read value is<status1,status2,status3,...,status32>
[0055] g. Set the output status of the IO single output channel OUTPut[channel] <status>
[0056] h. Read the output status of the IO single output channel OUTPut[channel]?
[0057] The format of the read value is <status>
[0058] Step 3, create a SCPI command responder for Agilent M9187. The functions of the command responder are: when receiving a SCPI command, determine whether the command is a status query command based on whether the command ends with a question mark; split the command by semicolon, query the corresponding nodes in the command tree from top to bottom, and finally determine the leaf node to which the command belongs, and associate each leaf node with the control function in the Agilent M9187 driver;
[0059] Step 4: Create a TCP server in the SCPI command responder. The PC acts as a client and communicates with the Agilent M9187 through the TCP / IP protocol. Figure 4 As shown;
[0060] Step 5: Press the PC Figure 1 As shown, the device is connected to Agilent M9036A. When the PC sends a SCPI command, the SCPI command responder of Agilent M9187 determines the leaf node to which the command belongs according to the method in step (3), and calls the corresponding control function in the driver program to control Agilent M9187 to switch to the corresponding state (or read the current state).
[0061] The present application is described below with reference to specific examples.
[0062] Step 6: Connect the DC power supply, digital multimeter and the output interface of Agilent M9187. Figure 6 The output interface of Agilent M9187 is defined as follows: Figure 5 As shown;
[0063] Step 7, the PC sends the query command "OUTP3?" to the command responder through the network debugging assistant. Since the initial state of Agilent M9187 is off, the command responder sends the command "OFF" to the PC. At this time, the voltage measured by the digital multimeter is 0V.
[0064] Step 8, send the control command "OUTP3:SOUR", at this time the output voltage of the output pin Output3 (Pin41) is the external voltage Vext. Since the external voltage Vext is connected to the 5V output of the DC power supply, the voltage measured by the digital multimeter is 5V at this time;
[0065] Step 9, send the control command "OUTP3:OFF", at this time the output voltage of the output pin Output3 (Pin41) is the same as GND, so the voltage measured by the digital multimeter is 0V;
[0066] The above steps implement the remote control function of the Agilent M9187 digital IO output part. The remote control function of the input part is the same as the output part, so it will not be described here one by one.
[0067] The above-described embodiments of the present application do not constitute a limitation on the protection scope of the present application.< / status> < / status> < / val> < / val> < / val> < / status> < / status> < / val> < / val> < / val>
Claims
1. A method for realizing the remote control function of Agilent M9187 digital IO, characterized in that: The method comprises: Step 1, divide the functions of Agilent M9187 digital IO into two basic types: input and output; subdivide the sub-functions contained in the basic type into: the input type includes querying all channel input voltages, querying single channel input voltage, threshold voltage setting and reading; the output type includes querying all channel output voltages, setting all channel output voltages, querying single channel output voltage, and setting single channel output voltage; Step 2, according to the relevant standards of SCPI instructions, take input INPut and output OUTPut as root nodes, and take each sub-function as a leaf node to create a SCPI instruction tree; the sub-functions include voltage threshold setting / reading, full channel setting / reading, and single channel setting / reading; Step 3, create a SCPI command responder for Agilent M9187; the command responder is used to convert the received SCPI command into the corresponding control function of each leaf node of Agilent M9187 digital IO; Step 4, create a TCP server in the SCPI command responder, so that the external PC can connect to the Agilent M9187 digital IO as a client through the TCP / IP protocol and send the SCPI command designed in step 2 to the Agilent M9187 digital IO; Step 5, when the external PC sends a SCPI command to the Agilent M9187 digital IO, the command responder controls the Agilent M9187 digital IO to switch to the state corresponding to the sub-function or reads the current state.
2. The method according to claim 1, characterized in that In step 2, the SCPI commands correspond to the following: a. Read the input values of all IO input channels: INPut:ALL? The format of the read value is:<val1,val2,val3,...,val32> b. Read the input value of the IO single input channel: INPut[channel]? The format of the read value is: <val>< / val> c. Set the IO full input channel input threshold 1: INPut[channel]:VOLtage:THREshold:LEVel1 <val>< / val> d. Set the IO full input channel input threshold 2: INPut[channel]:VOLtage:THREshold:LEVel2 <val>< / val> e. Set the output status of all IO output channels: OUTPut:ALL[status1,status2,status3,...,status32] f. Read the output status of all IO output channels: OUTPut:ALL? The format of the read value is:<status1,status2,status3,...,status32> g. Set the output status of the IO single output channel: OUTPut[channel] <status>< / status> h. Read the output status of the IO single output channel: OUTPut[channel]? The format of the read value is: <status> 。< / status> 3. The method according to claim 1, characterized in that The command responder is specifically used to determine whether the command is a status query command based on whether the command ends with a question mark when receiving a SCPI command; split the command according to semicolons, query the corresponding nodes of the split commands from top to bottom in the command tree, and finally determine the leaf node to which the command belongs, and associate each leaf node with the control function in the Agilent M9187 driver.
4. The method according to claim 1, characterized in that: The external PC and PXI controller are connected via a network cable.
5. The method according to claim 1, characterized in that In step 4, the TCP server is a sub-function of the command responder.
6. The method according to claim 1, characterized in that The Agilent M9187 digital IO in step 1 is a PXI module and must be used with the corresponding PXI chassis and PXI controller.
Citation Information
Patent Citations
Bus control system and method
CN115794689A
