Attached is a VB6 code for creating a 64 bit double precision floating point value from a binary value stored as a string. It isn't especially efficient since it uses string conversions but it should work. I just added a wrapper function to convert 4 integer registers into binary so it can convert the whole binary string into a double.
For example, 1234567890.123456 in binary is: 0100000111010010011001011000000010110100100001111110011010110111
If you read that from a PLC as 4x 16-bit unsigned integers, they will be:
16850 (0100000111010010)
25984 (0110010110000000)
46215 (1011010010000111)
59063 (1110011010110111)
Call IntsToDouble(16850, 25984, 46215, 59063) and it will return 1234567890.123456 as a 64-bit REAL.
Released for: Schneider Electric Egypt and North East Africa


Need help?
Product Selector
Quickly and easily find the right products and accessories for your applications.
Get a Quote
Start your sales enquiry online and an expert will connect with you.
Where to buy?
Easily find the nearest Schneider Electric distributor in your location.
Help Center
Find support resources for all your needs, in one place.