# Splitting a msg line with Split or Function?

**URL:** <https://discourse.nodered.org/t/splitting-a-msg-line-with-split-or-function/9636>\
**Category:** General\
**Created:** [31 March 2019 15:49 UTC](https://discourse.nodered.org/t/splitting-a-msg-line-with-split-or-function/9636 "2019-03-31T15:49:06Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![crativ2000](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@crativ2000](https://discourse.nodered.org/u/crativ2000)\
**Post date:** [13 January 2022 22:40 UTC](https://discourse.nodered.org/t/splitting-a-msg-line-with-split-or-function/9636/11 "2022-01-13T22:40:36Z")

</div>

Hello-  
Would any participant in this conversation please, help us with this?

> [@Implementing virtual Serial port communication: java with node-red (The Figures are attached in subsequent postings)](https://discourse.nodered.org/t/implementing-virtual-serial-port-communication-java-with-node-red-the-figures-are-attached-in-subsequent-postings/56278/24):
>
> Using SPLIT to separate two parts of a message, so we can send only one part to a PLC How can we use the Split function to separate the two parts of a message so that we can send only one part of the message to a PLC? Our project has a total of 18 variables. Each variable must have a different value. My GUI must identify each variable, extract its corresponding value from the created GUI, and send it to a PLC. Here we share part of the code for 4 of the 18 variables. if (msg.payload == 1) { …

Best regards

---

_[View the full topic](https://discourse.nodered.org/t/splitting-a-msg-line-with-split-or-function/9636)._
