Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sun Nov 19, 2017 5:35 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue May 29, 2012 1:59 pm 
Offline

Joined: Thu Oct 09, 2008 2:37 pm
Posts: 13
Hi,
What is the easiest way to convert a 32-bit floating point variable to a four byte equivalent to be transmitted in a byte stream?


Top
 Profile  
 
PostPosted: Tue May 29, 2012 8:58 pm 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
Using the function "GetBytes".

The code might look something like this.
Code:
    dim f as float

    transmit(COM1, GetBytes(f, true), false)

_________________
Ron L.

http://www.beijerelectronicsinc.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group