grimluck Posted March 15, 2017 Report Share Posted March 15, 2017 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? Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted March 15, 2017 MVP 2023 Report Share Posted March 15, 2017 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 comment Share on other sites More sharing options...
grimluck Posted March 15, 2017 Author Report Share Posted March 15, 2017 Hi Joe, I tried expanding the code into 3 nets a couple ways and none of them have worked yet. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted March 16, 2017 MVP 2023 Report Share Posted March 16, 2017 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 comment Share on other sites More sharing options...
sgull Posted March 16, 2017 Report Share Posted March 16, 2017 Hi Grimluck Is this subroutine being called in the main routine. Not sure it will do the calculations if not called but it probably not run any outputs. regards Denis Link to comment Share on other sites More sharing options...
grimluck Posted March 16, 2017 Author Report Share Posted March 16, 2017 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 comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now