From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Driving two DC motors with the same speed

Hi,

 

I am working on a project and I am using sbRIO 9632. I am building a robot on two wheels driven by two dc motors with PWM signals. In the program in LabView, in the main while loop I can not put time delay, because that will delay the signal that drive the motor, in other words, I cannot drive the motors if I have any type of delay in the main while loop. Also, I want to take and store the value from the encoder, wait for 300 ms and than take another value from the encoder and subtract them.

I don't know how to make this because I am a beginner in LabView. I tried to put another while loop in the main loop, but it's not working.

 

Thanks in advance

0 Kudos
Message 1 of 2
(1,961 Views)

Put the second loop outside the main loop, so it runs independent. You may need to implement small wait intervals (like 1 ms) to avoid one of the loops hog your cpu.

 

Cheers

Edgar

0 Kudos
Message 2 of 2
(1,938 Views)