11-22-2010 08:26 AM
Hi, i'm a newbie with labview
I'm trying to make a position control on a dc motor. I'm using a usb 6259 to generate a voltage output and to acquire the angular position from an encoder.
I'm attaching my feedforward system
how can i transform it in a feedback system, with a given reference signal ?
thanks
Solved! Go to Solution.
11-23-2010 09:27 AM
Hi chatter,
what do you exactly mean with "feedback system"?
In a motion system, normally you can have different types of feedback devices, as for example encoders or potentiometers.
Normally the signals generated by this feedback devices are sent to the motion controller (see for example Configuring a Motion Control System and in particular the Feedback devices paragraph), that uses them to close the control loop.
In your case you are using a USB-6259 board so you could simply acquire the signal coming from the feedback device, then you will have to software process it in order to extract the info you need.
Serena
11-23-2010 10:08 AM
hi serena
i mean take the angular position acquired by the encoder, compare it with a chosen angular position (i.e. an external input) and use this result to write a new voltage output
11-23-2010 10:47 AM
So you need to acquire also the external input with another angular position task in parallel with the first one, compare the two results and then write the new waveform to the board. The only problem could be that writing the waveform to the board at every iteration could cause a bit of delay in generating the correct value (because of "latency")
Serena
11-23-2010 11:22 AM
yes, i've to create a pid control too.
for this reason i've take a look at the example "dc motor cascade speed control"
i was thinking to put my tasks in a control & sim loop instead the while loop i've used before, but i'm not sure about it, and (the greatest among my problems)
i've no idea how to write a new voltage output task as a function of the position acquired during the previous interation
11-24-2010 03:17 AM
The "dc motor cascade speed control" example uses the Control Design and Simulation Module and it is thought to control a motor that is simulated. Since you have to acquire data coming from a real system the standard while loop is correct.
As for the PID control operation, you can have a look at the following examples:
11-24-2010 05:38 AM
thanks for the tips!