Shop OBEX P1 Docs P2 Docs Learn Events
Industrial Control Tutortial PID control Desired Temperature Set Point? — Parallax Forums

Industrial Control Tutortial PID control Desired Temperature Set Point?

gogiantsgogiants Posts: 4
edited 2006-09-27 15:49 in Learn with BlocklyProp
Good Morning Folks @ Parallax:

First and foremost - you guys produce awesome products!! Thank you for inpsiring and motivating the mechatronicgeekoid in me!!

My question:

In the Industrial Control Tutorial

(awesome as well - very nicely organized!)

in Experiment #6 - PID control

in the beginning of the code under

'******** PID control setting ******

there is a variable SP - whose comments define it:

'Initialize setpoint to YOUR bias Temp in TENTHS......


QUESTION1: IS THIS THE USERS DESIRED TEMPERATURE? WILL THE SYSTEM ATTEMPT TO MAINTAIN THIS VALUE (SP CON 990) (SO 990 IN THIS CASE OR 99 DEGRESS[noparse][[/noparse]F]) UTILIZING (IF SET) PROPORTIONAL, INTEGRAL, AND DERIVATIVE CONTROL? (ALSO A FEEDFORWARD COMPONENT WITH THE B TERM).

QUESTION2: HOW MIGHT ONE CHANGE (IF POSSIBLE) THIS FROM STAMPPLOT LITE? or HOW MIGHT ONE CHANGE THIS EXTERNALLY (POSSIBLY VIA CIRCUITRY?)



Thanks for your time and information!!

Have a Good One!!

GoGiants

Comments

  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-03-16 00:31
    Hi GoGiants,

    Thanks for the feedback, much appreciated.
    gogiants said...


    QUESTION1: IS THIS THE USERS DESIRED TEMPERATURE? WILL THE SYSTEM ATTEMPT TO MAINTAIN THIS VALUE (SP CON 990) (SO 990 IN THIS CASE OR 99 DEGRESS[noparse][[/noparse]F]) UTILIZING (IF SET) PROPORTIONAL, INTEGRAL, AND DERIVATIVE CONTROL? (ALSO A FEEDFORWARD COMPONENT WITH THE B TERM).

    Yes, SP is the desired setpoint for the various control scenarios.


    QUESTION2: HOW MIGHT ONE CHANGE (IF POSSIBLE) THIS FROM STAMPPLOT LITE? or HOW MIGHT ONE CHANGE THIS EXTERNALLY (POSSIBLY VIA CIRCUITRY?)
    ·StampPlot lite has no means to send data back or be read from the controller.· But, if you use the same program using StampPlot Pro you can write this into your code (be sure to select PBASIC 2.5, and fix any loops that 2.5 don't like):
    SP· Var Byte
    SP = 990

    .
    .
    .
    In the loop
    DEBUG "!READ (DATAVAL0)",CR
    DEBUGIN DEC SP
    Pause 50

    and it will read that green box under the button bar.· Or, to be even facier:
    DEBUG "!READ [noparse][[/noparse](DATAVAL0),*,10]", CR

    Will read it and multiply it by 10 so the you can enter a value such as 99.5.

    Having said that, the repacement text, "Process Control" will be replaced soon which uses Pro for interactive control of most all experiments.

    Hope this helps,
    Martin Hebel
    ·

    Thanks for your time and information!!

    Have a Good One!!

    GoGiants

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    Perform an Employer's Survey of Electronic Technologies Graduates· - Click here!
    Personal Links with plenty of BASIC Stamp info
    and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control
  • gogiantsgogiants Posts: 4
    edited 2006-03-16 14:09
    Good Morning Mr. Hebel,

    Great!

    Thank you so much for your timely response!!

    Wonderful ! - I'll be looking for the process control text to be released!

    In the mean time - I haven't got spl pro just this second·(just been working with·spl - which has been great thus far)·- however I think I'm going to try to use the RCTIME command with a pot and a cap to set the desired setpoint temperature externally·- I have done something somewhat similar in the past - using the RCTIME command - then using this variable it writes to - use this variable with the PULSOUT command to vary the speed of a DC motor (a perhaps prehistoric form of PWM)- this may be crude however I do know it works...(currently I'm using·the 4x20·LCD to display the gains and the amount of drive for each ofthe PID, the current temp (x10)·and I'll also put SP onthe LCD so as one changes the pot one can see the actual desired set point change·- if it all works according to plan) ....

    Cool!

    Thanks again for your time and info!!

    Have a Great Day and an Awesome Weekend!!

    GoGiants!!!

    p.s. I apologize for the little devil post icon on my first post - I meant nothing by it and accidently included it - however the thumbs up is entirely applicable and I thank you again - Take Care!!
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-03-16 14:35
    It's cool man.

    Sure, using a pot and RCTime would be a great hardware solution, but something extra you can do is it to plot that SP value along with your actual data. I don't have the code in front of my from IC, but let's say what is being plotted is "Temp". To plot both Temp and SP at the same time for better control in Pro using 2 analog values:

    DEBUG DEC SP, "," DEC Temp, CR

    If you want to play with colors more, you can also do this with Pro:
    DEBUG "!ACHN 0,", DEC SP, ",(RED)",CR
    DEBUG "!ACHN 1,", DEC Temp, ",(RED)",CR

    Have fun! Sounds like you've got a good handle on things. Using a motor makes for some really fun control action - very responsive.

    By the way, Pro is free for home/educational use, so if you've got the time...

    www.stampPlot.com

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    Perform an Employer's Survey of Electronic Technologies Graduates· - Click here!
    Personal Links with plenty of BASIC Stamp info
    and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control
  • gogiantsgogiants Posts: 4
    edited 2006-03-16 15:39
    Hey Martin!

    Thanks for the Pro tips - neat about the colors - should come in handy!!

    Nice! Pro is free for home/educational use - I'll check it out this weekend!!

    Cool!! Yeah...your products make it fun and enjoyable to work hard and get a good feel for microcontrollers and their applications!! Definitely - motors can really show system response to different control schemes...not that the temp control system doesn't - its just definitely not as fast and zippy as a little motor!!

    Thanks again and I'm envious of your job - how neat!!

    Sincere Regards·Martin!!


    GoGiants!!!
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-03-16 16:26
    Thanks GG [noparse]:)[/noparse]
    Oh, that 2nd !ACHN should have used a different color... (BLACK) or (GREEN) or whatever basic color.. sorry, no (MAUVE).

    This isn't a job, it's just a hobby, lol. I wish I could live off StampPlot, but in the mean time I'm stuck teaching [noparse]:)[/noparse]

    -Good luck,
    Martin
  • gogiantsgogiants Posts: 4
    edited 2006-03-16 16:41
    No worries Martin the Mechatronics Man!!

    It is indeed a great hobby!!

    Dangit...no mauve - guess I'll have to switch to some inferior product·in search of new colors.....ummmm...actually - definitely not - the roygbiv is just fine by me!!

    Teaching = great!! I'd like to teach some day - maybe highschool physics or math - or even some in college - some engineering even - teaching is a truly rewarding career - my mom taught math for 38 years in San Francisco and I witnessed first hand the joys of teaching and watching students grow (myself included) right before your eyes!! What subject(s) do you teach?

    Thanks again for all your info and best wishes·- I'll definitely be able to finish strong on this project and carry the momentum into the next ones to come .....

    Talk to You Later MechMan - Have an Excellent Weekend!!


    GoGiants!!!
  • DileepDileep Posts: 4
    edited 2006-09-27 15:49
    Hii bros,

    ·iam badly looking for PID code to control my stepper motor in Ball and Beam experiment. I would like to take the positional feedback of ball and give to stepper motor couple with beam...my aim is to control the ball in neutral position of the beam. Eagerly waiting for ur reply
    Thanks,

    Dileep
    GRA
    Univ of Kansas

    [url=http:///g.1asphost.com/dilk05]http:///g.1asphost.com/dilk05[/url]
Sign In or Register to comment.