Cscape program

I am working on a program in Cscape to calculate a flow in gpm with a pulse input. Currently, the data collection, labeled as minute counter and gallon counter work properly, as well as the flow calculation, but the display on the plc shows the same number regardless of the actual result. it seems to me like the displayed number is a maximum or something similar because it is in the billions. maybe a max value for a given bit number?

Attached are screenshots of the program

Thanks

Screenshot 2023-06-21 125951.png Screenshot 2023-06-21 130007.png
 
Can you post a screenshot taken when you are online with the PLC so we can the data values you're seeing? Also, which %R address you're talking about?

When are you resetting the integers with accumulated gallons (%R00012) and minutes (%R00004)? If those ever reach a value of 32767, the corresponding ADD_INT instructions will fail.
 
The %R address corresponding to the display is %R00018 at the bottom under the flow calculation comment. I am not currently resetting the values for %R00012 and %R00004 because the system will not run long enough to max the values out.

Screenshot 2023-06-21 142348.png Screenshot 2023-06-21 142425.png 20230621_143548.jpg
 
It looks like the displayed number on the HMI is configured as a DINT rather than as a REAL. Using IEE754, the REAL value of 2.0 expressed in hex is 40000000 which is 1073741824 as a DINT.
 

Similar Topics

Hi, I want to read data from mod bus by using cscape plc please help me i dont know any about that
3
Replies
2,756
Views
I have a "legacy" Horner Cscape program that has been converted from register-based into variable-based ladder by someone else, last edited in...
8
Replies
1,623
Views
I am trying to set up a piece of equipment with a Horner HE-X4R. I'd like to use structured text and so far I'm just trying to get a basic On/off...
0
Replies
946
Views
I've just started using Horner Cscape version 9.90 service pack 11. Is it normal for all the toolbars in the window to appear in a different spot...
7
Replies
1,266
Views
I seem to be making this harder than it should be, and Its not making any sense. I simply need to move a real variable to two integer variables...
8
Replies
2,502
Views
Top