The Semiconductor Device Control Add-On Professional edition for InstrumentStudio includes a Visual Studio project template that enables you to add custom protocols to the existing PXIe-657x interface.

The NI657x project template is an extension of the generic protocol project template and is designed to allow you to quickly create, build, and deploy a custom PXIe-657x protocol as an I2C protocol for PXIe-657x interfaces. The project template provides default logic and an example pattern. You can use the default logic and example pattern or modify them to meet your requirements.

The following diagram illustrates the workflow of creating a custom PXIe-657x protocol:

Figure 5. Custom PXIe-657x Protocol Workflow


Creating and Deploying a Custom Protocol for PXIe-657x Interfaces

Complete the following steps to create a custom PXIe-657x protocol and deploy it to the Semiconductor Device Control Add-On.
  1. Launch Visual Studio.
  2. Enter Semiconductor Device Control NI657x Protocol Library in the search field.
  3. Click Semiconductor Device Control NI657x Protocol Library to create a new NI657x protocol project from the protocol template for PXIe-657x interfaces.
    Note The project template for the PXIe-657x protocol provides basic settings required by a PXIe-657x protocol. You can define new settings or modify existing settings according to your requirements. Refer to the NI657x Protocol Template Default Settings section for more information about the default logic of the protocol template.
  4. In the Configure your new project dialog box, enter the name of the protocol.
    The name must be different than any existing protocols for the PXIe-657x interface. The word Protocol automatically appends to the name you specify when the project is created.
    Note When creating a new project, do not change any of the class names in the project template. The class names are automatically generated with the template.
  5. Set up the pattern files required for the protocol.
    Note Use the example pattern project located in the project folder. The example pattern project defines the default logic of the NI657x protocol template. The pattern follows a simple I2C protocol structure.
  6. Add logic to define the source waveform usage based on the patterns used in the CreateWriteWaveforms() and CreateReadWaveforms() APIs. These APIs are located in the waveform creation logic section. The default logic these APIs provides to the source waveform requirements of the example pattern. You can modify the logic to meet your requirements.
  7. Build the project and use the unit test project to debug and resolve any issues with the logic.
  8. Run the PackageGenerator.bat file located in the Visual Studio project directory to create the package file.
  9. Run the package (.nipkg file) to deploy the binaries.
    Note Ensure that InstrumentStudio is closed when running the package. When the package finishes installing, open InstrumentStudio to use the new protocol.
  10. When the package finishes deploying, the custom PXIe-657x protocol appears in the Protocol section of the Add Function dialog box of the PXIe-657x interface.

NI657x Protocol Template Default Settings

The NI657x protocol template provides the following default settings:

  • Pin Group—A combo box setting to specify the pin group. This setting displays the available pin group names in the selected pin map.
  • Write/Read Pin—A combo box setting to specify the write and read pin name. This setting displays the available pins from the selected pin group.
  • Bus—A combo box setting that lists the available sites in the selected pin map.
  • Write Pattern name—A combo box that lists the available write patterns in the selected pattern project. The patterns listed are selected based on pattern name. A pattern is identified to be a write pattern if the write keyword is present in the pattern name. The patterns listed are also filtered based on the pin group name. If the pin group name is xyz then the pattern names with the xyz keyword and the write keyword are listed.
  • Read Pattern name—A combo box that lists the available read patterns in the selected pattern project. The patterns listed are selected based on pattern name. A pattern is identified to be a read pattern if the read keyword is present in the pattern name. The patterns listed are also filtered based on the pin group name. If the pin group name is xyz then the pattern names with the xyz keyword and the read keyword are listed.
  • Timing File name—A combo box selector that lists the available timing files in the pattern project. The timing files must have the selected pin group name as a keyword in their file names.
  • Level file name—A combo box selector that lists the available level files in the pattern project.
  • Bit order—A combo box selector to define the bit order of the data.
  • Byte order—A combo box selector to determine the byte order of a setting.
  • Target Address 0x—A string setting that accepts hexadecimal values which represent a 7-bit device address.