Results 1 to 3 of 3

Thread: TON timer to delay output

  1. #1
    Join Date
    Jun 2016
    Location
    IA
    Posts
    16

    Default TON timer to delay output

    I have a TON timer configured to enable an output that is only working once after the initial startup of the controller.

    I have multiple outputs working in conjunction. One output enables the throttle on a standalone diesel engine while the others run a combination of conveyor\spinner. The timer starts with the diesel engine throttle, runs for 1600ms, and should then enable the conveyor\spinner outputs. The timer is reset when the conveyor\spinner are shut off and the engine throttles down.

    It acts accordingly during the very first run sequence, however on following run sequences the conveyor\spinner outputs are starting at the same time as the engine throttle. This is problematic when there is a load applied to the conveyor as it can stall the engine.

    Any reason why it would only run correctly once and then not on following run sequences? It acts as if it is not resetting the timer correctly, however when watching it through Codesys TON.IN and TON.Q both reset to FALSE and PT/ET appear to run and act accordingly as well.

    EDIT: I should mention as well that the conveyor\spinner outputs are PWM.
    Last edited by rbenesch; 09-26-2016 at 10:08 AM. Reason: additional info
    Ryan Benesch | Design Engineer, Ice Control
    DIR: (563) 927-7117
    rbenesch@hendersonproducts.com
    www.hendersonproducts.com

  2. #2
    Join Date
    Jun 2016
    Location
    IA
    Posts
    16

    Default

    I figured out a workaround to this.

    After some more testing I determined that the timer was functioning correctly, and even though the output was set to "FALSE" it was still running with the last known PWM output value. For example, if I was running at 5, turned off the conveyor, changed the conveyor to 10, and started the conveyor - the throttle would ramp up and the conveyor would start running at 5 immediately. After the timer expired, the conveyor would then switch to running at 10. What I needed was for the conveyor to always start at 0 when the throttle was ramping up.

    To work around this, I created a TOF timer of 5ms that resets the PWM output to its lowest value before turning off the conveyor\spinner. Now, when the TON timer starts, the last know PWM value is always set to 0 and the after a brief delay for the throttle to ramp up, utilizes the user entered value for the conveyor\spinner.
    Ryan Benesch | Design Engineer, Ice Control
    DIR: (563) 927-7117
    rbenesch@hendersonproducts.com
    www.hendersonproducts.com

  3. #3
    Join Date
    Aug 2013
    Posts
    25

    Default

    Ryan, you are correct, turning OFF the ENABLE of a PWM block will freeze the last value of the PWM. To turn it OFF, set the value to 0 - this can be done through a SELECT statement and toggling between the requested value and 0.

Posting Permissions

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