Sending String to 232 question

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Flowcode v5 User
Posts: 118
Joined: Thu Sep 17, 2009 1:30 pm
Has thanked: 3 times
Been thanked: 11 times

Sending String to 232 question

Postby MarkW » Tue Dec 04, 2012 1:49 pm


Using FC4....have string declared as 255 array. At some point in my program i
pad the remaining elements of the string with null char (0x00). However when i
send the string to the 232 component to print, i get all the other data except the
remaining padded elements of 0x00. If i pad the remainder elements with some arbitrary
value say 0x32 ("2" in ascii)....i get that sent out and seen on the term program on the PC.
Realterm will display anything you chuck at it if you are in "ascii" viewing mode.

question is: does the 232 macro ignore any null chars it sees in a string? (strip them off).
If i send chars one at a time via the 232 component (not string), i do get to see the null char.....
Any ideas?



User avatar
Matrix Staff
Posts: 1962
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 474 times
Been thanked: 674 times

Re: Sending String to 232 question

Postby LeighM » Tue Dec 04, 2012 3:22 pm

Hi Mark
Yes, the RS232 component SendRS232String macro expects a null terminated character string.
So it will only send the characters up to the point where the first null (zero) is encountered.