04-08-2014 07:15 PM
how do I send a floating point number through a serial port to my microcontroller using VISA Write
04-08-2014 07:39 PM
04-08-2014 07:45 PM
The microcontroller which I am using takes it as a byte value.
04-08-2014 08:07 PM
04-08-2014 08:28 PM
okay i got a byte array. Now how do I pass that to the VISA write?
04-08-2014 08:32 PM
04-08-2014 09:34 PM
OK let's start over. I am trying to send a floating point value to a C program which is expecting it as a 4 byte value rather than as an ASCII string. How can I force the serial port to send it as a 4byte value rather than a ASCII string?
I managed to get a byte array using string -> number function, and then setting it to sgl representation. Is that the right way to do it? Ive added an image for a better understanding
04-08-2014 09:39 PM
04-08-2014 09:45 PM
04-09-2014 07:51 AM
I would recommend the Flatten To String because of being able to change the endiness. Some systems want Big Endian while others want Little Endian. It is best to specify.