Microsoft, Visual C++, Excel, and Windows are either registered trademarks or trademarks of
Microsoft Corporation in the United States and/or other countries.
Document number: 4200A-KXCI-907-01 Rev. C June 2022
Safety precaut ions
The following safety precautio ns should be observed before using this product and any associated ins tr um enta tion . Alt ho ugh
some instruments and accessories would normally be used with nonhazardous voltages, there are situations where hazardous
conditions may be present.
This product is intended for use by personnel who recognize shock hazards and are familiar with the safety precautions required
to avoid possible injury. Read and follow all installation, operation, and maintenance information carefully before using the
product. Refer to the user documentation for complete product specifications.
If the product is used in a manner not specified, the protection provided by the product warranty may be impaired.
The types of product users are:
Responsible body is the individual or group responsible for the use and maintenance of equipment, for ensuring that the
equipment is operated within its specifications and operating limits, and for ensuring that operators are adequately trained.
Operators use the product for its intended function. They must be trained in electrical safety procedures and proper use of the
instrument. They must be protected from electric shock and contact with hazardous live circuits.
Maintenance personnel perform routine procedures on the product to keep it operating properly, for example, setting the line
voltage or replacing consumable materials. Maintenance procedures are described in the user documentation. The procedures
explicitly state if the operator may perform them. Otherwise, they should be performed only by service personnel.
Service personnel are trained to work on live circuits, perform safe installations, and repair products. Only properly trained
service personnel may perform installation and service procedures.
Keithley products are designed for use with electrical signals that are measurement, control, and data I/O connections, with low
transient overvoltages, and must not be directly connected to mains voltage or to voltage sources with high transient
overvoltages. Measurement Category II (as referenced in IEC 60664) connections require protection for high transient
overvoltages often associate d with local AC mains connections. Certain Keithley measuring instruments may be connected to
mains. These instruments will be marked as category II or higher.
Unless explicitly allowed in the specifications, operating manual, and instrument labels, do not connect any instrument to mains.
Exercise extreme caution when a shock hazard is present. Lethal voltage may be present on cable connector jacks or test
fixtures. The American National Standards Institute (ANSI) states that a shock hazard exists when voltage levels greater than
30 V RMS, 42.4 V peak, or 60 VDC are present. A good safety practice is to expect that hazardous voltage is present in any
unknown circuit before measuring.
Operators of this product must be protected from electric shock at all times. The responsible body must ensure that operators
are prevented access and/or insulated from every connection point. In some cases, connections must be exposed to potential
human contact. Product operators in these circumstances must be trained to protect themselves from the risk of electric shock. If
the circuit is capable of operating at or above 1000 V, no conductive part of the circuit may be exposed.
Do not connect switching cards directly to unlimited power circuits. They are intended to be used with impedance-limited
sources. NEVER connect switching cards directly to AC mains. When connecting sources to switching cards, install protective
devices to limit fault current and voltage to the card.
Before operating an instrument, ensure that the line cord is connected to a properly-grounded power receptacle. Inspect the
connecting cables, test leads, and jumpers for possible wear, cracks, or breaks before each use.
When installing equipment where access to the main power cord is restricted, such as rack mounting, a separate main input
power disconnect device must be provided in close proximity to the equipment and within easy reach of the operator.
For maximum safety, do not touch the product, test cables, or any other instruments while power is applied to the circuit under
test. ALWAYS remove power from the entire test system and discharge any capacitors before: connecting or disconnecting
cables or jumpers, installing or removing switching cards, or making internal changes, such as installing or removing jumpers.
Do not touch any object that could provide a current path to the common side of the circuit under test or power line (earth)
ground. Always make measurements with dry hands while standing on a dry, insulated surface capable of withstanding the
voltage being measured.
For safety, instruments and accessories must be used in accordance with the operating instructions. If the instruments or
accessories are used in a manner not specified in the operating instructions, the protection provided by the equipment may be
impaired.
Do not exceed the maximum signal levels of the instruments and accessories. Maximum signal levels are defined in the
specifications and operating information and shown on the instrument panels, test fixture panels, and switching cards.
When fuses are used in a product, replace with the same type and rating for continued protection against fire hazard.
Chassis connections must only be used as shield connections for measuring circuits, NOT as protective earth (safety ground)
connections.
If you are using a test fixture, keep the lid closed while power is applied to the device under test. Safe operation requires the use
of a lid interlock.
If a screw is present, connect it to protective earth (safety ground) using the wire recommended in the user docume ntat io n.
The symbol on an instrument means caution, risk of hazard. The user must refer to the operating instructions located in the
user documentation in all cases where the symbol is mark ed on the instr u ment .
The symbol on an instrument means warning, risk of electric shock. Use standard safety precautions to avoid personal
contact with these voltages.
The symbol on an instrument shows that the surface may be hot. Avoid personal contact to prevent burns.
The symbol indicates a connection terminal to the equipment frame.
If this symbol is on a product, it indicates that mercury is present in the display lamp. Please note that the lamp must be
properly disposed of according to federal, state, and local laws.
The WARNING heading in the user documentation explains hazards that might result in personal injury or death. Always read
the associated information very carefully before performing the indicated procedure.
The CAUTION heading in the user documentation explains h azard s that coul d dama ge the instrument. Such damage may
invalidate the warranty.
The CAUTION heading with the symbol in the user documentation explains hazards that could result in moderate or minor
injury or damage the instrument. Always read the as soc iate d infor mation very carefully before performing the indicated
procedure. Damage to the instrument may invalidate the warranty.
Instrumentation and accessories shall not be connected to humans.
Before performing any maintenance, disconnect the line cord and all test cables.
To maintain protection from electric shock and fire, replacement components in mains circuits — including the power
transformer, test leads, and input jacks — must be purchased from Keithley. Standard fuses with applicable national safety
approvals may be used if the rating and type are the same. The detachable mains power cord provided with the instrument may
only be replaced with a similarly rated power cord. Other components that are not safety-related may be purchased from other
suppliers as long as they are equivalent to the original component (note that selected parts should be purchased only through
Keithley to maintain accuracy and functionality of the product). If you are unsure about the applicability of a replacement
component, call a Keithley office for information.
Unless otherwise noted in product-specific literature, Keithley instruments are designed to operate indoors only, in the following
environment: Altitude at or below 2,000 m (6,562 ft); temperature 0 °C to 50 °C (32 °F to 122 °F); and pollution degree 1 or 2.
To clean an instrument, use a cloth dampened with deionized water or mild, water-based cleaner. Clean the exterior of the
instrument only. Do not apply cleaner directly to the instrument or allow liquids to enter or spill on the instrument. Products that
consist of a circuit board with no case or chassis (e.g., a data acquisition board for installation into a computer) should never
require cleaning if handled according to instructions. If the board becomes contaminated and operation is affected, the board
should be returned to the factory for proper cleaning/servicing.
With Keithley External Control Interface (KXCI), you can use an external computer to control the
source-measure units (SMUs), capacitance-voltage units (CVUs), and pulse generator units (PMU) in
the 4200A-SCS directly. KXCI also provides you with indirect control of pulse measure units (PMUs),
using user test modules (UTMs) through GPIB or ethernet connections.
Section 1
Introduction
For the SMUs, the KXCI command set includes an HP 4145 compatibility mode, allowing many
programs already developed for the HP4145 to be used on the 4200A-SCS instead.
This document contains:
•KXCI communication connections: Describes the hardware and software set up for GPIB and
ethernet communications.
•KXCI user interface: Describes how to use the KXCI user interface, which is used to control
GPIB operation.
•KXCI common commands: Descriptions of common commands, such as ID commands,
reading commands, and reset commands.
•KXCI SMU commands: Descriptions of the commands used to set up and control SMUs in user
mode and system mode.
•KXCI CVU commands: Descriptions of the commands used to control the CVU using KXCI in
both user mode and system mode.
•KXCI pulse generator commands: Descriptions of the commands used to control pulse
You can communicate with the 4200A-SCS using GPIB or ethernet connections. The connections for
each are described in the following topics.
Section 2
The locations of the connections are shown in the following figure.
Figure 1: GPIB and ethernet connectors on the 4200A-SCS
Section
Programming
2: KXCI communication connections Model 4200A-SCS KXCI Remote Control
GPIB connections
The GPIB cable is the IEEE-488 instrumentation data bus with hardware and programming standards
originally adopted by the Institute of Electrical and Electronic Engineers (IEEE) in 1975. The 4200ASCS conforms to these standards:
• IEEE-488.1-1987
• IEEE-488.2-1992
To connect the 4200A-SCS, use a GPIB cable equipped with standard GPIB connectors, as shown in
the figure below. Either end of this cable mates to the GPIB connector on the rear panel of the
4200A-SCS. Connect the other end of the cable to the GPIB connector on the computer.
The connectors on the cable are stackable to allow GPIB connection to other instruments. However,
to avoid damage, do not stack more than three connectors on any one unit.
To minimize interference caused by electromagnetic radiation, use shielded GPIB cables.
Ethernet connections
Use a standard cable (CAT-5, RJ-45 terminated) to connect to the 4200A-SCS, as shown in the
figure in Communications connections (on page 2-1).
Figure 2: Standard IEEE-488 connectors
The ethernet cable must be connected to the network, not directly to a computer.
2-2 4200A-SCS-907-01 Rev. C June 2022
Model 4200A
KXCI communication connections
-SCS KXCI Remote Control Programming Section 2:
Using KCon to configure KXCI
You use the Keithley Configuration Utility (KCon) to configure KXCI communications.
If you need to set up the 4200A-SCS as a subordinate on a GPIB or ethernet system, you do the
initial setup through the KCon KXCI Settings. This allows you to use an external computer to remotely
control the 4200A-SCS over GPIB or ethernet.
You can also use KXCI to set up emulation for Keysight 4145B Semiconductor Parameter Analyzers.
In many cases, test programs developed for use with a Keysight 4145B run without modification when
they are used with a 4200A-SCS running KXCI.
For more information on KCon, refer to “Keithley Configuration Utility (KCon)” in Model 4200A-SCS Setup and Maintenance.
Before opening KCon to change the present KXCI configuration, you must close KXCI.
The presently selected communications interface (GPIB or ethernet) and its settings are displayed in
the KXCI console. By default, the 4200A-SCS is set up for GPIB remote control. The command and
message area below the KXCI settings displays sent commands, KXCI error messages, and
numerical test results (refer to Using KXCI (on page 3-1
)).
Set up KXCI for GPIB control
To set up GPIB control:
1. Open KCon.
2. Select KXCI Settings. The KXCI Settings dialog box is displayed, as shown in the
following figure.
Figure 3: KXCI Settings dialog box
4200A-SCS-907-01 Rev. C June 2022 2-3
Section
Programming
2: KXCI communication connections Model 4200A-SCS KXCI Remote Control
3. Set Communications to GPIB.
4. Set the GPIB Address. This is the primary address of the 4200A-SCS when operating under
KXCI control. If the selected GPIB address conflicts with the GPIB address of another system
component, a red exclamation-point symbol (!) is displayed next to the selected address.
5. Set the Reading Delimiter to determine the output data delimiter characters that are added to
the end of each KXCI output message:
Select String Terminator to use a character.
Select Comma to terminate output data with a comma (,).
6. If you selected String Terminator, select the type of Character:
None to use no character.
CR to use a carriage return.
LF to use a line feed.
CR/LF to use a carriage return and line feed character sequence.
7. If String Terminator is selected, select EOI ON or EOI OFF. The EOI setting determines if the
4200A-SCS asserts the GPIB End Or Identify (EOI) signal with the last byte of each output data
message.
When KXCI starts, the status messages look similar to the following figure when GPIB is set up.
Figure 4: KXCI status when GPIB selected
8. Select OK.
2-4 4200A-SCS-907-01 Rev. C June 2022
Model 4200A
KXCI communication connections
-SCS KXCI Remote Control Programming Section 2:
Set up KXCI for ethernet control
To set up ethernet control:
1. Open KCon.
2. Select KXCI Settings. The KXCI Settings dialog box is displayed.
3. Set Communications to Ethernet.
4. Set the Port Number (the default is 1225, which is acceptable for most installations). Make note
of the port number for use in the code.
5. Select a Reading Delimiter. The delimiter determines if the delimiter for output data is a string
terminator or a comma.
6. If you selected String Terminator, select the Character. The options are:
None to use no character. Recommended to avoid extra termination characters. The 4200A-
SCS automatically adds a null character as a terminator.
CR to use a carriage return.
LF to use a line feed.
CR/LF to use a carriage return and line feed character sequence.
7. Select OK.
When KXCI starts, the status messages look similar to the following figure when ethernet is set up.
Figure 5: KXCI status when ethernet is selected
4200A-SCS-907-01 Rev. C June 2022 2-5
Section
Programming
String reported in response to ID query
KI4200A Vx.x.x (where
ID HP4145B 1.1,1.0
GPIB data resolution
7 digits
5 digits
Maximum number of sweep points
4096
1024
Possible instrument configurations
8 source-measure units (SMU), voltmeters (VM), or
voltage-sources (VS)
Configuration query
*OPT? command
Not supported
Instrument self test
SMUs only
Not supported
Custom A/D control
IT4 command options
Not supported
200 V, 1 A capability
Supported
1.0 pA source/measure-range capabil it y
Supported
Source measure units (SMUs)
2 to 9
4 (fixed)
Voltage meter (VM)
You can configure up to nine SMUs to function as
2 (fixed)
Voltage source (VS)
You can configure up to nine SMUs to function as
2 (fixed)
2: KXCI communication connections Model 4200A-SCS KXCI Remote Control
Setting up KXCI as a 4145B emulator
Although the KXCI command set is similar to the Keysight 4145B command set, the 4200A-SCS and
Keysight 4145B hardware are different. To use existing 4145B code with the 4200A-SCS, you need
to set up the 4200A-SCS SMUs to map to the 4145B instrument numbers. In many cases, test
programs developed for use with a Keysight 4145B run without modification when they are used with
a 4200A-SCS running KXCI. When a mode is selected, KXCI always starts in that mode.
The following table summarizes some differences and similarities between the modes.
Mode comparison
Mode
Characteristic
(with preamplifier on SMU)
4200A (Normal) 4145 Emulation
x.x.x is the version number)
The main difference between the two instruments is that the 4200A-SCS hardware is modular and the
Keysight 4145B hardware is fixed, as shown in the following table.
Hardware comparisons
Instrument type Keithley Instruments 4200A-SCS Keysight 4145B
voltage meters.
2-6 4200A-SCS-907-01 Rev. C June 2022
voltage sources.
Model 4200A
KXCI communication connections
VM1...VM8
Instructs the 4200-SMU, 4201-SMU, 4210-SMU, or 4211-SMU to emulate
VS1...VS8
Instructs the 4200-SMU, 420 1-SMU, 4210-SMU, or 4211-SMU to emulate
-SCS KXCI Remote Control Programming Section 2:
KCon manages these hardware differences by allowing you to assign source-measure unit (SMU),
voltage meter, or voltage source functions to any 4200A-SCS SMU, as shown in the following table.
KXCI SMU function assignment
Function selection Description
SMU
Instructs the 4200-SMU, 420 1-SMU, 4210-SMU, or 4211-SMU to emulate
a Keysight 4145B Source Measure Unit.
(voltage meter)
a Keysight 4145B VM1 or VM2 and additional voltage meters (VMs). You
can map up to eight VMs to SMUs. You can assign a VM any number from
1 to 8, regardless of the number of SMUs in the system. Each VM number
(voltage source)
must be unique.
the capabilities of a Keysight 4145B VS1 or VS2 and additional voltage
sources (VSs). You can map up to eight VSs to SMUs. You can assign a
VS any number from 1 to 8, regardless of the number of SMUs in the
system. Each VS number must be unique.
To set up 4145B emulation:
1. Open KCon.
2. Select KXCI Settings. The KXCI Settings dialog box is displayed, as shown in the following
figure.
3. In the Function column, select the 4145 function that the SMU will emulate.
4. In the Number column, select the number that is used for the device in your 4145B program.
Figure 6: KXCI Settings for 4145B emulation
4200A-SCS-907-01 Rev. C June 2022 2-7
Section
Programming
2: KXCI communication connections Model 4200A-SCS KXCI Remote Control
GPIB communications
You cannot run Clarius and KXCI at the same time. When Clarius is running, the 4200A-SCS is the
controller and controls all internal and external instruments. When KXCI is running, the 4200A-SCS
is a subordinate to a controlling computer.
To start KXCI:
1. Close Clarius.
2. Select the KXCI icon on the desktop.
The KXCI user interface opens.
The GPIB Status indicators only apply if communications is set to GPIB.
Figure 7: KXCI user interface
2-8 4200A-SCS-907-01 Rev. C June 2022
Model 4200A
KXCI communication connections
-999
IEEE32.DLL GPIB driver is not loaded.
-998
Unable to initialize shared memory.
-997
Could not establish communication with console.
-996
GPIB address not sent as argv[1].
-995
GPIB address not in 0<= addr <= 31.
-994
Could not find configuration file.
-993
GPIB argument error.
-992
GPIB command error.
-991
Illegal setup error.
-990
Trigger Master card not found.
-989
Command not valid on this page.
-988
Instrument not mapped.
-987
Skipping instrument.
-986
Unsupported command received.
-985
Unsupported file format error.
-984
Could not open specified file.
-980
Command not valid during test execution.
-975
Command not valid in user mode.
-SCS KXCI Remote Control Programming Section 2:
GPIB status indicators (GPIB communications only)
After KXCI is started, indicators in the GPIB Status box report interface status. A green indicator
signals the present status:
• SRQ: Turns on when an error or operating condition occurs.
• LTN: When on, instrument is in the listener active state.
• TLK: When on, instrument is in the talker active state.
• RMT: When on, instrument is in the remote state.
If KXCI is running as a subordinate in a GPIB system, you may see the warning, “Access to all GPIB
nstruments from the 4200 as controller are illegal.” This error occurs if you try to control other
i
devices through user library modules. A subordinate node cannot control devices in the system.
Graph display
In response to optional graphics commands, the right side of the KXCI user interface displays a graph
of the test results. To hide the graph, select Hide Graph, which provides a larger display area for
commands, error messages, and test results.
Error messages
KXCI error messages and numbers are shown in the following table.
Error number Error message
4200A-SCS-907-01 Rev. C June 2022 2-9
Section
Programming
2: KXCI communication connections Model 4200A-SCS KXCI Remote Control
Ethernet communications
The 4200A-SCS is not LXI complia nt, so be aware of the following communications considerations
when using ethernet communications:
• Commands must always be terminated with null. If not, KXCI will not read and echo them.
• Ethernet commands always return a response. Commands that do not normally return a
response respond with an acknowledge message and a null terminator (ACK\0).
•Commands that normally return a string or numerical data return that data terminated with the
character that was set in KCon and a null terminator.
If you do not receive data as expected, there may have been an error with the command. Check the
KXCI console for error messages. The command may have been sent too soon or had a syntax error.
Another potential problem is that there are responses waiting in the buffer that must be cleared before
the data can be returned.
KXCI ethernet client driver
A KXCI client driver (32-bit or 64-bit) controls KXCI through the ethernet. You can copy this driver to
your controlling computer. The DLL is stand-alone. It does not depend on any other DLLs, so it can
be easily moved or copied.
The driver DLLs are named KXCIclient.dll (32-bit) and KXCIclient64.dll (64-bit) and are at
the command path: C:\s4200\sys\bin
The KXCIclient.lib (32-bit) and KXCIclient64.lib (64-bit) files are at the command path:
C:\s4200\sys\lib
For convenience, a C-language header file (KXCIclient.h) is included with the above paths. It is at
the command path:
C:\s4200\sys\include
2-10 4200A-SCS-907-01 Rev. C June 2022
Model 4200A
KXCI communication connections
*IDN?\0
KEITHLEY INSTRUMENTS,KI4200A,1442736,V1.8.1\r\0
CH1, 'VS', 'IS', 1, 3\0
ACK\0
ME\0
ACK\0
DO 'ID'\0
N 4.3555E-15,N 54.978E-15,…N 449.83E-15\r\0
-SCS KXCI Remote Control Programming Section 2:
Driver functions
The KXCIclient.dll driver has the following functions:
• int OpenKXCIConnection_C(char *IPAddrStr, int PortNum, int *err);
• IPAddrStr: IP address in string format nnn.nn.nn.nn (for example, 129.22.35.17)
• PortNum: IP Port assigned in the KXCI tab of KCon
• err: Socket error code returned by WSAGetLastError()
int SendKXCICommand_C(char *cmdstr, char *ReturnString, int *err);
• cmdstr: KXCI command string, for example, "DE;CH1;CH2"
• ReturnString: Data returned by command, if any. If input command results in data to be
returned, it is placed here
•err: Socket error code returned by WSAGetLastError()
int GetKXCISpollByte_C(unsigned short *spbyte, int *err);
• spbyte: KXCI serial poll byte (same as GPIB byte)
• err: Socket error code returned by WSAGetLastError()
void CloseKXCIConnection_C(void);
Example write and read with ethernet
The following commands and their responses were made with communications set to
comma-separated data with the character set to carriage return (CR). These settings are made in
KCon in the KXCI Settings option.
Written command Response
4200A-SCS-907-01 Rev. C June 2022 2-11
Logging commands, errors, and test results .............................3-9
In this section:
Using KXCI ...............................................................................3-1
Output data formats ..................................................................3-1
Status byte and serial polling ....................................................3-4
The 4200A-SCS is ready to accept commands immediately after you start KXCI.
For command information, refer to Control commands (on page 5-4), KXCI SMU commands (on page
5-1), KXCI CVU commands (on page 6-1), and KXCI pulse generator commands (on page 7-1).
Output data formats
The following topics describe the data formats for system mode and user mode readings.
The hierarchy for data status is L, V, X, C, T, N:
• L: Interval too short
• V: Overflow reading (A/D converter saturated)
• X: Oscillation
• C: This channel in compliance
• T: Other channel in compliance
• N: Normal
Section
Programming
3: Using KXCI Model 4200A-SCS KXCI Remote Control
Data format for system mode readings
For system mode operation, use the DO command to get one or more triggered readings. After
sending the DO command s tr ing and ad dres s ing the 42 00A-SCS to talk, the output data string is sent
to the computer in the following format:
X±N.NNNNE±NN,X±N.NNNNE±NN,...X±N.NNNNE±NN
Where X is the data status and N is the reading.
Scientific notation for the reading exponent:
E+00 = 0
-3
-6
-9
-12
(m)
(μ)
(n)
(p)
E-03 = 10
E-06 = 10
E-09 = 10
E-12 = 10
Data format for user mode readings
For user mode operation, use the TI or TV command string to trigger and make a reading. After
sending the TI or TV command string and addressing the 4200A-SCS to talk, the output data string is
sent to the computer in the following format:
XYZ ±N.NNNN E±NN
Where X is the data status, Y is the instrument, Z is the measure mode, and N is the measurement. Y
and Z are defined in the following tables.
3-2 4200A-SCS-907-01 Rev. C June 2022
Model 4200A
Using KXCI
Y =
A
SMU1
B
SMU2
C
SMU3
D
SMU4
E
VM1
F
VM2
G
SMU5
H
SMU6
I
SMU7
J
SMU8
K
VM3
L
VM4
M
VM5
N
VM6
O
VM7
P
VM8
Y =
A
SMU1
B
SMU2
C
SMU3
D
SMU4
E
SMU5
F
SMU6
G
SMU7
H
SMU8
Z =
V
Voltage
I
Current
-SCS KXCI Remote Control Programming Section 3:
Voltage measure mode specified (Z = V; see following tables).
Current measure mode specified (Z = I; see below)
Measure mode
Reading (mantissa and exponent)
±N.NNNN E±NN
Scientific notation for the reading exponent:
E
+00 = 0
-3
-6
-9
-12
(m)
(μ)
(n)
(p)
E-03 = 10
E-06 = 10
E-09 = 10
E-12 = 10
4200A-SCS-907-01 Rev. C June 2022 3-3
Section
Programming
—
RQS
—
Busy
— — Syntax
error
Data
ready
—
0/1 — 0/1 — —
0/1
0/1
—
64 — 16 — — 2 1
3: Using KXCI Model 4200A-SCS KXCI Remote Control
Status byte and serial polling
The status byte is an 8-bit register that provides status infor mat ion on ins trum ent o perati on. Wh en a
particular operating condition occurs, one or more bits of the status byte sets.
You can use serial polling to read the status byte.
The following sections describe the status byte and serial polling.
Status byte
The status byte is an 8-bit register that provides status infor mat ion on ins trum ent o perati on. Wh en an
operating condition occurs, one or more bits of the status byte are set. The status byte register is
shown in the following table.
Status byte register
Bit B7 B6 B5 B4 B3 B2 B1 B0
Condition
Binary value
Decimal weight
The bits of the status byte register that are used are described in the following topics.
Bit B0, Data Ready
This bit sets (1) when all measurements are completed and data is ready to be output on the GPIB.
Any of the following actions clear (0) bit B0:
• Clears (0) when the data transfer starts.
• Clears (0) when the BC (buffer clear) command is sent to the 4200A-SCS.
• Clears (0) when the 4200A-SCS is serial polled.
Bit B1, Syntax Error
This bit sets (1) when an invalid command string is sent to the 4200A-SCS. Any of the following
actions clear (0) bit B1:
• When the 4200A-SC S is ser ial polled.
• When a device clear command (DCL or SDC) is sent to the 4200A-SCS.
Bit B4, Busy
This bit is set (1) while a measurement is made. It clears (0) when the measurement is completed.
3-4 4200A-SCS-907-01 Rev. C June 2022
Model 4200A
Using KXCI
-SCS KXCI Remote Control Programming Section 3:
Bit B6, RQS (request for service)
This bit sets (1) whenever bit B1 (syntax error) sets. If service request for data ready is enabled (DR1
asserted), bit B6 will set whenever bit B0 (data ready) sets. If service request for data ready is
disabled (DR0 asserted), bit B6 will not be affected by bit B0.
Bit B6 remains set until one of the following actions occur:
• Clears (0) when the 4200A-SCS is serial polled.
• Clears (0) when a device clear command (DCL or SDC) is sent to the 4200A-SCS.
When bit B6 sets, the SRQ (service request) indicator on the KXCI user interface turns on. It turns off
when B6 is cleared.
Serial polling
The serial poll enable (SPE) and serial poll disable (SPD) general bus command sequence is used to
serial poll the 4200A-SCS. Serial polling reads the status byte. Generally, the controller uses the
serial polling sequence to determine which of several instruments has requested service with the
SRQ line. However, the status byte of the 4200A-SCS may be read to determin e when an oper a tin g
condition has occurred.
If you try to get data before all the measurements in a test are completed, an error occurs. To prevent
this, you can use serial polling in a program fragment to monitor the data ready bit (B0) of the status
byte. When B0 sets, which indicates that data is ready, the program obtains the measurement data.
After the source-measure testing process is triggered to start (ME1 is sent to start a sweep), the
following C-language programming statement serial polls the instrument:
spoll(addr, &poll, &status);
Waiting for SRQ
Instead of serial polling the 4200A-SCS to detect an SRQ, you can monitor the service request line.
When an SRQ occurs, the SRQ line is asserted.
If you are using GPIB connections, you can use the following C-language programming routine stop
program execution until an SRQ occurs .
send(addr, "DR1", &status);
while(!srq());
The first statement enables service request for data ready. The second command holds up program
execution until the SRQ (data ready) occurs.
For ethernet connections, you can use the SP command to monitor the service request line.
4200A-SCS-907-01 Rev. C June 2022 3-5
Section
Programming
3: Using KXCI Model 4200A-SCS KXCI Remote Control
Sample programs
Three sample programs (using the C language) are provided to demonstrate system control using an
external computer communicating through GPIB. For these programs, configure KXCI as follows:
• GPIB address: 17
• Delimiter: Comma
• EOI: Off
Program 1: VAR1 and VAR2 sweep (system mode)
The following program demonstrates how to program the 4200A-SCS to perform a VAR1 and VAR2
sweep. It assumes that channels 1 through 4 of KXCI are configured for the SMU function.
MAXLEN = 2048;
addr = 17;
// Initialize card:
initialize(10, 0);
// Set speed to 0.01 PLC, clear buffer, and
// enable service request for data ready:
send(addr, "IT1 BC DR1",&status);
// Channel definition for SMU1; constant common:
send(addr, "DE CH1,'VE','IE',3,3", &status);
// Define SMU2 for VAR2 I sweep:
send(addr, "CH2,'VB','IB',2,2", &status);
// Define SMU3 for VAR1 V sweep:
send(addr, "CH3,'VC','IC',1,1", &status);
// Define SMU 4 to be off:
send(addr, "CH4", &status);
// Define V-sources and V-meters to be off:
send(addr, "VS1;VS2;VM1;VM2", &status);
// Source setup; VAR1 linear sweep from 0 V to 1 V in 50 mV
// steps, with I-compliance set to 50 mA:
send(addr, "SS VR1,0,1,0.05,50E-3", &status);
// Source setup; VAR2 sweep from 0 uA to 40 uA in 10 uA steps:
send(addr, "IP 10E-6,10E-6,4,3", &status);
// Select list display mode:
send(addr, "SM DM2", &status);
// Trigger start of test:
send(addr, "MD ME1", &status);
3-6 4200A-SCS-907-01 Rev. C June 2022
Model 4200A
Using KXCI
-SCS KXCI Remote Control Programming Section 3:
// Wait for data ready:
while(!srq());
// Save readings in a file named "PROG1":
send(addr, "SV 'D PROG1'", &status);
Program 2: Basic source-measure (user mode)
The following program demonstrates how to program the 4200A-SCS to perform a basic sourcemeasure operation. It assumes that channels 1 and 2 of KXCI are configured for the SMU function.
The measured current reading performed by SMU1 (channel 1) is output to the computer.
MAXLEN = 2048;
addr = 17;
// Initialize card:
initialize(10, 0);
// Select user mode:
send(addr, "US", &status);
// Set speed to 0.01 PLC, clear buffer;
// enable service request for data ready:
send(addr, "IT1 BC DR1",&status);
// Set SMU1 to source 1.5 V on 20 V range; set compliance
// to 1 mA:
send(addr, "DV1,1, 1.5, 1E-3", &status);
// Set SMU2 to source 2 V on 20 V range; set compliance to 1 mA:
send(addr, "DV2,1,2,1E-3", &status);
// Trigger test; measure current using SMU1:
send(addr, "TI1", &status);
// Get reading:
enter(recv, MAXLEN, &len, addr, &status);
The following program demonstrates how to retrieve readings that are saved in a data file. In
Program 1, SMU3 performed 80 measurements. The 80 current readings were then saved in a data
file named 'PROG1'.
The following program assumes that data file PROG1 al
Program 1.
4200A-SCS-907-01 Rev. C June 2022 3-7
ready exists. This data file is created by
Section
Programming
3: Using KXCI Model 4200A-SCS KXCI Remote Control
MAXLEN = 2048;
addr = 17;
// Initialize card:
initialize(10, 0);
// Load data saved in file named "PROG1":
send(addr, "GT 'D PROG1'", &status);
// Output data; 'IC' is the measure channel (SMU3) used by
// Program 1:
send(addr, "DO 'IC'", &status);
Program 4: VAR1 sweep with real-time data retrieval
The following program demonstrates how to program the 4200A-SCS to perform a VAR1 sweep and
retrieve data in real time. It assumes that channels 1 and 2 of KXCI are configured for the
SMU function.
MAXLEN = 2048;
MAXTIMEOUT = 10000;
addr = 17;
// Initialize card:
initialize(10, 0);
// Set speed to 0.01 PLC, clear buffer, and
// enable service request for data ready:
send(addr, "IT1 BC DR1",&status);
// Channel definition for SMU1; VAR1 V sweep:
send(addr, "DE CH1,'V1','I1',1,1", &status);
// Channel definition for SMU2; constant common:
send(addr, "DE CH1,'V2','I2',3,3", &status);
// Source setup
// VAR1 linear sweep from -5V to 5V in 10 mV with 1mA compliance
numPoints = 1001;
send(addr, "SS VR1,-5,5,0.01,0.001", &status);
// Select list display mode (no graph):
send(addr, "SM DM2", &status);
// Trigger start of test:
send(addr, "MD ME1", &status);
3-8 4200A-SCS-907-01 Rev. C June 2022
Model 420
Using KXCI
0A-SCS KXCI Remote Control Programming Section 3:
// Get data at real time:
curPoint = 1;
timeoutCount = 0;
while (curPoint <= numPoints && timeoutCount < MAXTIMEOUT)
{
Sleep(100);
//Get timestamp for the present data point
//It should be none zero for already completed reading
sprintf(command, "RD'CH1T',%d", curPoint);
send(addr, command, &status);
// Get reading:
enter(recv, MAXLEN, &len, addr, &status);
if (len > 0)
{
//0 character return means no readings are ready for this data point
if (!(len == 1 && recv[0] == '0')
{
//Get voltage reading for curPoint
sprintf(command, "RD'V1',%d", curPoint);
send(addr, command, &status);
enter(recv, MAXLEN, &len, addr, &status);
//Get current reading for curPoint
sprintf(command, "RD'I1',%d", curPoint);
send(addr, command, &status);
enter(recv, MAXLEN, &len, addr, &status);
//Switch to next point
curPoint++;
}
}
timeoutCount++;
}
Logging commands, errors, and test results
When you send commands, KXCI logs the commands, error messages, and test results as described
in the following topics.
To stop operation, close KXCI by selecting Exit.
4200A-SCS-907-01 Rev. C June 2022 3-9
Loading...
+ 103 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.