Initializes a new NI-SCOPE session on the specified NI gRPC Device Server using the specified instrument and options.

This VI initializes a NI-SCOPE 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 previously exists on the server, then NI-SCOPE 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

  • 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.

  • civrn.png resource name

    resource name specifies the device name assigned by Measurement & Automation Explorer (MAX) to an NI-SCOPE instrument, for example, PXI1Slot3, where PXI1Slot3 is an instrument resource name.

    This parameter accepts a comma-delimited list of strings in the form PXI1Slot3,PXI1Slot4, where PXI1Slot3 is one instrument resource name and PXI1Slot4 is another.
    Note You can only specify multiple instruments of identical model numbers, bus types, channel counts, and onboard memory sizes. The instruments must be in the same chassis.
    Examples
    Example Device Type Syntax
    1 NI-DAQmx device myDAQmxDevice (myDAQmxDevice = device name)
    2 NI-DAQmx device DAQ::myDAQmxDevice (myDAQmxDevice = device name)
    3 NI-DAQmx device DAQ::2 (2 = device name)
    4 IVI logical name or IVI virtual name myLogicalName (myLogicalName = name)

    For NI-DAQmx devices, the syntax is just the device name specified in MAX, as shown in Example 1. Typical default names for NI-DAQmx devices in MAX are Dev1 or PXI1Slot1. You can rename an NI-DAQmx device by right-clicking on the name in MAX and entering a new name.

    An alternative syntax for NI-DAQmx devices consists of DAQ::NI-DAQmx device name, as shown in Example 2. This naming convention allows for the use of an NI-DAQmx device in an application that was originally designed for a Traditional NI-DAQ device. For example, if the application expects DAQ::1, you can rename the NI-DAQmx device to 1 in MAX and pass in DAQ::1 for the resource name, as shown in Example 3.

    You can also pass in the name of an IVI logical name or an IVI virtual name configured with the IVI Configuration utility, as shown in Example 4. A logical name identifies a particular virtual instrument. A virtual name identifies a specific device and specifies the initial settings for the session.

    Note NI-DAQmx device names are not case-sensitive. However, all IVI names, such as logical names, are case-sensitive. If you use logical names, driver session names, or virtual names in your program, you must make sure that the name you use matches the name in the IVI Configuration Store file exactly, without any variations in the case of the characters.
  • cstr.png option string

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

    The following table lists the properties and the name you use in this parameter to identify the property.

    Name Attribute Defined Constant Default Value
    RangeCheck niScope»Inherent IVI Settings»User Options»Range Check TRUE
    Cache niScope»Inherent IVI Settings»User Options»Cache TRUE
    Simulate niScope»Inherent IVI Settings»User Options»Simulate FALSE
    RecordCoercions niScope»Inherent IVI Settings»User Options»Record Value Coercions FALSE
    QueryInstrStatus niScope»Inherent IVI Settings»User Options»Query Instrument Status TRUE

    Default Values: "Simulate=0,RangeCheck=1,Cache=1"

    You can use the DriverSetup flag to simulate a device, attach an accessory to your device session, or load a bitfile to a device FPGA.

    • To simulate a device, specify the model and board type you wish to simulate. For example, Simulate = 1, DriverSetup = Model:5122; BoardType:PXI will simulate a NI 5122.
    • To attach an accessory to your device session, specify the name given to the accessory by MAX. For example, DriverSetup = Accessory:Dev1 will attach the accessory named "Dev1" in MAX to your device session.
    • For instructions on how to load a bitfile to a device FPGA, refer to Using NI-SCOPE Instrument Driver FPGA Extensions.

    For more information about simulation, refer to the niScope EX Simulated Acquisition example.

    To see this parameter used in a VI, refer to the niScope EX External Amplifier example.

  • cbool.png reset device

    reset device specifies whether to reset the instrument during the initialization procedure.

    Default Value: FALSE

  • cerrcodeclst.png error in

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

  • iivrn.png instrument handle

    instrument handle identifies a particular instrument session.

  • ierrcodeclst.png error out

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