Page 1 of 1

How does FLowCode send an Int via RS232?

Posted: Mon Nov 26, 2007 3:51 pm
by roconnell
I am sampling the ADC into an Int, and need to send this over RS232 to a PC.
The RS232 Macro has SendRS232Char which looks to take a byte. Will it send an Int?
How will the data be seen on the other side?

Posted: Mon Nov 26, 2007 6:12 pm
by Steve
You have 2 options:

1) Turn the INT into 2 BYTE variables (high and low bytes) and send these.

In this case, the raw value of the data will be seen on the PC.


2) Turn the INT into a string representing the number.

This is probably how you need to do it. You will need to use the "ToString$" function in a "string manipulation" icon to convert your number to a string.

Posted: Mon Nov 26, 2007 6:49 pm
by roconnell
I think I'll use the first option, as I am trying to keep data transfer over the serial to a minimum, so 2 bytes is less then a whole string. (isn't it?)

Posted: Tue Nov 27, 2007 9:29 am
by Steve
This is true.