K koep Member Licensed User Longtime User Apr 24, 2013 #1 Hi All! I'm trying to convert received bytes in new_data event to doubles with byteconverter but I keep getting compile error in DoublesFromBytes saying missing parameter. What is the proper way convert received 2 bytes to a double or 4bytes to long/int? Rgds, Tapio
Hi All! I'm trying to convert received bytes in new_data event to doubles with byteconverter but I keep getting compile error in DoublesFromBytes saying missing parameter. What is the proper way convert received 2 bytes to a double or 4bytes to long/int? Rgds, Tapio
agraham Expert Licensed User Longtime User Apr 25, 2013 #2 A Double is eight bytes, not two. Code: Copy Dim bc As ByteConverter Dim b(8) As Byte Dim d() As Double '... d = bc.DoublesFromBytes(b) DoublesFromBytes returns an array. Upvote 0
A Double is eight bytes, not two. Code: Copy Dim bc As ByteConverter Dim b(8) As Byte Dim d() As Double '... d = bc.DoublesFromBytes(b) DoublesFromBytes returns an array.
S Stephaner Member Licensed User Longtime User Oct 7, 2018 #3 Hello This code doesn't make the job for me. I mean that I Simply want to convert an array of 8 bytes into a double value. This code gives an array of doubles. My compiler returns an error when compiling. My aim is to display the real value in decimal. Thanks for your help. Stephane. Upvote 0
Hello This code doesn't make the job for me. I mean that I Simply want to convert an array of 8 bytes into a double value. This code gives an array of doubles. My compiler returns an error when compiling. My aim is to display the real value in decimal. Thanks for your help. Stephane.
DonManfred Expert Licensed User Longtime User Oct 7, 2018 #4 Stephaner said: This code gives an array of doubles. Click to expand... and the 1. of them is the value you want Away from that you should create a new thread in the questionsforum for ANY question/issue your have. Upvote 0
Stephaner said: This code gives an array of doubles. Click to expand... and the 1. of them is the value you want Away from that you should create a new thread in the questionsforum for ANY question/issue your have.