Using encoder to control motor position DCC1000_0

Supporting 2.7 and 3.2+
Fresh meat
Posts: 1
Joined: Fri Sep 07, 2018 1:54 am

Using encoder to control motor position DCC1000_0

Postby helly » Mon Sep 24, 2018 8:46 am

I'm new to phidgets. I'm a programming noob too.

I've got a DC motor and the DCC1000_0 controller. The encoder is connected to the controller.

I've used the example code to create programs to view the position (from the encoder) and to move the motor.

But I want to the motor to spin xxtimes and then stop. And I want the encoder to read the rotations and stop the motor when it has reached a give number of rotations.

How? The encoder is not connected to the VINT hub, but to the controller it self.

PID would also be nice, but I want to start out slow..

User avatar
Site Admin
Posts: 658
Joined: Fri Oct 28, 2011 12:17 pm

Re: Using encoder to control motor position DCC1000_0

Postby mparadis » Mon Sep 24, 2018 12:25 pm

Are you asking how to open the DCC1000's encoder?

Since the encoder is part of the DCC1000, you will select channel parameters that point toward the DCC1000. (The serial number of the VINT Hub it's connected to, and the hub port that the DCC1000 is on) Your program already knows that it's looking for an encoder, since the handle you're trying to open is of type "Encoder". Since the DCC1000 has only one encoder, you don't have to specify channel (but if you do, you should specify "0").

Labview Developer
Posts: 92
Joined: Mon Nov 13, 2017 10:20 am

Re: Using encoder to control motor position DCC1000_0

Postby jdecoux » Mon Sep 24, 2018 5:21 pm

If you are trying to control the position of a DC motor, you may find our video on how to use the Motor Position Control feature of the DCC1000 helpful. To help understand how to convert encoder units to your own units, you may first want to watch our video on Rescale Factor, and how to use it.

Rescale Factor:

Motor Position Controller:

Return to “Python”

Who is online

Users browsing this forum: No registered users and 2 guests