LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop the motor using MDD10A Dual Channel motor driver with LabView coding?

Hii, I am a beginner learning how to use LabView and I am working on a program to move a robot base using mecanum wheels. I am facing troubles to make the DC motors stop. I have no problem making the motors turn clockwise (when dir input is true) and anticlockwise (when dir input is false) but I have no idea how to stop the motor from running based on this case structure programming that I did. I am using the MDD10A dual channel motor driver which are connected to the motors and MyRio. 

I have attached the code files along for reference. Hope anyone who has any idea could help, thanks!

 

V2411_0-1690085381028.png

 

0 Kudos
Message 1 of 2
(606 Views)

90% of solving a program issue is to start with a clean and well designed program. Overlapping wires, hidden wires, and wires flowing in all directions are all roadblocks! Why are most of your front panel elements scattered randomly over a wide area? Why is the pane origin not in the upper left?

 

All your buttons are switch action, so all of them can be TRUE at the same time, but your "search array" will only ever find the first in order the array is arranged.

 

One suggestion would be to group related buttons into a radio-button control. Another suggestion would be to make them "switch until released", so only one can be true at any given time.

 

Also maybe learn about "use default if unwired" tunnels. It might be easier to use the found index to index into a 2D array of booleans (LUT) and index out a row with four elements depending on the button.

 

How often do duty cycle and frequency change? Do you really need to set those 10x/second?

0 Kudos
Message 2 of 2
(582 Views)