8/19/2010 11:21 AM  
Posts: 2 Rating: (0) 
Hi I am trying to simulate, in a laboratory, a daily outdoor temperature variation of a waterbath. I want the temperature to move up and down a few degrees through 24 hours. I have made a counter go up and down to change the setpoint of the PI controller and this is done in steps forming a linear curve going up and down during 24 hours. Now, because I want to simulate the outdoor temperature, a linear movement up and down is not quite good enough. I want it to follow something like a sine curve with a periodical time of 24h. But I cannot find any advanced formula function that will create this in the LOGO. Have any of you guys an idea to what I can do? best regards Kim

8/19/2010 1:06 PM  
Posts: 173 Rating: (94) 
Hi Kim Kolt! Unfortunately, the LOGO! has developed over the years from a simple 'logic' only device, into a small controller that peeople expect miracles from (and sometimes they get them!). For your application needing complex mathematical functions, this is unfortunately not possible. What you might be able to do is to set up a few RAMP functions (LOGO! 0BA5 & 0BA6) next to each other, with some different ramp times and levels. Then, using a few timers (weekly timer), you could get each ramp block to start one after the other. With some clever programming, you could get this to be repeated after teh necessary resets etc. Have a look at the help file for the Ramp function, and you will see that you could change the ramp slope and also make negative gradient ramps. This will approximate a SINE curve, the more ramp blocks you use. Sorry, cna only think of possibilities  not quite up to programming them myself yet. I could make a sketch of whatI mean if you like!?!?! Cheers Aaaaaarrrrggghhh!! ("Have a nice day!") Please THANK, or RATE this reply! 
8/19/2010 1:48 PM  
Posts: 2 Rating: (0) 
Thanks a lot for the reply. I did consider trying some kind of combination using ramps so I know exactly what you are proposing. First, though, I wanted to check if I have missed a clever and easier function. Unfortunately no such function apparently exists. I'll just try and do without. Thanks again! best regards Kim

9/22/2010 9:02 PM  
Joined: 1/5/2007 Last visit: 9/6/2021 Posts: 1689 Rating: (571)

Hi Kolt, sorry LOGOBarbarian, i have an other opinion about a possible solution of your aim. Plaese look at my answers under "CO2 calculation  Math equations with LOGO!" Best regards Perhaps helpful links: 
==> Meine TAGListen: "deut." 

This contribution was helpful to1 thankful Users 
9/23/2010 12:30 PM  
Posts: 173 Rating: (94)

Hey, thanks Betel! This CO2 solution of yours 'Blew me away' ! It is sooooo good! A great bit of 'elegant' programming! My approaches always seem to be a bit 'first principle approximation'. It would be great to see how the CO2 solution is applied to generate a running sine wave output! Cheers 
9/25/2010 3:23 PM  
Joined: 1/5/2007 Last visit: 9/6/2021 Posts: 1689 Rating: (571)

Hi LOGO!Barbarian, hi Kolt, At "CO2 calculation  Math equations with LOGO!"i have tell you two concepts to use nonlinear fuctions with the LOGO!: a) Approximation of the distributionfunction through one or several with the LOGO! calculable polynomials of 1st to 3rd grades. my Examples: DEMO_Kurveninterpolation (0BA6).zipand FORUM_Kompressor.zip) and specialexample for (nearly) sinfunction at Astro Uhr, page 6, file: DEMO_Astro_Uhr_mit Tageseingabe_per_Taster_V3 (0BA6).zip b) Approximation of the distribution function about a table. In the case of clever combination and parameter selection a connection is let between an analog range of values (for example 200..1000) and a value table with n values build up. One needs n  1 blocks for that then. These are [n  1] / 3 multiplexer (integer value, round up) and twice so many threshold value switches to their activation. The multiplexers then forms by references a chain, so that the last one outputs the in each case valid value then. my Examples:DEMO_CO2_calculation__Math_equations_with_LOGO (0BA6).zip The sinfunktion is a non linear function and it can aproximated as table of values or as (as example) two linear polynoms and two polynoms with second order (in the ranges of the maximal values of sinfunction). Example look at Astro Uhr, page 6, Kolt must define his funktion and go one of the ways i have described...perhapps he can tell us his detailed function [in my opinion T(day time)].... Best regards Perhaps helpful links: 
==> Meine TAGListen: "deut." 

This contribution was helpful to1 thankful Users 
Follow us on