Using encoder to control motor position DCC1000_0

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

Using encoder to control motor position DCC1000_0

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

Hi.
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
mparadis
Site Admin
Posts: 632
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

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").

jdecoux
Labview Developer
Posts: 86
Joined: Mon Nov 13, 2017 10:20 am
Contact:

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:
https://www.youtube.com/watch?v=l0n9P9SmNVA

Motor Position Controller:
https://www.youtube.com/watch?v=zI0DJgnzSUw


Return to “Python”

Who is online

Users browsing this forum: No registered users and 1 guest