7/14/2009 5:37 PM | |
Posts: 173 Rating: (95) |
Hi jbrazio! Use up that nasty CO2 in your tank! 1) Selection of sensor 2) The actual voltage value goes into the LOGO! and it is internally represented as a value between 0..1000. So 0 V would be an internal integer value of 0, 10 V would be an internal integer value of 1000. 3) All of the function blocks in the LOGO! Soft Comfort programming 'language' that manipulate analog inpuit values, give you the chance to 'scale' this 0..1000 value into the real-world value that you are actually working with. There is a very knowledgeable participant in the forum called 'Betel' who has shared a nice EXCEL spreadsheet for calculating the 'gain' and 'offset' values to do the required scaling - whether you need to use only 1 analog block or a couple in series, you will get the 'real-world' value you require (with a small amount of deviation) (see the following link) 4) The typical values that you show could be the result of the calculation might be a problem. The LOGO! Maths Block can only work with integer values up to +32767. Your first example shows a value of 600 (six hundred). 5) the lowest value you show is 12, but it looks like the 3 decimal places after the comma are also important. It is possible to 'shift' all values up by multiplying them by 10 or 100 and then displaying them correctly by placing the comma where it is needed. 6) Then your example results could at best be displayed as |
7/15/2009 2:01 PM | |
Posts: 173 Rating: (95) |
Getting too complex for me! Yup, Audrey [Str] is correct, the LOGO! cannot handle the exponent part 10^(7-pH). I thought that if K was kept as integer values between 0 to 20 and if the pH sensor values only had 1 decimal place and a range from 6 to 7.6, then the evaluation of (7-pH) would only have 17 answers from (7-6)=1 to (7-7.6)= -0.6. The values of these 17 exponents could be stored in 5 multiplexers (MUX's), 'scaled up' by a factor of 10, so that 10^0.9 = 7.94328 could be 'stored' as 79 and so on for the other 16 values. Depending on the answer of the (700-[pHx10]) subtraction (also factored up into integers), Analog Threshold triggers could be used to digitally select the En, S0 & S1 lines of these 5 MUX's, with the resulting value referenced back to a Maths block, where it would be multiplied with 3xK and the answer shown with 1 decimal place. All of this COULD work (see attached attempt), but the answers would be VERY approximate and you would not get the 3 decimal places of accuracy that your second clarification seemed to indicate. Required LOGO! pH=6.1, K=20: (476,597) 474,0 pH=7.1, K=20: (47,660)48,0 pH=7.6, K=20: (15,071) 12,0 pH=7,0, K=4: (12,000) 12,0 If you want to do it right, then an S7-200: 224XP AC/DC/RLY, programmed with STEP 7 Micro/Win v4 SP6, together with an external text display TD200 will do the job nicely and accurately. Just a bit more pricey and complex to explain how to do it in this forum - check out the S7-200 forum Sorry for getting your hopes up! Aaaaarrggh Attachment10_Exponent-v3.zip (1219 Downloads) |
This contribution was helpful to2 thankful Users |
7/16/2009 9:35 AM | |
Joined: 1/5/2007 Last visit: 4/7/2023 Posts: 1690 Rating: (580)
|
Hello jbrazio, hello LOGO!Barbarian, I have a diverging opinion concerning a possible solution of your setting of a task with a LOGO!-0BA6 which I want to represent next time. I think that the difference between the mathematical exact calculation of the value for CO2 and the calculation with a LOGO!-circuit can be done better as with the version from LOGO!Barbarian.... |
==> Meine TAG-Listen: "deut." |
|
7/16/2009 4:22 PM | |
Joined: 1/5/2007 Last visit: 4/7/2023 Posts: 1690 Rating: (580)
|
Hi jbrazio, ...no problem...please send the data sheet (or identical infos) of the used sensor to scale the analoge input... Best regards Betel |
==> Meine TAG-Listen: "deut." |
|
Follow us on