I have i question regarding Strings in S7 and CR+LF
I'm communicating with 3:rd party device and my program sends text strings to poll data from this module.
Each telegram ends with asc(13)+asc(10) and i have a working program wher i have several telegrams in a DB declared as ARRAY[0..17] of BYTES where every telegram ends with asc(13), asc(10).
It would be more readable for the user if i could declare as STRING[18] instead.
So my question is, how do i write special charachters as <CR><LF> within the textstring.
When monitoring responses from the 3:rd party module in a VAT table i can see that S7 interprets those chars as '$r' and '$l' so i have tested to add thoose text combinations to my strings.
'mystring$r$l'
But the 3:rd party module don't respond to this.
Is there a way to solve this!
I want my string to be like 'mystring' + <CR> + <LF>
/Pethoek
I'm communicating with 3:rd party device and my program sends text strings to poll data from this module.
Each telegram ends with asc(13)+asc(10) and i have a working program wher i have several telegrams in a DB declared as ARRAY[0..17] of BYTES where every telegram ends with asc(13), asc(10).
It would be more readable for the user if i could declare as STRING[18] instead.
So my question is, how do i write special charachters as <CR><LF> within the textstring.
When monitoring responses from the 3:rd party module in a VAT table i can see that S7 interprets those chars as '$r' and '$l' so i have tested to add thoose text combinations to my strings.
'mystring$r$l'
But the 3:rd party module don't respond to this.
Is there a way to solve this!
I want my string to be like 'mystring' + <CR> + <LF>
/Pethoek