Initializes a new NI-DCPower session on the specified NI gRPC Device Server and attaches to it. Returns a session handle to be used in all subsequent NI-DCPower VI calls.

This VI initializes a NI-DCPower session on the specified NI gRPC Device Server and attaches to it from LabVIEW. If the session name is specified in the gRPC options and the same session name is already in use on the server, then NI-DCPower will return an error. If the session name in the gRPC options is empty, the resource name will be used as a session name.

The resulting session in LabVIEW forwards driver calls to the corresponding session on the server.


icon

Inputs/Outputs

  • cstr.png option string

    option string specifies the initial value of certain properties for the session.

    The syntax for option string is a list of properties with an assigned value where 1 is TRUE and 0 is FALSE. For example:

    Simulate=0, DriverSetup=Model:<model number>; BoardType:<bus connector>

    To simulate a multi-instrument session, set Simulate to 1 and list multiple instruments for DriverSetup. For example:

    Simulate=1, DriverSetup=ResourceName:<instrument name>; Model:<model number>; BoardType:<bus connector> & ResourceName:<resource name>; Model:<model number>; BoardType:<bus connector>

    You do not have to specify a value for all the properties. If you do not specify a value for a property, the default value is used.

    For more information about simulating a device, refer to Simulating an Instrument in the NI DC Power Supplies and SMUs Help.

  • civrn.png resource name

    resource name specifies the NI-DCPower resources to use in the session. NI-DCPower resources can be names of the instrument(s) assigned by Measurement & Automation Explorer (MAX) and the channel(s) to initialize. Specify the instrument(s) and channel(s) using the form PXI1Slot3/0,PXI1Slot3/2-3,PXI1Slot4/2-3 or PXI1Slot3/0,PXI1Slot3/2:3,PXI1Slot4/2:3, where PXI1Slot3 and PXI1Slot4 are instrument resource names and 0, 2, and 3 are channels.

    If you do not specify channels, all channels of the instrument(s) are included in the session.

  • ccclst.png gRPC options

    gRPC options specifies the information used to connect to the server.

  • cstr.png session name

    session name specifies the name of the MeasurementLink gRPC session.

  • cstr.png address (localhost)

    address (localhost) specifies the address of the NI gRPC Device Server.

  • cu32.png port (31763)

    port (31763) specifies the port that the NI gRPC Device Server monitors for connections.

  • cbool.png reset (false)

    reset (false) specifies whether to reset channel(s) during the initialization procedure. The default is FALSE.

    To place channel(s) in a known startup state when creating a new session, set reset to TRUE. This action is equivalent to using the niDCPower Reset With Channels VI immediately after initializing the session.

    To open a session and leave the channel(s) in an existing configuration without passing through a transitional output state, set reset to FALSE. Next, configure the channel(s) as in the previous session, change the desired settings, and then call the niDCPower Initiate With Channels VI to write both settings.

  • cerrcodeclst.png error in (no error)

    error in describes error conditions that occur before this node runs. This input provides standard error in functionality.

  • iivrn.png instrument handle out

    instrument handle out passes the handle used to identify the session in all subsequent NI-DCPower VI calls.

  • ierrcodeclst.png error out

    error out contains error information. This output provides standard error out functionality.