Reply To: Wonderware script subtraction problem!

#3704
MrincredibleMister Incredible
Participant
  • Topics: 8
  • Replies: 16
  • Total Posts: 24
Karma: 48
Rank: Padawan

I think the problem is you’re overwriting the Totalwellprev with the updated information before computing the new total. When you are computing the “Totalwellyesterday” you are subtracting “Totalwellprev” which at this point you’ve overwritten with “Totalwell” information. Essentially, it looks to me like you are subtracting “Totalwell” from “Totalwell” to compute your “Totalwellyesterday”.

Hope that helps.