Programming - c 30 interface card

S

Thread Starter

Socrates Souliotis

My problem is that I need a C or C++ program for position control. I will be using the program to turn a motor backward and forward at a
specified angle position, calculate an algorithm for the error between desired and monitored position. The output from the interface card(pc30) will be going to the servo ( an op-amp going to a power amp and then to the one end of the motor. I only know the basics of C++ , so if anyone can help I would be very gratefull.
 
M

michael duffy

> My problem is that I need a C or C++ program for position control.

Sounds like all you need is a simple PID algorithm with some position feedback via an encoder or resolver.

PID stands for "Proportional Integral Derivative", which refers to the feedback (closed loop) control of a process. The PID calculation compares a process variable (PV) with a desired control point called the setpoint (SP). The calculation uses the difference between the setpoint and the process variable to adjust the PID output, or control variable (CV). The control variable is used to manipulate an input to the process so that the measured process variable equals the desired setpoint.

There should be many sources for a PID algorithm in textbooks particularly on digital control.

If all else fails e-mail me
 
Top