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
Sending String to 232 question
Moderator: Benj
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Sending String to 232 question
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
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