<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Double (IEEE754 Double precision 64-bit)</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/32328be6ed/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/32328be6ed/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/32328be6ed/</id><updated>2020-02-27T21:08:57.091000Z</updated><subtitle>Recent posts to Double (IEEE754 Double precision 64-bit)</subtitle><entry><title>Double (IEEE754 Double precision 64-bit)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/32328be6ed/?limit=25#b4d7" rel="alternate"/><published>2020-02-27T21:08:57.091000Z</published><updated>2020-02-27T21:08:57.091000Z</updated><author><name>jacob6580</name><uri>https://forge.codesys.com/u/jacob6580/</uri></author><id>https://forge.codesys.comc2db713c8ac2d45fb1a24343e44eaebc1540f9a2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Imagine the scenario I have a display that only accepts double precision numbers (IEEE754), via serial comm, to display.&lt;br/&gt;
If I send REAL or even REAL2 from oscat, I won't have the same byte configuration and I'll display a completely wrong number.&lt;br/&gt;
Because REAL is float&lt;br/&gt;
1 bit sign&lt;br/&gt;
8 bits exponent&lt;br/&gt;
23 bits mantissa&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;&lt;a class="" href="http://www.marjinalescort.com/" rel="nofollow"&gt;Escort Bayan&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Double (IEEE754 Double precision 64-bit)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/32328be6ed/?limit=25#c277" rel="alternate"/><published>2020-02-27T21:08:52.155000Z</published><updated>2020-02-27T21:08:52.155000Z</updated><author><name>ArFe</name><uri>https://forge.codesys.com/u/arfe/</uri></author><id>https://forge.codesys.comfb5e05299c6796a7cbc082fb50ac30f2482ce592</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Yes, the difference is because it's single precision, so it's not that good.&lt;br/&gt;
Cool the project you're working on.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br/&gt;
Ariel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Double (IEEE754 Double precision 64-bit)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/32328be6ed/?limit=25#bffa" rel="alternate"/><published>2020-02-27T21:08:50.597000Z</published><updated>2020-02-27T21:08:50.597000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.comcd5beb4462e4c2c9c02aac10869ad98feb89c3d1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;sorry i meant the decimal and binary one.&lt;br/&gt;
I am working on function block real calculation with very high precision and any number system, so from 2 (being 0..1) to 16 (0..F) including 10 (0..9).&lt;br/&gt;
to have calcs like plus/minus/div/mul.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Double (IEEE754 Double precision 64-bit)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/32328be6ed/?limit=25#2093" rel="alternate"/><published>2020-02-27T21:08:46.364000Z</published><updated>2020-02-27T21:08:46.364000Z</updated><author><name>ArFe</name><uri>https://forge.codesys.com/u/arfe/</uri></author><id>https://forge.codesys.com5dbb86a128612c4a7cddc78820a8ed9908b5e887</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi shooter, thanks for your reply and for testing the functions.&lt;br/&gt;
What do you mean by &amp;gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
differences between the digital one and the binary&lt;/p&gt;
&lt;p&gt;I didn't get it.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Double (IEEE754 Double precision 64-bit)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/32328be6ed/?limit=25#6bb2" rel="alternate"/><published>2020-02-27T21:08:44.934000Z</published><updated>2020-02-27T21:08:44.934000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com435ddd71eaeb0c05e6f3b0dca2288432e4e82d99</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It looks working good.&lt;br/&gt;
If you need to do calcs on your doublereal just give a shout.&lt;br/&gt;
btw i saw some differences between the digital one and the binary so be aware of your numbers.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Double (IEEE754 Double precision 64-bit)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/32328be6ed/?limit=25#ebf7" rel="alternate"/><published>2020-02-27T21:08:40.907000Z</published><updated>2020-02-27T21:08:40.907000Z</updated><author><name>ArFe</name><uri>https://forge.codesys.com/u/arfe/</uri></author><id>https://forge.codesys.come2d62fd303bced91e961555244799bba159eb44d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Follow the file where it's done.&lt;br/&gt;
Got some info from here:&lt;br/&gt;
&lt;a class="" href="http://kipirvine.com/asm/workbook/floating_tut.htm" rel="nofollow"&gt;http://kipirvine.com/asm/workbook/floating_tut.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ariel&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=281" rel="nofollow"&gt;REAL_BYTE.pro &lt;span&gt;&lt;span&gt;[22.31 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Double (IEEE754 Double precision 64-bit)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/32328be6ed/?limit=25#588c" rel="alternate"/><published>2020-02-27T21:08:39.472000Z</published><updated>2020-02-27T21:08:39.472000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com006b9ab2156652ca003b8ce44ad527d381c33a06</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If needed more help, then contact me or put it in oscat forum.&lt;br/&gt;
I can make conversion, however it will need some calcs.&lt;br/&gt;
how did you make it now?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Double (IEEE754 Double precision 64-bit)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/32328be6ed/?limit=25#f1b7" rel="alternate"/><published>2020-02-27T21:08:38.003000Z</published><updated>2020-02-27T21:08:38.003000Z</updated><author><name>ArFe</name><uri>https://forge.codesys.com/u/arfe/</uri></author><id>https://forge.codesys.com8d7a2ac9630bca6eff26808498e8a7937c07557b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for you reply shooter, but that was not exactly what I need.&lt;br/&gt;
Imagine the scenario I have a display that only accepts double precision numbers (IEEE754), via serial comm, to display.&lt;br/&gt;
If I send REAL or even REAL2 from oscat, I won't have the same byte configuration and I'll display a completely wrong number.&lt;br/&gt;
Because REAL is float&lt;br/&gt;
1 bit sign&lt;br/&gt;
8 bits exponent&lt;br/&gt;
23 bits mantissa&lt;br/&gt;
REAL2 is something based on REAL, so same config, and what I need is&lt;br/&gt;
1 bit sign&lt;br/&gt;
11 bits exponent&lt;br/&gt;
52 bits mantissa&lt;/p&gt;
&lt;p&gt;I've done a brute force conversion, not really sure it will work always.&lt;/p&gt;
&lt;p&gt;Ariel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Double (IEEE754 Double precision 64-bit)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/32328be6ed/?limit=25#04fd" rel="alternate"/><published>2020-02-27T21:08:34.007000Z</published><updated>2020-02-27T21:08:34.007000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.comc3ea837a217874c339248430f03206b72d7d8764</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;few ways to solve this.&lt;br/&gt;
make your output a string and add some characters needed.&lt;br/&gt;
look  w &lt;a class="" href="http://www.oscat.de" rel="nofollow"&gt;www.oscat.de&lt;/a&gt; w  and find REAL2&lt;br/&gt;
make yourself a datatype in codesys&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Double (IEEE754 Double precision 64-bit)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/32328be6ed/?limit=25#8a67" rel="alternate"/><published>2020-02-27T21:08:32.561000Z</published><updated>2020-02-27T21:08:32.561000Z</updated><author><name>ArFe</name><uri>https://forge.codesys.com/u/arfe/</uri></author><id>https://forge.codesys.com657d0d678a21d914fca57bc1fcef81644ac0c329</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello all,&lt;/p&gt;
&lt;p&gt;I need to use Double instead of Float in Codesys 2.3.&lt;br/&gt;
As I tested, CoDeSys uses float standard for REAL and LREAL. The difference is that the mantissa in LREAL is bigger, but not the exponent, as it should be in Double.&lt;br/&gt;
Bellow you find examples of what it should be.&lt;br/&gt;
&lt;a class="" href="http://www.binaryconvert.com/result_double.html?decimal=050048048048" rel="nofollow"&gt;http://www.binaryconvert.com/result_dou ... 0048048048&lt;/a&gt;&lt;br/&gt;
&lt;a class="" href="http://www.binaryconvert.com/result_float.html?decimal=050048048048" rel="nofollow"&gt;http://www.binaryconvert.com/result_flo ... 0048048048&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The problem is I need to send the data over a serial connection, and thus, the reception device accepts only Double.&lt;br/&gt;
Is there a library where I can convert LREAL in Double?&lt;br/&gt;
Or does anybody know a function to do so?&lt;/p&gt;
&lt;p&gt;Is it a CoDeSys bug, or it should work like this?&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;br/&gt;
Ariel&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>