Issues with a feedback loop.


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: Issues with a feedback loop.

    Just replace the condition :

    If pwm_signal = 0 then
    Pwm_signal =Pwm_signal
    Endif

    With:

    If pwm_signal >1000 then pwm_signal = 0


    Cheers

    Al.
    All progress began with an idea

  2. #2
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Issues with a feedback loop.

    Code:
    if !but_0 then
            if SETPOINT>0 then
                SETPOINT=SETPOINT-1
               endif
        endif
        if !but_1 then
            if SETPOINT<19 then
                SETPOINT=SETPOINT+1
            endif
        endif
    While this generally works, if you reduce SETPOINT to 0, when you let go of the button, SETPOINT increases to 1; how do I fix it so that it stays at 0?

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts