Table Of Contents

DAQmx Create Virtual Channel (Counter Input » Angular Encoder) (G Dataflow)

Version:
Last Modified: September 18, 2017

Creates a channel that uses an angular encoder to measure angular position. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this node, 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 signals to the default input terminals of the counter, unless you select different input terminals.

connector_pane_image
datatype_icon

task in

task in specifies the task to which to add the virtual channels this node creates. If you do not specify a task, NI-DAQmx creates a task for you, and adds the virtual channels this node creates to that task.

datatype_icon

counter

counter specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

datatype_icon

name to assign

name to assign specifies a name to assign to the virtual channel this node creates. If you do not wire a value to this input, NI-DAQmx uses the physical channel name as the virtual channel name.

If you use this input to provide your own names for the virtual channels, you must use the names when you refer to these channels in other NI-DAQmx nodes, such as the source input of the DAQmx Trigger node.

If you create multiple virtual channels with one DAQmx Create Virtual Channel node, you can specify a comma-separated list of names to assign to the virtual channels. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels.

datatype_icon

units

units specifies the units to use to return angular position measurements from the channel.

Name Description
Degrees

Degrees.

From Custom Scale

Units a custom scale specifies. If you select this value, you must wire a custom scale name to the custom scale name input.

Radians

Radians.

Ticks

Timebase ticks.

datatype_icon

error in

error in describes error conditions that occur before this node runs. This input provides standard 'error in' functionality.

datatype_icon

z index

z index specifies the Z indexing settings for the channel.

datatype_icon

z index enable

z index enable specifies whether to use Z indexing for the channel.

datatype_icon

z index value

z index value specifies in units the value to which to reset the measurement, when signal Z is high, and signal A and signal B are at the states you specify with z index phase.

datatype_icon

z index phase

z index phase specifies the states at which signal A and signal B must be while signal Z is high for NI-DAQmx to reset the measurement. If signal Z is never high while signal A and signal B are high, for example, you must choose a phase other than A High B High.

When signal Z transitions to high, and how long it stays high, varies from encoder to encoder. Refer to the documentation for the encoder to determine the timing of signal Z with respect to signal A and signal B.

Name Description
A High B High

Reset the measurement when signal A and signal B are high.

A High B Low

Reset the measurement when signal A is high and signal B is low.

A Low B High

Reset the measurement when signal A is low and signal B high.

A Low B Low

Reset the measurement when signal A and signal B are low.

datatype_icon

custom scale name

custom scale name specifies the name of a custom scale for the channel.

datatype_icon

pulses per revolution

pulses per revolution is the number of pulses the encoder generates per revolution. This value is the number of pulses on either signal A or signal B, not the total number of pulses on both signal A and signal B.

datatype_icon

initial angle

initial angle is the starting angle of the encoder. This value is in the units you specify with the units input.

datatype_icon

decoding type

decoding type specifies how to count and interpret the pulses the encoder generates on signal A and signal B. X1, X2, and X4 are valid for quadrature encoders only. Two Pulse Counting is valid only for two-pulse encoders.

X2 and X4 decoding are more sensitive to smaller changes in position than X1 encoding, with X4 being the most sensitive. However, more sensitive decoding is more likely to produce erroneous measurements, if vibration exists in the encoder or other noise exists in the signals.

Name Description
Two Pulse Counting

Increment the count on rising edges of signal A. Decrement the count on rising edges of signal B. If you select this value, z index phase is ignored.

X1

If signal A leads signal B, count the rising edges of signal A. If signal B leads signal A, count the falling edges of signal A.

X2

Count the rising and falling edges of signal A.

X4

Count the rising and falling edges of signal A and signal B.

datatype_icon

task out

task out is a reference to the task after this node runs. The task contains any newly created virtual channels. If you did not wire a value to task in, NI-DAQmx automatically creates the task this output refers to.

datatype_icon

error out

error out contains error information. If error in indicates that an error occurred before this node ran, error out contains the same error information. Otherwise, error out describes the error status that this node produces.

Where This Node Can Run:

Desktop OS: Windows

FPGA: LabVIEW NXG does not support FPGA devices

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics