{}

Our Brands

Impact-Company-Logo-English Black-01-177x54

Welcome to the Schneider Electric Website

Welcome to our website.
Search FAQs
This FAQ has been written for NEAL (North East Africa and Levant) region. If you are looking for information for another region, please select the correct country from the top-left dropdown in the page and 'Navigate to Browse FAQs' in the Support menu.
How to read Double Float values in Citect?

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.

Schneider Electric Egypt and North East Africa

Attachment(s)
servlet.txt [4.08 KB]
Explore more
Range:
Articles that might be helpful Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.
Explore more
Range: