Hi everyone,
I need to program a PLC 5 to calculate the difference in percent between the highest and lowest of either 2 or 4 floating point values so it can be displayed. For example, the 4 values might be: 225.1, 225.5, 225.8, 225.3. The math looks like this: 225.8 (highest value) minus 225.1(lowest value)= 0.7, then 0.7 divided by 225.1 (lowest value) = 0.0031097, times 100 = 0.31097 %. I am sure there is a way to do this but I haven't been able to figure it out. Thanks very much!
I need to program a PLC 5 to calculate the difference in percent between the highest and lowest of either 2 or 4 floating point values so it can be displayed. For example, the 4 values might be: 225.1, 225.5, 225.8, 225.3. The math looks like this: 225.8 (highest value) minus 225.1(lowest value)= 0.7, then 0.7 divided by 225.1 (lowest value) = 0.0031097, times 100 = 0.31097 %. I am sure there is a way to do this but I haven't been able to figure it out. Thanks very much!