HEX string value > 2^31 issue.

there is no such thing as LREAL . This is a CompactLogix PLC running f/w 24.02. DINT is as high as I can go.

But the REAL type is supported, right?

Then use REAL instead of LREAL, there will be a loss of precision due a 32bit floating point has a 24 bit mantissa, but also multiplying by 10^-7 you will have to use REAL and you will always lose precision.

Another solution is to change the PLC o_O Actually a cheap Micro820 supports all 64bit types.
 
But the REAL type is supported, right?

Then use REAL instead of LREAL, there will be a loss of precision due a 32bit floating point has a 24 bit mantissa, but also multiplying by 10^-7 you will have to use REAL and you will always lose precision.

Another solution is to change the PLC o_O Actually a cheap Micro820 supports all 64bit types.

It doesn't work with Real either. The Value is still bigger than the REAL type can handle. Yes you're right the Micro 820 can easily handle this but the Compactlogix I have it cannot and the it's too late to change the PLC all installed already and running the system.

Lucky I have a FTViewSE behind all this and I solved it using VBA behind the page which this has to be displayed on. Then moved the value calculated by the FTViewSE VBA code back to the PLC and job done.

Thanks for the ideas and for your time on this.I really appreciate it 🍺
 

Similar Topics

Hi guys. Sorry if I am asking for something solved, but I cant find any useful and easy information for me. I am looking for some solution how to...
Replies
5
Views
6,477
Hi I need to convert a DINT with HEX value e.g A0F15663 to a string with the same value 'A0F15663'. Any tips of good instructions to use ...
Replies
11
Views
3,420
Hello everyone, I'm working in RSLogix 5000. I have an ASCII string of letters & numbers (call it String_3) which I have used INSERT to add a...
Replies
3
Views
2,323
I'm trying to display a Allen Bradley Controller Serial Number that's in HEX to String for my SCADA to display. Any ideas?
Replies
3
Views
2,869
Hello friends I am reading 32 bytes from a display through ML1500 COM1, configured as ascii and storing in ST file What I am reading is...
Replies
8
Views
3,778
Back
Top Bottom