Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-6220 and Absolute Encoder

Hi,
Can anyone point me to a C# compatible example that would serve as a good starting place for determine the position of an UUT?
Using 12-bit absolute encoder with PCI-6220, I need to determine if the UUT (with optical encoder mounted) is moved either up/down 30 degrees from 0.
This piece of code will be called from another API to tell the motor to move then stop moving when the desired position of the UUT is found.
Any advice would be appreciated.
Sonny
0 Kudos
Message 1 of 4
(3,399 Views)
Hi nimaq,

If you are using the DAQmx drivers, you can find the .NET examples here:
C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\

The position measurement example is located here:
C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Counter\Measure Position
Chris Bolin
LabVIEW Partner Program, CLA
0 Kudos
Message 2 of 4
(3,378 Views)

Chris,

Thanks... I have one more question,

After creating a task to read the Digital channel, I need to dispose the read task before create a new task to write the output channel ?

Thanks again,

Sonny

0 Kudos
Message 3 of 4
(3,363 Views)
Hi Sonny,

If you are reading and writing on different digital lines, then you do not need to dispose the read task before creating and running the write task.
Chris Bolin
LabVIEW Partner Program, CLA
0 Kudos
Message 4 of 4
(3,340 Views)