Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Analog Output Scaling - Beckhoff

Status
Not open for further replies.

hapetter

Mechanical
Apr 12, 2002
28
Hi.

I have an application where I going to control a servo motor. The input to servo motor driver card is +-10V. So I have a +-10V output card in my Beckhoff CX1030 controller.

The position of the servo is +-30degree, hence +-10V is +-30degree. The speed of the servo is given by frequency of signal. So im planning to use a triangular signal generator.

The position feedback signal is +-3V. I will make a simple closed loop to position the servo. I know how to make the input scaling, but not the output scaling..

So my question is:
How to scale the output signal. My setpoint value is in degree. If I set 30 degree, then I like 10V. If I set -10degree, then I want output to be -3,33V.

How to make this scaling function in code?

Thanks!

Best Regards

Hans Pettersson
 
Replies continue below

Recommended for you

Typical scaling formulas:
For analog inputs:
Eng_Out = (Raw_In-Min_Raw)*((Max_Eng-Min_Eng)/(Max_Raw-Min_Raw))+Eng_Min

For analog outputs:
Raw_Out = (Eng_In-Min_Eng)*((Max_Raw-Min_Raw)/(Max_Eng-Min_Eng))+Min_Raw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor