Double Precision Floating Point

A

Thread Starter

ARACIOPPI

How to do some basic arithmetic operations between double precision floating point numbers (64 bits) with a PLC that doesn´t support double precision but single precision?

I need to do some basic arithmetic operations (add, substract, multiply) some 64 bits float numbers. I´m using a Siemens S7400 PLC that manages bytes, words, double words, integer, double integer and single precision floats, but no double precision float.
Any ideas??

Thanks in advance.
 
R

Robert Scott

I'm not sure what double integer is in your PLC. If it is 64-bit, then you can use it instead of 64-bit double precision. You will have to do your own fixed-point scaling though. For instance, instead of measuring distance in mm., represent distance as a double integer where 1000 counts equals one mm. If you are careful in how you do this, you can maintain the same precision as true double precision numbers.

Robert Scott
Real-Time Specialties
Embedded Systems Consulting
 
Top