Jump to content

Recommended Posts

Given two temperatures and a time span, I want to create a timer that counts down to either add or subtract one from the current temperature (making a ramp). I am correctly setting TD 29 to this value (s/ 1 degree C), but the timer is never triggering the block of code. How can I fix this? Have you seen other solutions to a smooth temperature ramp? 

Untitled.png.75f23df61a1ccf80361a145cda20e8d8.png

Link to post
Share on other sites

First off, break that into three  networks.  Putting a contact referencing a timer and the timer coil in the same network is bad juju.  The compiler allows it but is tripping over itself.

Put the timer coil in a network before the transitional and the resets.

Let us know if expanding the code solves the problem.

Joe T. 

Link to post
Share on other sites

Put a NC of TD 29 in front of the coil and it will reset itself, giving you a pulse every 0.6 seconds.  If you're going for a 60 second pulse, you need to change your formulas to output 6000.  Timers work in 0.01 sec units.

MI 999 should have increased to 1 when the timer finished.  Make sure you're not clamping it to 0 somewhere else in your program.

You could also use the INC and the DEC blocks at the top of the Math menu.

Joe T.

Link to post
Share on other sites

Thanks for the responses everyone, I believe that the program was using TD 29 in a way that was 'clamping' it to 0 elsewhere since deleting every other occurrence solved the problem. I am having some problems with MI 999 not reaching the value that it should (because of the delay in resetting the timer(?) ) but I think I will use a check point strategy to detect when I have reached temp 2 vs setting a timer which would be less reliable due to laggy software. 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...