Home › ELEKTOR FORUMS › Microcontrollers & Embedded › Elektor USB DAQ card plus pid code in C++...

ELEKTOR FORUMS

Please log in to post a reply or subscribe / unsubscribe to topics

Topic: Elektor USB DAQ card plus pid code in C++ language help

Author Post

simon12

7 posts

Popping In
Popping In

Read post 12-02-2010 19:47

Hi every1

Can someone please send me the code in C++ for PID control? The code should be like that when it is run , the window should ask for Kp, Ki , Kd and sample time? and then generates the pwm output. The source code of Elektor usb daq card in C language for usb communication MUST ALSO CONTAIN this PID CODE but how , has anyone implemented this before?

Any help will be greatly appreciated.

Regards
Simon

Elektor Editor

584 posts

Power User
Power User

Read post 15-02-2010 12:14

dear Simon

your posting has been moved, it is now under the proper topic.

We assume you are referring to the "Ball & Beam" article in the September 2008 issue (www.elektor.com/080002). If not, please specify.

regards

Jan

simon12

7 posts

Popping In
Popping In

Read post 15-02-2010 20:53

Thanks for your reply.

Yes i am referring to "ball and beam."

Please tell me that how i can edit that code. In the form1.h there are various controls like sliders, trackbars etc. I dont want these
to be displayed when the program is run.

The code should be like that when it is run , the dos window should ask for Kp, Ki , Kd and sample time? and then generates the corresponding PWM output.

How i can take voltage in numeric values?
Also tell me that is it possible that channel selection is in my hand.
I mean that Whatever channel i want to select for acquiring the Feedback i can use.

Please send me the explanation of the code written.

Any help will be greatly appreciated.

usb_novice@rocketmail.com

Post edited by simon12 on 15-02-2010 20:54

Rupi_Madrid

6 posts

Popping In
Popping In

Read post 16-02-2010 19:27

Hi simon.
The code is very complex.
The PID control is in Form.h:
private: System::Void timer1_Tick(System:bject^ sender, System::EventArgs^ e)
Regards
Rupi_Madrid

simon12

7 posts

Popping In
Popping In

Read post 17-02-2010 22:02

Please any help about the code. I mean give detailed explanation on it. I already have the PDF file of ball and beam.

Any help will be greatly appreciated.

Please log in to post a reply or subscribe / unsubscribe to topics

Follow Elektor

      

Act now!

Sponsored

Bestseller

Controller Area Network Projects

The aim of this book is to teach you the basic principles of CAN networks and in addition the development of microcontroller based projects using the CAN bus.

Package Deals

Elektor Bundles

Check our Package Deals and save money! Discounts up to 19% now available!

Price Slashed

Elektor OSPV

This Open Source People Vehicle is perfect for factory halls, warehouses, hospitals, colleges, schools etc.