How does FLowCode send an Int via RS232?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
roconnell
Posts: 14
Joined: Tue Apr 24, 2007 11:49 am
Location: Galway, Ireland

How does FLowCode send an Int via RS232?

Post 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?
If you're reading this then my post was too short or did not get to the point.

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Post 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.

roconnell
Posts: 14
Joined: Tue Apr 24, 2007 11:49 am
Location: Galway, Ireland

Post 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?)
If you're reading this then my post was too short or did not get to the point.

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Post by Steve »

This is true.

Post Reply