NI-DCPower .NET fx40 API Reference

Table of Contents

NIDCPower Constructor (String, Boolean, String)

  • Updated2024-01-04
  • 3 minute(s) read
NIDCPower Constructor (String, Boolean, String)

NIDCPower Constructor (String, Boolean, String)

Creates a new NI-DCPower session with independent channels to the specified instrument(s) and channel(s).

Namespace:  NationalInstruments.ModularInstruments.NIDCPower
Assembly:  NationalInstruments.ModularInstruments.NIDCPower.Fx40 (in NationalInstruments.ModularInstruments.NIDCPower.Fx40.dll) Version: 2023

Syntax

public NIDCPower(
	string resourceName,
	bool resetDevice,
	string optionString
)
Public Sub New ( 
	resourceName As String,
	resetDevice As Boolean,
	optionString As String
)

Parameters

resourceName
Type: SystemString
Specifies the NI-DCPower resources to use in the session. NI-DCPower resources can be names of the instrument(s) assigned by Measurement and 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.
resetDevice
Type: SystemBoolean

Specifies whether you want to reset the channels during the initialization procedure. The default is .

To place channel(s) in a known startup state when creating a new session, set resetDevice to . This action is equivalent to using the Reset method 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 resetDevice to . Next, configure the channel(s) as in the previous session, change the desired settings, and then call the Initiate method to write both settings.

optionString
Type: SystemString
Sets the initial state of the following session properties: RangeCheck, QueryInstrumentStatus, Cache, Simulate.

The syntax for optionString 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.

Remarks

After calling this method, the specified channel or channels will be in the Uncommitted state.

With this method and channel-based methods and properties, you can use any channels in the session independently. For example, you can initiate a subset of channels in the ssion with the Initiate method, and the other channels in the session remain in the Uncommitted state.

When you initialize with independent channels, each channel steps through the NI-DCPower programming state model independently of all other channels, and you can specify a subset of channels for most operations.

Note Note
You can make concurrent calls to a session from multiple threads, but the session executes the calls one at a time. If you specify multiple channels for a method or property, the session may perform the operation on multiple channels in parallel, though this is not guaranteed, and some operations may execute sequentially.

See Also

Log in to get a better experience