Solved: 0x00 in String cuts the string and Length$
Posted: Tue Aug 19, 2014 2:32 pm
Hi guys
i added a simple flowchart (without chip) for simulation in fine step, please add the Variable Test in Simulation Debugger
in first calculation, the string only "~" because the strTest[1]=0x00 cuts the string
in second calculation, the string only "~\x01~" because the strTest[3]=0x00 cuts the string
in third calculation, the string then "~\x01~\x01~"
do you have a workaround for this.
RS232 muss send the String Test like this: "~\x00~\x00~"
Thank you
Best wishes
Rudi
ps:
I found this:
http://www.matrixtsl.com/mmforums/viewt ... nding+0x00
ok this is RS232..
do i must split then the sending string and send the 0x00 allways as char 0x00 between or have you a Trick Tip ?
in the simulation debugger the simmulation is without a RS232 - is this generally in string too?
Best thank!
i added a simple flowchart (without chip) for simulation in fine step, please add the Variable Test in Simulation Debugger
in first calculation, the string only "~" because the strTest[1]=0x00 cuts the string
in second calculation, the string only "~\x01~" because the strTest[3]=0x00 cuts the string
in third calculation, the string then "~\x01~\x01~"
do you have a workaround for this.
RS232 muss send the String Test like this: "~\x00~\x00~"
Code: Select all
// calculation
strTest = ""
Test[0] = 0x7E
Test[1] = 0x00 // cuts the string-- next is never sending..
Test[2] = 0x7E
Test[3] = 0x00
Test[4] = 0x7E
Best wishes
Rudi
ps:
I found this:
http://www.matrixtsl.com/mmforums/viewt ... nding+0x00
LeighM wrote:
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.
ok this is RS232..
do i must split then the sending string and send the 0x00 allways as char 0x00 between or have you a Trick Tip ?
in the simulation debugger the simmulation is without a RS232 - is this generally in string too?
Best thank!