Page 1 of 1

Sending String to 232 question

Posted: Tue Dec 04, 2012 1:49 pm
by MarkW
Hello

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?

cheers

Mark

Re: Sending String to 232 question

Posted: Tue Dec 04, 2012 3:22 pm
by LeighM
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.
Regards,
Leigh