From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

motor position control with labview and NI mydaq

Hi Everyone,

 

Looking for some advice and help,currently in the process of building a model of a wind turbine,

 

The turbine has an active yaw sytem which means it will rotate in whichever direction necessary to face into the wind,the wind direction will be simulated with a variable pot,I will be using labview to build a HMI and perform the closed loop control function and a NI mydaq for the signals,has anyone here built something similar or could offer some advice where to start i.e similar project that used motor position control,the search function didnt bring me up anything.

 

Appreciate any advice

 

 

 

0 Kudos
Message 1 of 5
(3,449 Views)

You sound a bit lost.  Can you provide more details about your project?  How much of it is simulation, and how much is real hardware?  You note that the wind direction will be simulated with a potentiometer.  Will you have a real motor that will rotate to match the potentiometer, or will that be simulated?  If it's a real motor, what type of motor is it, what feedback does it provide, and how will you control it?

 

If you have absolutely no idea where to start, I'd suggest a good starting point would be a simple VI that can read the potentiometer input and display it on the screen.

0 Kudos
Message 2 of 5
(3,433 Views)

cheers for the reply,I am a bit lost

yeah the pot is going to turn a real dc stepper motor,ill be using a motor driver board/h bridge circuit to control direction and movement and i was assuming i could use a vi for the pid control,its the fitting everything together where i am lost both the hardware and the software,i have searched for similar projects in the boards but cant find anything,I know once I get it started ill be fine but its just knowing where,

 

thanks for the advice about the pot VI.

 

 

0 Kudos
Message 3 of 5
(3,418 Views)

I see a couple of possible issues here.  How will you connect the motor driver to the computer?  Are you planning to use the MyDAQ for this?  The digital lines on the MyDAQ are software-timed, so you will not be able to generate a consistent and fast pulse train.  If that's what your motor controller needs, it may not work well.

 

How will you get position feedback?  Do you have some sort of home sensor, or an encoder?

 

Normally there's no need for PID control when using a stepper motor, because you can tell the stepper exactly how many steps to take.  Once you've found a reference (home) position, you always know where the motor is until you turn off the system and move it by hand.  If you just have a standard DC motor, not a stepper, then you need an encoder or some other continuous position measurement to tell you where you are relative to the setpoint, otherwise there's no way to do PID control.  I believe the MyDAQ digital inputs are, like the outputs, software-timed, meaning there's no on-board counter and you will not be able to read a pulse-based encoder at any reasonable speed.

 

It sounds like you need to work through more of the details of this project; you might find it helpful to draw a diagram of all the components and how you expect them to connect.

0 Kudos
Message 4 of 5
(3,405 Views)

Hey, how do you use an encoder for position control. I have developed a stepper motor vi which does not remember it's position and yes I am using myDAQ. How to design a vi so that it will remember it's position?

0 Kudos
Message 5 of 5
(2,496 Views)