12/4/2015 6:50 PM  
Posts: 3 Rating: (0) 
Hello, i'm not a LOGO expert and i don't know how to introduce myself.... i'm just an selfeducated and i search to improve my skills ! i'm working on a project using magnetic level gauge. i'm using LOGO analog input to write on the display the level of the gauge. my question : i would like to be able to count liters ( accorded to my analog parameter ) only when i'm filling my tank. it means that for example the capacity of the tank is 1000 liters, we fill 800 liters, then we are taking of 500 liters and then we are filling again 300 liters. How to be able to count and to have the result of 800+300 = 1100 liters ? i don't have problem to "translate" analog input to % of level. but i'm not able to create the program to count the "consumption". i hope i'm clear, thank you in advance for understanding. Hervé. 
12/4/2015 10:43 PM  
Joined: 12/27/2006 Last visit: 11/25/2020 Posts: 1135 Rating: (99) 
Use Mathematical blocks. In a mathematical blok you can domthe arathemcal to make of a level xxx liters , but a matchematical block is also to use as a storage (memory) of the calculations in this bock. To use (ore dont usen) the En (enable) input of that block u can storaga a value. Use reference of blocks so you can make calculations of multiple mathematical blocks in another mathematical block. Make on the riigt moments pulsen to the En input of the mathematical blocks. First at the start of the mearurement you give a puls on the En of mathematicla block 1 In that block is then the storage of the start level, or the start liters. At the moment you stop filling (or emtying) you make a puls the En on mathematical block 2 I. thet block is then the storage of the end level ( or liters) use reference in mathematical block 3, use the value of math block 1 and match block 2. Make there the richt calculations, and when you make a En of math block 3 high then you have there the value that you want. Notice that you must set in all teh mathematical blocks the option " Keep last value when En is low" 
12/5/2015 5:07 AM  
Joined: 12/18/2014 Last visit: 12/2/2020 Posts: 20530 Rating: (2239) 
How is the physical measuring range of the analog input? Can you describe times the technical process of an Operation? 
12/7/2015 9:24 AM  
Posts: 3 Rating: (0) 
Thank you for your answers. i'm using 010V input. it's accorded to % level. my question : how to translate this analog input to pulse ? i tried to use ILM but i didn't succeed..... but your idea with mathematic bloc is perfect. thank you a lot for your help. 
12/7/2015 2:38 PM  
Joined: 7/24/2006 Last visit: 4/16/2020 Posts: 2930 Rating: (422)

Hi, for "translation" we normaly talk about scalling you can use a analog Amplifier. If you have a LOGO! 8, then the Average Value FB may also be helpfull. This FB calculate teh average based on a selected time base. Attaqched is an example with both. Hope this helps AttachmentFuell.zip (31 Downloads) 
12/7/2015 10:53 PM  
Joined: 12/27/2006 Last visit: 11/25/2020 Posts: 1135 Rating: (99) 
I have make a little programm that helps you (I think) Its not copleted, but only a begin. Good luck AttachmentCircuit Diagram1.zip (51 Downloads) 
12/10/2015 5:40 PM  
Posts: 3 Rating: (0) 
thank you a lot for your help sorry for my late reply ..... i'm understanding more how to solve it. thank you for everything ! 
Follow us on