Advertisement
metallaro1980

Untitled

Jul 15th, 2017
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.86 KB | None | 0 0
  1. input "Peso campione", pc
  2. input "ml sgocc x sale", mlsale
  3. input "ml sgocc x acidità", mlacidita
  4. input "ml sgocc x zuccheri", mlzuccheri
  5. input "ml acidità/sale prelevati", mlaciditasale
  6. input "portato a ml", portatoaml
  7. input "Res.Rifrattometrico.Tot", resriftot
  8. input "Res.Secco.Tot", ressectot
  9. d = (pc * mlaciditasale) / portatoaml
  10. d = 100 / d
  11. nacltot = (5-mlsale) * 0.00585 * d
  12. nacltot = round(nacltot,3, "F")
  13. naclnat = (resriftot - nacltot) / 50
  14. naclnat = round(naclnat, 3, "F")
  15. if naclnat > nacltot
  16. naclagg = 0
  17. endif
  18. if naclnat < nacltot
  19. naclagg = nacltot - naclnat
  20. naclagg = round(naclagg, 3, "F")
  21. endif
  22. ressecnet = ressectot - naclagg
  23. resrifnet = resriftot - naclagg
  24. d1 = portatoaml / pc
  25. zuccheririduttori = (0.0515 * d1 * 100) / (mlzuccheri-0.1)
  26. zuccheririduttori = round(zuccheririduttori, 3, "F")
  27. rapportozuccheri = (zuccheririduttori * 100) / resrifnet
  28. rapportozuccheri = round(rapportozuccheri,3,"F")
  29. aciditatotale = mlacidita * 0.007 * d
  30. aciditatotale = round(aciditatotale,3,"F")
  31. rapportoacidita = (aciditatotale * 100) / resrifnet
  32. rapportoacidita = round(rapportoacidita,3,"F")
  33. tipocampione$ = ""
  34. if ressecnet > 12 & ressecnet <= 18
  35. tipocampione$ = "semi concentrato"
  36. endif
  37. if ressecnet > 18 & ressecnet <= 28
  38. tipocampione$ = "concentrato"
  39. endif
  40. if ressecnet > 28 & ressecnet <= 36
  41. tipocampione$ = "doppio concentrato"
  42. endif
  43. if ressecnet > 36 & ressecnet <= 55
  44. tipocampione$ = "triplo concentrato"
  45. endif
  46. if ressecnet > 55
  47. tipocampione$ = "sestuplo concentrato"
  48. endif
  49. if tipocampione$ = ""
  50. if resriftot < 12
  51. tipocampione$ = "passata"
  52. endif
  53. if resriftot > 12 & resriftot <= 18
  54. tipocampione$ = "semi concentrato"
  55. endif
  56. if resriftot > 18 & resriftot <= 28
  57. tipocampione$ = "concentrato"
  58. endif
  59. if resriftot > 28 & resriftot <= 36
  60. tipocampione$ = "doppio concentrato"
  61. endif
  62. if resriftot > 36 & resriftot <= 55
  63. tipocampione$ = "triplo concentrato"
  64. endif
  65. if resriftot > 55
  66. tipocampione$ = "sestuplo concentrato"
  67. endif
  68. endif
  69. print "Tipo campione: " + tipocampione$
  70. if ressectot > 0
  71. print "Residuo secco totale g/100: " + str$(ressectot)
  72. endif
  73. if ressecnet > 0
  74. print "Residuo secco netto g/100: " + str$(ressecnet)
  75. endif
  76. print "Residuo rif. totale g/100: " + str$(resriftot)
  77. print "Residuo rif. netto g/100: " + str$(resrifnet)
  78. print "-> (5 - " + str$(mlsale) + ") * 0.00585 * " + str$(d)
  79. print "NaCl totale g/100: " + str$(nacltot)
  80. print "-> (" + str$(resriftot) + " - " + str$(nacltot) + ")" + " / 50"
  81. print "NaCl naturale g/100: " + str$(naclnat)
  82.  
  83. if naclagg = 0
  84. print "NaCl aggiunto g/100: Assente"
  85. else
  86. print "NaCl aggiunto g/100: " + str$(naclagg)
  87. endif
  88.  
  89. print "-> (0.0515 * 100 * " + str$(d1) + ") / (" + str$(mlzuccheri) + " - 0.1)"
  90. print "Zuccheri riduttori g/100: " + str$(zuccheririduttori)
  91.  
  92. if ressecnet > 0
  93. print "-> (" + str$(zuccheririduttori) + " * 100) / " + str$(ressecnet)
  94. rapportozuccheri = (zuccheririduttori * 100) / ressecnet
  95. rapportozuccheri = round(rapportozuccheri, 3, "F")
  96. print "Rapporto zuccheri % " + str$(rapportozuccheri)
  97. endif
  98.  
  99. if resrifnet > 0
  100. print "-> (" + str$(zuccheririduttori) + " * 100) / " + str$(resrifnet)
  101. rapportozuccheri = (zuccheririduttori * 100) / resrifnet
  102. rapportozuccheri = round(rapportozuccheri, 3, "F")
  103. print "Rapporto zuccheri % " + str$(rapportozuccheri)
  104. endif
  105.  
  106. print "-> " + str$(mlacidita) + " * 0.007 * " + str$(d)
  107. print "Acidità totale g/100: " + str$(aciditatotale)
  108.  
  109. if ressecnet > 0
  110. print "-> (" + str$(aciditatotale) + " * 100) / " + str$(ressecnet)
  111. rapportoacidita = (aciditatotale * 100) / ressecnet
  112. rapportoacidita = round(rapportoacidita, 3, "F")
  113. print "Rapporto acidità % " + str$(rapportoacidita)
  114. endif
  115.  
  116. if resrifnet > 0
  117. print "-> (" + str$(aciditatotale) + " * 100) / " + str$(resrifnet)
  118. rapportoacidita = (aciditatotale * 100) / resrifnet
  119. rapportoacidita = round(rapportoacidita, 3, "F")
  120. print "Rapporto acidità % " + str$(rapportoacidita)
  121. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement