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:
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:
|
|||||||||||||||||||||||
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 Name | Property Defined Constant | Default Value | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RangeCheck | niFgen»Inherent IVI Settings»User Options»Range Check | 1 (True) | |||||||||||||||||||||
Cache | niFgen»Inherent IVI Settings»User Options»Cache | 1 (True) | |||||||||||||||||||||
Simulate | niFgen»Inherent IVI Settings»User Options»Simulate | 0 (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
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. |
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. |