Creates a new PulserSession object that can interact with the Pulser.

Syntax

Namespace: NationalInstruments.ECUTS.Pulser

public PulserSession(string fixtureInformationFilePath, string sessionName="", SessionInitializationBehavior sessionInitializationBehavior=SessionInitializationBehavior.Unspecified)

Remarks


The following values are supported:

  • SessionInitializationBehavior.Unspecified: Returns an existing session with the specified name if a session already exists. Otherwise, it initializes a new session.  

  • SessionInitializationBehavior.InitializeNew: Initializes a new session with the specified name. An error will be reported if a session already exists.  

  • SessionInitializationBehavior.AttachToExisting: Returns an existing session with the specified name. An error will be reported if a session has not been initialized.  

Session Initialization Behavior: The following session initialization behaviors are supported:
  • SessionInitializationBehavior.Unspecified: Returns an existing session with the specified name if a session already exists. Otherwise, it initializes a new session.

  • SessionInitializationBehavior.InitializeNew: Initializes a new session with the specified name. An error will be reported if a session already exists.

  • SessionInitializationBehavior.AttachToExisting: Returns an existing session with the specified name. An error will be reported if a session has not been initialized.

Fixture Information XML File: The fixture information XML file is used to capture fixture configuration details relevant for the Pulser API. This file should be edited to accurately represent the actual hardware setup, including the types of current transducers connected to the Pulser current input channels and the connection status of pulse current multiplexer pins.

Key Elements of Fixture Information XML File:
  • Current Transducers: The currentTransducers section contains a list of transducers, where each entry includes:
    • channelName: Specifies the name of the channel (e.g., "PULSER CURRENT INPUT 0").

    • transducerType: Specifies the type of transducer connected to the channel. Supported values include "None" and the following transducer types:
      • DS50UB-10V

      • DS100UB-10V

      • DS200UB-10V

      • DS600UB-10V

      • DS1000UB-10V

      • DM1200UB-10V

      • DL2000UB-10V

  • Pulse Mux Pin Connections: The pulseMuxPinsThatMayBeConnectedInFixture section describes the connection status of pin pairs within the fixture, where each entry includes:
    • pin1Name and pin2Name: Names of the pins in the pair (e.g., "PULSER CURRENT OUTPUT C0-" and "PULSER CURRENT OUTPUT C0+").

    • connected: A boolean value indicating whether the pins are connected (true) or not (false).

Guidelines for Editing Fixture Information XML File:
  • Ensure that the transducerType attributes correctly reflect the transducers used in your setup. Use "None" for channels with no transducer connected.

  • Verify that the connected attributes accurately represent the physical connections in the fixture.

Example Fixture Information XML File: An example of the fixture information XML file is provided at the following location: C:\Users\Public\Documents\National Instruments\Pulser\Examples\DotNET\GeneratePulseAndReadSamples\FixtureInformation.xml
NI recommends that you copy this file to a location of your choice and edit it to match your hardware setup.

The example file includes details comments on how to update the transducerType and connected attributes.

Example Programs: You can find the example programs at the following location: C:\Users\Public\Documents\National Instruments\Pulser\Examples\DotNET
NI recommends that you copy one of the examples to a location of your choice and edit it to match your test requirements.

Parameters

NameTypeDescription
fixtureInformationFilePathstring

Specifies the path to the fixture information XML file.

sessionNamestring

Specifies a string based session name that the client can define when creating a session.

sessionInitializationBehaviorSessionInitializationBehavior

Specifies whether to create a new driver session or attach to an existing driver session. This parameter is optional and defaults to SessionInitializationBehavior.Unspecified.

Exceptions

TypeDescription
PulserSessionException

Thrown when one of the following error conditions occurs: