IEC61131 String escape sequences
When creating a text file from a KAS program, The following escape sequences can be used for formatting.
| Escape sequence | Produces |
|---|---|
| $$ | $ |
| $' | ' |
| $L | linefeed |
| $N | newline |
| $P | page (form feed) |
| $R | return |
| $T | tab |
| $xx | hex value |
Example:
ID:=F_WOPEN('c:\ billfile.txt');
WOK:=FM_WRITE(ID,'123456$N');
//WOK:=FM_WRITE(ID,'$N');
WOK:=FM_WRITE(ID,'abcd$N');
WOK:=FM_WRITE(ID,'the end');
WOK:=F_Close(ID);
And File output is .
123456
abcd
the end
Home >
Knowledge Base >
FAQs >
Downloads >