niFgen Initialize With Options

LabView FGEN

niFgen Initialize With Options

Performs the following initialization actions:

- Creates a new IVI instrument session and optionally sets the initial state of the following session properties: RangeCheck, Cache, Simulate, and RecordCoersions.

- Opens a session to the specified device using the interface and address that you specify for Resource Name.

- If Reset Device is set to TRUE, this VI resets the device to a known state.

- Sends initialization commands to set the instrument to the state necessary for NI-FGEN operation.

- Returns a session handle that you can use to identify the device in all subsequent NI-FGEN VI calls.

Resource Name specifies the instrument name, for example "PXI1Slot3" where "PXI1Slot3" is an instrument name assigned by Measurement & Automation Explorer. Syntax:
Configured in MAX Under Valid Syntax
NI-DAQmx Devices DAQmxDeviceName
NI-DAQmx Devices
(alternate syntax)
DAQ::DAQmxDeviceName
Traditional NI-DAQ Devices DAQ::DeviceNumber
Caution  The alternate syntax allowed for NI-DAQmx devices is intended to allow application that may have originally been designed for a Traditional NI-DAQ device use an NI-DAQmx device. For example, if the application expects "DAQ::1", you can rename the device to"1" in MAX and pass in "DAQ::1" for the resource name.

If you use the "DAQ::n" syntax and an NI-DAQmx device name already exists with the same name, the NI-DAQmx device will be matched first.

You can also pass in the name of a virtual instrument or logical name that you configure with the IVI Configuration utility. The virtual instrument identifies a specific device and specifies the initial settings for the session. A logical name identifies a particular virtual instrument.

Example resource names:

Resource Name Description
DAQ::1 Traditional NI-DAQ device, device number = 1
DAQ::2 NI-DAQmx device, device name ="2"
myDAQmxDevice NI-DAQmx device, device name ="myDAQmxDevice"
DAQ::myDAQmxDevice NI-DAQmx device, device name ="myDAQmxDevice"
myLogicalName IVI logical name or virtual instrument, name = "myLogicalName"
Traditional NI-DAQ and 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.

Id Query specifies whether or not to verify that NI-FGEN supports the device you initialize.

Circumstances can arise where sending an ID query to the device is undesirable. When you set this parameter to FALSE, the VI initializes the device without performing an ID query.

Reset Device specifies whether you want to reset the device during the initialization procedure.
Option String specifies the initial values of certain session properties.

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

The syntax for Option String is

attributeName=value

where

attributeName = the name of the attribute

value = the value to which the attribute is set.

To set multiple properties, separate them with a comma.

If you do not wire this input or pass in an empty string, the session uses the default values for these properties. You can override the default values by assigning a value explicitly in a string that you pass for this input.

You do not have to specify all of the properties and may leave any of them out. If you do not specify one of the properties, its default value is used.

Property NameProperty Defined ConstantDefault Value
RangeCheck niFgen»Inherent IVI Settings»User Options»Range Check 1 (True)
CacheniFgen»Inherent IVI Settings»User Options»Cache 1 (True)
SimulateniFgen»Inherent IVI Settings»User Options»Simulate0 (False)

Valid Values

True: 1

False: 0

If simulation is enabled (Simulate=1), you may specify the device that you want to simulate. To specify a device, enter the following syntax in Option String.

DriverSetup=Model:<driver model number>;BoardType:<module type>;MemorySize:<size of onboard memory in bytes>

Option String Examples:

NI PXI-5404 - Simulate=1,DriverSetup=Model:5404;BoardType:PXI

NI PCI-5421 - Simulate=1,DriverSetup=Model:5421;BoardType:PCI;MemorySize:268435456

error in describes error conditions that occur before this VI or function runs.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a negative error code. If status is FALSE, code is 0 or a warning code.
source identifies where an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.
Instrument Handle Out passes a reference to your instrument session to the next VI.
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source identifies where and why an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.