programmed DC motor in degree..

is there any way to programmed DC motor in certain degree control through joystick in LabVIEW

There is and there isn’t. What sensor(s) do you have on the motor you want to move through a certain number of degrees? (And, what is that motor?)

If you don’t have any sensors on the motor, you might be able to use time to stop the motor at a given point. However, that can be inaccurate; the window motors are about the only ones I’d trust to do that, and even then only with a hard stop of some kind.

With a sensor, it’s a lot easier: run the motor through the angle, read the sensor, and make sure that you can get the same value for the same angle. Then increment/decrement the value to get to where you really need to be. (Note: I’m a mechanical with no knowledge of Labview, so I can’t help with the actual programming.)

If you have a servo, then it’s even easier, but that isn’t the question that was asked.

i have servo but how u programmed that i tried everything but doesn’t work on servo can u help me please how to programmed servo i have all electical is good connected but the big problem is progrmming idk please help us…thanx

On servos, the shaft angle directly corresponds to the value you output on the Digital Sidecar. You would set the PWM output it is connected to to a value between 0.0 and 1.0, and the shaft would move proportional to that.

A servo is programmed much like a motor. Instead of setting its relative power from -1 to +1, you set a desired angle from 0 to 180-ish.

But before we go too far down the road of providing you with helpful software, can you convince us that you have the servo correctly wired? Tell us exactly where you have it plugged in, and which colored wires go to what pins, and anything else associated with the electrical connections.

i connected servo arm to pwm cable to digital sidecar…and i put jumpers too (2.01 MB) (2.01 MB)

I’m going to assume you meant to show us that there’s a servo power jumper installed next to PWM 5 on your Digital Sidecar. I don’t quite know how to interpret “i connected servo arm to pwm cable”, but I’ll pretend that it means you plugged the servo connector into a PWM extension cable. The colors of the wires are probably close enough that you wouldn’t have plugged it in with the wrong orientation, but it’s something you should check.

What exactly do you want the servo to do, and when do you want the servo to do it? Specifically, which joystick controls do you want to cause the servo to move? Pretend it’s working precisely as you want, and tell us what we’d see happen if we watched you controlling it. If you can describe what you are trying to make the robot do, we can step you through how to program the robot to do it.

OK so i want servo to move 0 to 180 in one button .when i press joystick button
(Triger) i want servo move 0 to 180 and come back to 0 position.

I’m not getting a clear idea of how you want the servo to act. Here are two possible interpretations of what you said:

  1. The servo begins at 0. Each time you press the joystick trigger, it moves from 0 to 180 and then back to 0, regardless of how long the trigger is held.
  2. While the joystick trigger is not being pressed, the servo is at 0. While the trigger is being pressed, the servo is at 180.

If #1 is what you want, keep in mind that the servo takes some time to move from 0 to 180, so you have to plan for a delay before it returns from 180 to 0. While the programming is straightforward, it involves some things that you will probably find unfamiliar.

If #2 is what you want, the programming is very easy.

Or did you want the servo action to be something else? Remember that computers are not very clever, and you have to be extremely precise in how you describe what you want them to do.