Math Result toWrong Register - Intermittent
Tried "IF TXT8 = " " then TXT8 = 0. Ditto for the next 3. Ended up with all zeros. Not sure why.
Did individual digits. Copy TXT8 to DS102, TXT9 to DS103, ....
That works.
Math box to assemble digits.
[ DS105 + ( DS104 * 10 ) + ( DS103 * 100 ) + ( DS102 * 1000 ) ]
Result to DS12.
Reading RS232 once per second. Math box triggered with a transitional contact from the "Read Success" bit.
Strange problem. In an earlier part of the program, three different math boxes set DS1 to 0, 1, or 3. Using it for a pump status icon. Icon intermittently flashing "Overload Tripped". Pump is off. DS1 should be a solid 0.
With Monitor on, I see DS1 intermittently changing from 0 to 115. The scale is currently at 115 pounds. The math box should be putting the result in DS12, but it is intermittently putting it in DS1!
I think I'll try changing the DS1 boxes from Math to Copy. If underlying code is leaving result on the stack too long, Copy should put me in a different routine.