API Reference
- Updated2025-09-22
- 16 minute(s) read
The Semiconductor Device Control Add-On supports programming with LabVIEW, .NET, and Python. Each language provides a set of scripts you can use to interact with the devices, registers, and fields defined in a hardware configuration exported from InstrumentStudio.
Instantiate and Destroy Session API
The Semiconductor Device Control Add-On provides APIs to instantiate and destroy device control sessions that you must use at the beginning and end of your device control program. The name of these API calls differs between .NET and the other programming languages, but the functionality is consistent across all languages.
| API Call | Description | Inputs |
|---|---|---|
| Instantiate Semi Device Control Main Create Semi Device Control Session | Creates and returns a device control session using the InstrumentStudio export configuration, which contains the register map and hardware configuration from the Semiconductor Device Control Add-On. |
|
| Destroy Semi Device Control Session | Destroys the device session and deallocates the reserved reference and data in memory. | — |
| Attach Semi Device Control Session | Attaches to an existing instantiated device control session and returns the session. | — |
| API Call | Description | Inputs |
|---|---|---|
| Instantiate | Creates and returns a device control session using the InstrumentStudio export configuration, which contains the register map and hardware configuration from the Semiconductor Device Control Add-On. |
|
| Destroy | Destroys the device session and deallocates the reserved reference and data in memory. | — |
| Attach Session | Attaches to an existing instantiated device control session and returns the session. | — |
Python API
| API Call | Description | Inputs |
|---|---|---|
| Generate Device Elements | Generates a class file that contains registers and fields from the register map and stores the class file in the specified directory. If the directory input is empty, the class file will be stored in the working directory. |
|
Shared API
The following tables define the API calls that are available in all programming languages for the Semiconductor Device Control Add-On.
| API Call | Description | Inputs |
|---|---|---|
| Start | Starts the device control session through the InstrumentStudio export configuration. | — |
| Stop | Stops the device control session. | — |
| Write from Cache to Device | Writes all cache register data to the device in the order it was stored in the cache memory. The cache clears automatically after this operation is complete. | — |
| Clear Cache | Clears all cached register data from the device control session. | — |
| Get Register Address | Returns the list of unique IDs and addresses of all registers defined in the register map. | — |
| Get Field Definition Details | Returns the display value, numeric value, and the size of the field. The field unique ID is a string in the following format: IP Block/Device Name-Register Group-Field Name. |
|
| API Call | Description | Inputs |
|---|---|---|
| Write Register by Name (Device) | Writes the data to the device using the register unique name. The register unique name is a string in the following format: Device Name-Register Group-Register Name. |
|
| Read Register by Name (Device) | Reads the data from the device using the register unique name. The register unique name is a string in the following format: Device Name-Register Group-Register Name. |
|
| Write Register by Address (Device) | Writes the data to the device using the register address and device name from the register map. |
|
| Read Register by Address (Device) | Reads the data from the device using the register address and device name from the register map. |
|
| Write Field by Name (Device) | Writes the data to the device using the field unique name. The field unique name is a string in the following format: Device Name-Register Group-Field Name. |
|
| Read Field by Name (Device) | Reads the data from the device using the field unique name. The field unique name is a string in the following format: Device Name-Register Group-Field Name. |
|
| Write Multiple Register by Name (Device) | Writes data to multiple registers on the device using the register unique name. The register unique name is a string in the following format: Device Name-Register Group-Register Name. |
|
| Read Multiple Register by Name (Device) | Reads data from multiple registers on the device using the register unique name. The register unique name is a string in the following format: Device Name-Register Group-Register Name. |
|
| Write Multiple Register by Address (Device) | Writes data to multiple registers on the device using the register address and device name from the register map. |
|
| Read Multiple Register by Address (Device) | Reads data from multiple registers on the device using the register address and device name from the register map. |
|
| Write Multiple Field by Name (Device) | Writes data to multiple fields on the device using the field unique name. The field unique name is a string in the following format: Device Name-Register Group-Field Name. |
|
| Read Multiple Field by Name (Device) | Reads data from multiple fields on the device using the field unique name. The field unique name is a string in the following format: Device Name-Register Group-Field Name. |
|
| Write Field by Value Definition (Device) | Writes the data to the device using the field unique name and
field value definition. The field unique name is a string in the following format:
Device Name-Register
Group-Field Name. The register map file contains the field value definition, which is also a string. |
|
| Read Custom Register by Address (Device) | Reads the data using the register address and register size from the device using the interface and protocol configuration you provide. |
|
| Write Custom Register by Address (Device) | Writes the data using the register address and register size to the device using the interface and protocol configuration you provide. |
|
| API Call | Description | Inputs |
|---|---|---|
| Write Register by Name (Cache) | Writes the data to the cache using the register unique name. The register unique name is a string in the following format: Device Name-Register Group-Register Name. |
|
| Read Register by Name (Cache) | Reads the data from the cache using the register unique name, which is a string in the following format: Device Name-Register Group-Register Name. |
|
| Write Register by Address (Cache) | Writes the data to the cache using the register address and device name from the register map. |
|
| Read Register by Address (Cache) | Reads the data from the cache using the register address and device name from the register map. |
|
| Write Field by Name (Cache) | Writes the data to the cache using the field unique name, which is a string in the following format: Device Name-Register Group-Field Name. |
|
| Read Field by Name (Cache) | Reads the data from the cache using the field unique name, which is a string in the following format: Device Name-Register Group-Field Name. |
|
| Write Multiple Register by Name (Cache) | Writes data to multiple registers on the cache using the register unique name, which is a string in the following format: Device Name-Register Group-Register Name. |
|
| Read Multiple Register by Name (Cache) | Reads data from multiple registers on the cache using the register unique name, which is a string in the following format: Device Name-Register Group-Register Name. |
|
| Write Multiple Register by Address (Cache) | Writes data to multiple registers on the cache using the register address and device name from the register map. |
|
| Read Multiple Register by Address (Cache) | Reads data from multiple registers on the cache using the register address and device name from the register map. |
|
| Write Multiple Field by Name (Cache) | Writes data to multiple fields on the cache using the field unique name, which is a string in the following format: Device Name-Register Group-Field Name. |
|
| Read Multiple Field by Name (Cache) | Reads data from multiple fields on the cache using the field unique name, which is a string in the following format: Device Name-Register Group-Field Name. |
|
| Write Field by Value Definition (Cache) | Writes the data to the device using the field unique name and
field value definition. The field unique name is a string in the following format:
Device Name-Register
Group-Field Name. The register map file contains the field value definition, which is also a string. |
|
| API Call | Description | Inputs |
|---|---|---|
| Write Pin State | Sets the pin to the specified state using the pin name from the register map. |
|
| Read Pin State | Reads the state of the pin using the pin name from the register map. |
|
| API Call | Description | Inputs |
|---|---|---|
| Execute Script | Executes the script using the Script Name provided
as an input. If a script is already running on the session, this script will throw
an error. This script can be configured to run as a blocking call or asynchronously
using the waitUntilScriptCompletion control. After execution, a list of strings in JavaScript Object Notation (JSON) format is returned. Each string in the list contains the results of one executed command in the script. |
|
| Abort Script | Aborts the currently running script in the session. | — |
| Execute Script Command | Executes the script using the Script String
provided as an input. If a script is already running on the session, this script
will throw an error. This script can be configured to run as a blocking call or
asynchronously using the waitUntilScriptCompletion
control. After execution, a list of strings in JavaScript Object Notation (JSON) format is returned. Each string in the list contains the results of one executed command in the script. |
|
| API Call | Description | Inputs |
|---|---|---|
| Get Session ID (deprecated) | Returns the interface session information containing the resource name and session ID. |
|
| Get Interface Dynamic Setting | Returns the values of dynamic settings for an interface. |
|
| Set Interface Dynamic Setting | Configures the dynamic settings for an interface. |
|
| Set Protocol Dynamic Setting | Configures the dynamic settings for a protocol in the specified interface. |
|
| Get Protocol Dynamic Setting | Returns the values of dynamic settings for a protocol in the specified interface. |
|
| Get Interface Details | Returns a list of interface names and the type of each interface for the configured device control session. | — |
| Get gRPC Session Options | Returns the following gRPC session options:
|
Interface name |
| API Call | Description | Inputs |
|---|---|---|
| Instantiate | Creates and returns a semiconductor device control (SDC) I3C Session based on an existing SDC session. This session can be used to perform operations on an I3C device by using the Semiconductor Device Control Add-On. |
|
| Execute Dynamic Addressing CCC | Executes the common command code (CCC) commands to assign
dynamic address. If the command ID does not require dynamic address, the dynamic address input will be ignored. If the command ID does not match the CCC type and operation, an exception will be thrown. |
|
| Execute Dynamic Addressing CCC with Read | Executes the CCC commands to assign dynamic address. This API is
applicable only for the enter dynamic address assignment (ENTDAA) CCC in the current
I3C specification. If the command ID does not require dynamic address, the dynamic address input will be ignored. If the command ID does not match the CCC type and operation, an exception will be thrown. |
|
| Execute SDR CCC Read |
Executes the read CCC commands used in single data rate (SDR) mode and returns the read data. Configure the read byte length if you intend to run the following commands.
Otherwise, an error will be thrown.
If the defining byte and read byte length conflict with the command ID, the command will not be executed. If the command ID does not match the CCC type and operation, an exception will be thrown. |
|
| Execute SDR CCC Write |
Executes the write CCC commands used in SDR mode. If the defining byte and write data conflict with the command ID, the command will not be executed. If the command ID does not match the CCC type and operation, an exception will be thrown. |
|
| Destroy |
Destroys the I3C session and deallocates the reserved resource. |
— |
| API Call | Description | Inputs |
|---|---|---|
| Instantiate (deprecated) | Creates and returns a low-level I2C session. |
|
| Instantiate | Creates and returns a low-level I2C session. |
|
| Set Pattern Parameters |
Sets the pattern parameters to configure source and capture waveforms, and burst the pattern. |
|
| Unload and Load Pattern |
Unloads all patterns and loads patterns according to the specified Pattern Name. |
|
| Set Clock Frequency | Sets the clock frequency in the pattern project specification file for the I2C operation. The specification file must contain a specification named I2C.Clk_Freq. |
|
| Enable High-Speed Mode | Enables I2C high-speed mode. The High Speed Code will transmit in burst mode according to the High Speed Clock Frequency to ensure the I2C device is in high-speed mode during the next I2C operation. |
|
| Disable High-Speed Mode | Disables I2C high-speed mode. | — |
| Write Register with 7-Bit Slave Address | Writes data to single or multiple registers. This API supports
only 7-bit I2C slave address. The Register Address and Register Data are two-dimensional arrays of bytes. |
|
| Read Register with 7-Bit Slave Address | Reads data from single or multiple registers. This API supports
only 7-bit I2C slave address. The Read Byte Size is a one-dimensional array of integers and specifies the length of the data to read in bytes. |
|
| Write Register with 10-Bit Slave Address | Writes data to single or multiple registers. This API supports only 10-bit I2C slave address. |
|
| Read Register with 10-Bit Slave Address | Reads data from single or multiple registers. This API supports
only 10-bit slave address. The Read Byte Size is a one-dimensional array of integers and specifies the length of the data to read in bytes. |
|
| Destroy | Destroys the low-level I2C session and deallocates the reserved resources. | — |
| API Call | Description | Inputs |
|---|---|---|
| Instantiate (deprecated) | Creates and returns a low-level SPI session. |
|
| Instantiate | Creates and returns a low-level SPI session. |
|
| Set Pattern Parameters |
Sets the pattern parameters to configure source and capture waveforms, and burst the pattern. |
|
| Unload and Load Pattern |
Unloads all patterns and loads patterns according to the specified Pattern Name. |
|
| Set Clock Frequency | Sets the clock frequency in the pattern project specification file for the SPI operation. The specification file must contain a specification named SPI.Clk_Freq. |
|
| Define Read and Write Bit Encoding | Specifies the positions and values to read and write bits from
an SPI register. At the start of the session, the values of the parameters are as
follows:
|
|
| Enable Read and Write Bits | Enables read and write bit encoding. When a low-level SPI session is created, this API is set to TRUE by default. | — |
| Disable Read and Write Bits | Disables read and write bit encoding. | — |
| Write Register | Writes data to single or multiple registers. |
|
| Read Register | Reads data from single or multiple registers. The Read Byte Size is a one-dimensional array of integers and specifies the length of the data to read in bytes. |
|
| Destroy | Destroys the low-level SPI session and deallocates the reserved resources. | — |
| API Call | Description | Inputs |
|---|---|---|
| Instantiate (deprecated) | Creates and returns a low-level I3C session. |
|
| Instantiate | Creates and returns a low-level I3C session. |
|
| Set Pattern Parameters |
Sets the pattern parameters to configure source and capture waveforms, and burst the pattern. |
|
| Unload and Load Pattern |
Unloads all patterns and loads patterns according to the specified Pattern Name. |
|
| Set Legacy I2C Clock Frequency | Sets the clock frequency in the pattern project specification file for the legacy I2C operation. The specification file must contain a specification named I2C.Clk_Freq. |
|
| Set I3C Clock Frequency | Sets the clock frequency in the pattern project specification file for the I3C operation. The specification file must contain a specification named I3C.Clk_Freq. |
|
| Legacy I2C Write Register | Writes data to single or multiple registers during the legacy
I2C operation. When Include broadcast address is set to TRUE, a 7-bit broadcast address is included at the start of the burst sequence. |
|
| Legacy I2C Read Register | Reads data from single or multiple registers during the legacy
I2C operation. The Read Byte Size is a one-dimensional array of integers and specifies the length of the data to read in bytes. When Include broadcast address is set to TRUE, a 7-bit broadcast address is included at the start of the burst sequence. |
|
| I3C SDR Write Register | Writes data to single or multiple registers in SDR mode during
the I3C operation. When Include broadcast address is set to TRUE, a 7-bit broadcast address is included at the start of the burst sequence. |
|
| I3C SDR Read Register | Reads data from single or multiple registers in SDR mode during
the I3C operation. The Read Byte Size is a one-dimensional array of integers and specifies the length of the data to read in bytes. When Include broadcast address is set to TRUE, a 7-bit broadcast address is included at the start of the burst sequence. |
|
| Execute Dynamic Addressing CCC | Executes the CCC commands to assign dynamic addresses. When the CCC Type is set to Broadcast, the Slave Address is not used in the CCC waveform burst. |
|
| Execute Dynamic Addressing CCC with Read | Executes the CCC commands to assign dynamic addresses and
returns the data read from the DUT. This API is applicable only for the enter
dynamic address assignment (ENTDAA) CCC in the current I3C specification. When the CCC Type is set to Broadcast, the Slave Address is not used in the CCC waveform burst. |
|
| Execute SDR CCC Write |
Executes the write CCC commands used in SDR mode. When the CCC Type is set to Broadcast, the Slave Address is not used in the CCC waveform burst. |
|
| Execute SDR CCC Read | Executes the read CCC commands used in SDR mode and returns the
read data. When the CCC Type is set to Broadcast, the Slave Address is not used in the CCC waveform burst. |
|
| Destroy | Destroys the low-level I3C session and deallocates the reserved resources. | — |
SDConfig Editor API
The following table defines the API calls you can make to open the SDConfig Editor and edit the contents of the configuration .sdconfig file that you export from InstrumentStudio. You can make the following edits using the SDConfig Editor:
- Register map file path
- Script folder location
- Interface settings
- Protocol settings
- Register group mappings
- DIO mappings
| API Call | Description | Inputs |
|---|---|---|
| ShowSDConfigEditor() | Opens the SDConfig Editor window that can be used to edit the contents of .sdconfig files exported from InstrumentStudio. |
|
Related Information
- Semiconductor Device Control Add-On for InstrumentStudio Examples
Refer to the following table for examples provided by Semiconductor Device Control Add-On for InstrumentStudio.
- 2024 Q3 New Features
Learn about new features, behavior changes, and other updates in Semiconductor Device Control Add-On 2024 Q3 for InstrumentStudio.
- nisdc
- Understanding the Driver Session Management Service
- 2024 Q2 New Features
Learn about new features, behavior changes, and other updates in Semiconductor Device Control Add-On 2024 Q2 for InstrumentStudio.