Creates a voltage input channel or a set of voltage input channels with the specified parameters for measuring voltage.

Syntax

Namespace: NationalInstruments.PowerSignalsDaq

public void CreateVoltageInputChannel(string channelNames, double minimumValueInVolts, double maximumValueInVolts)

Parameters

NameTypeDescription
channelNamesstring

Specifies the voltage input channel name(s) to be created.

minimumValueInVoltsdouble

Specifies the minimum value of voltage in volts that you expect the channel(s) to measure.

maximumValueInVoltsdouble

Specifies the maximum value of voltage in volts that you expect the channel(s) to measure.

Exceptions

TypeDescription
PowerSignalsDaqException

Thrown when one of the following error conditions occurs:
  • InvalidChannelName: This method is called when the specified channel name is not in the list of supported channel names.

  • InvalidChannelType: The specified channel is a current channel instead of a voltage channel.

  • InvalidInputLimitValue: The specified minimum or maximum value is not supported, or the specified minimum value is greater than the maximum value.

  • ChannelAlreadyCreated: Attempts to create a channel with a name that has already been created.

  • InvalidOperation: This method is called after configuring the acquisition time with <see cref="ConfigureAcquisitionTime(TimeSpan)"./>

  • InvalidOperation: This method is called when the Power Signals DAQ is still in the Running state."/></li>
    </ul>
    </exception>
    <remarks>
    <para>
    The specified string in <paramref name="channelNames"/> can contain a list or range of the supported input channel names.
    </para>
    To specify a range of channel names, use a colon between two channel numbers or two channel names.<br/>
    Specify a number immediately before and after every colon <c>:</c> in the input string.<br/>
    Or, if a name is specified after the colon, it must be identical to the name specified immediately before the colon.<br/>
    Colons are not allowed within the individual channel name.<br/>
    The following are some of the supported <paramref name="channelNames"/> values:<br/>
    <list type="bullet">
        <item>PWRSIGDAQ1 VOLTAGE 0</item>
        <item>PWRSIGDAQ1 VOLTAGE 0:3</item>
        <item>PWRSIGDAQ1 VOLTAGE 0:PWRSIGDAQ1 VOLTAGE 3</item>
    </list>
    Use commas to separate channel names and ranges in a list as follows:<br/>
    PWRSIGDAQ1 VOLTAGE 0, PWRSIGDAQ1 VOLTAGE 1:2, PWRSIGDAQ1 VOLTAGE 3
    <para>
    The following channel names are supported:
    </para>
    <list type="bullet">
        <item>PWRSIGDAQ1 VOLTAGE 0</item>
        <item>PWRSIGDAQ1 VOLTAGE 1</item>
        <item>PWRSIGDAQ1 VOLTAGE 2</item>
        <item>PWRSIGDAQ1 VOLTAGE 3</item>
        <item>PWRSIGDAQ1 VOLTAGE 4</item>
        <item>PWRSIGDAQ1 VOLTAGE 5</item>
        <item>PWRSIGDAQ1 VOLTAGE 6</item>
        <item>PWRSIGDAQ1 VOLTAGE 7</item>
    </list>
    <blockquote>
    If different <paramref name="minimumValueInVolts"/> and/or different <paramref name="maximumValueInVolts"/> are required
    for each channel, call this method multiple times with the required values.
    </blockquote>
    <blockquote>
    The <paramref name="minimumValueInVolts"/> and <paramref name="maximumValueInVolts"/> parameters must be within the supported range of -2000 V to 2000 V.