NI-DAQmx .NET Framework 4.0 API Reference

Table of Contents

CIChannelCollection.CreateLinearVelocityChannel Method (String, String, Double, Double, Double, CIVelocityEncoderType, String)

  • Updated2023-02-21
  • 2 minute(s) read
CIChannelCollection.CreateLinearVelocityChannel Method (String, String, Double, Double, Double, CIVelocityEncoderType, String)
Creates a channel that uses a linear encoder to measure linear velocity.

Namespace:  NationalInstruments.DAQmx
Assembly:  NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version: 20.7.40.49302

Syntax

public CIChannel CreateLinearVelocityChannel(
	string counter,
	string nameToAssignChannel,
	double minimumValue,
	double maximumValue,
	double distancePerPulse,
	CIVelocityEncoderType decodingType,
	string customScaleName
)
Public Function CreateLinearVelocityChannel ( 
	counter As String,
	nameToAssignChannel As String,
	minimumValue As Double,
	maximumValue As Double,
	distancePerPulse As Double,
	decodingType As CIVelocityEncoderType,
	customScaleName As String
) As CIChannel

Parameters

counter
Type: SystemString
The name of the counter to use to create virtual channels.
nameToAssignChannel
Type: SystemString
The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignChannel, use the names when you refer to these channels in other NI-DAQmx functions. If you create multiple virtual channels with one call to this function, specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.
minimumValue
Type: SystemDouble
The minimum value, in units, that you expect to measure.
maximumValue
Type: SystemDouble
The maximum value, in units, that you expect to measure.
distancePerPulse
Type: SystemDouble
The distance to measure for each pulse the encoder generates on signal A or signal B. This value is in the units specified with the units input.
decodingType
Type: NationalInstruments.DAQmxCIVelocityEncoderType
Specifies how to count and interpret the pulses that the encoder generates on signal A and signal B.
customScaleName
Type: SystemString
The name of a custom scale to apply to the channel.

Return Value

Type: CIChannel

Remarks

With the exception of devices that support multi-counter tasks, you create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

See Also

Log in to get a better experience