Log in

View Full Version : Motor Buttons


Kitkat
05-02-2016, 17:48
HI!!

How do I program a motor to a button? We have always used axis for motors and don't know how to use buttons for the motors. Could someone post code so I can see how it is done?

Thanks in Advance 3750!!

Nevada Reno
05-02-2016, 18:56
you have to use an index array connected to button wires then add a constant for the button (0 btn 1,1 btn 2,etc) I hope this helps we are stuck on pneumatics which is farther along
:) :) :) :) :)

Mark McLeod
05-02-2016, 22:28
You have to decide what you'd like the motors to do.
Here's one way:

rich2202
06-02-2016, 00:14
It looks something like this:

x=isbuttonpressed();
if(x) {
setmotorspeed(SPEED);
} else {
setmorospeed(0);
}


You need to put in the code for checking to see if the button is pressed, and how to set the motor speed for your motors.

orangemoore
06-02-2016, 01:22
It looks something like this:


You need to put in the code for checking to see if the button is pressed, and how to set the motor speed for your motors.

FYI this is in the Labview sub-forum.