Skip to main content

Kollmorgen Support Network

IEC61131 String escape sequences | 20 Jan 2015 | |

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)
$ 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

About this Article

bill west