Table Of Contents

Initialize With Options (G Dataflow)

Last Modified: August 1, 2019

Performs initialization actions with extra options.

This node performs the following initialization actions:

  • Creates a new IVI instrument driver session and, optionally, sets the initial state of the following session properties: Range Check, Cache, Simulate, and Record Value Coercions.
  • Opens a session to the device(s) that you specify in the resource name parameter.
  • Queries each instrument ID and verifies that it is valid for this instrument driver.
  • If reset device is set to True, resets the instrument(s) to a known state. Refer to Reset for the default state of each digitizer.
  • Returns the instrument handle that you use to identify the instrument(s) in all subsequent instrument driver node calls.

You can create sessions that include multiple instruments of the same model and in the same chassis. This automatically synchronizes all channels of the included instruments, simplifying your test program development and maintenance.

connector_pane_image
datatype_icon

option string

The initial value of certain properties for the session.

The details section lists the properties and the name you use in this parameter to identify the property.

Property Names

Name Attribute Defined Constant Default Value
RangeCheck niScope»Inherent IVI Settings»User Options»Range Check True
Cache niScope»Inherent IVI Settings»User Options»Range Check 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

Using the DriverSetup Flag

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 an NI 5122.
  • To attach an accessory to the 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.

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

datatype_icon

resource name

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

Multi-Instrument Sessions

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

Resource Name Syntax 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)

Syntax Example Notes

  1. For NI-DAQmx devices, the syntax is just the device name specified in MAX. 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.
  2. An alternative syntax for NI-DAQmx devices consists of DAQ::NI-DAQmx device name. This naming convention allows you to use an NI-DAQmx device in an application that was originally designed for a Traditional NI-DAQ device.
  3. 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 this example.
  4. You can also pass in the name of an IVI logical name or an IVI virtual name configured with the IVI Configuration utility. A logical name identifies a particular virtual instrument. A virtual name identifies a specific device and specifies the initial settings for the session.
    spd-note-note
    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.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

id query

Verifies that the digitizer you initialize is supported by NI-SCOPE.

NI-SCOPE automatically performs this query, so setting this parameter is not necessary.

datatype_icon

reset device

Specifies whether to reset the instrument during the initialization procedure.

True Resets the instrument during the initialization procedure.
False Keeps the current instrument settings during the initialization procedure.

Default: True

datatype_icon

session out

Reference to the NI-SCOPE instrument session to pass to the next node in the program.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics