# Adding control characters

**URL:** <https://forum.inductiveautomation.com/t/adding-control-characters/1299>\
**Category:** Archived Topics\
**Created:** [September 24, 2009, 12:07pm UTC](https://forum.inductiveautomation.com/t/adding-control-characters/1299 "2009-09-24T12:07:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [September 24, 2009, 12:07pm UTC](https://forum.inductiveautomation.com/t/adding-control-characters/1299/1 "2009-09-24T12:07:24Z")

</div>

Can I add control characters (such as CR or LF) to a string read from a table and send it out to an OPC tag? I have concatenated strings in the past, but I’m not seeing any way to add control characters.

Currently, I’m massaging the string to add them inside the PLC, so the application is working, but wanted to clean up PLC code and make it a little more transparent.

Regards,

Jordan

---

<div class="post-metadata">

**Author:** ![MickeyBob](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@MickeyBob](https://forum.inductiveautomation.com/u/MickeyBob)\
**Post date:** [October 4, 2009, 1:15pm UTC](https://forum.inductiveautomation.com/t/adding-control-characters/1299/2 "2009-10-04T13:15:01Z")

</div>

One solution is to create an action item, configure it to use a SQL query and enter an expression similar to the following:

```auto
SELECT string_column + CHAR(13) + CHAR(10)
```

Not to confuse the issue more but if you have the string in an OPC item and wanted to append control characters, you can use an expression like this:

```auto
Concat({opc_string_tag}, ToChar(13), ToChar(10))
```

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [October 5, 2009, 5:12pm UTC](https://forum.inductiveautomation.com/t/adding-control-characters/1299/3 "2009-10-05T17:12:06Z")

</div>

Nope, not confusing at all.

Just so happens that a patricualr item from the table is selected in the PLC and then sent back. 👿 Anyway, the upshot is that it ended up less code to massage it in the PLC.

While my post ended up rather moot, I’ll definitely file this one away for reference. Thanks, MickeyBob!

Best regards to all,
