# Connecting to a PC over tcp

**URL:** <https://discourse.nodered.org/t/connecting-to-a-pc-over-tcp/12936>\
**Category:** General\
**Created:** [5 July 2019 04:50 UTC](https://discourse.nodered.org/t/connecting-to-a-pc-over-tcp/12936 "2019-07-05T04:50:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrineuh](https://avatars.discourse-cdn.com/v4/letter/c/8baadc/32.png) [@chrineuh](https://discourse.nodered.org/u/chrineuh)\
**Post date:** [5 July 2019 04:50 UTC](https://discourse.nodered.org/t/connecting-to-a-pc-over-tcp/12936/1 "2019-07-05T04:50:02Z")

</div>

Hello,

i have a problem with conecting to my PC I have a programm running called labview and i want to transfer data between iobroker (node red) and this software.

because this software is controlling my oil heating of the house.

and my problem is i can send data form LV to node red but back ist no so simple because labview want coniniusly data over tcp or time runs out but iobroker gives me only data when the status of the item has changet

but the other way I dont want to transfert data always becaus i only send the set values back and this will be not ofte modifyed

please help

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [5 July 2019 07:50 UTC](https://discourse.nodered.org/t/connecting-to-a-pc-over-tcp/12936/2 "2019-07-05T07:50:58Z")

</div>

DO you have access to the labview source ? I'm sure you could change the tcp timeouts there if you wish.  
If not then you could use a change node to save your readings locally into flow or global context variables - and then have a separate flow running off an inject node that fires every (say) 20 secs to then re-read that flow/global variable(s) - again using a change node to then feed out to the tcp - so that it stays alive.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [5 July 2019 08:02 UTC](https://discourse.nodered.org/t/connecting-to-a-pc-over-tcp/12936/3 "2019-07-05T08:02:00Z")

</div>

Isn’t there a MQTT library for Labview?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 July 2019 12:30 UTC](https://discourse.nodered.org/t/connecting-to-a-pc-over-tcp/12936/4 "2019-07-05T12:30:24Z")

</div>

Are you running Node-RED on the same PC as Labview? If not, would that help?

Alternatively, if your programming skills are up to it, possibly a small "listener" written in Node.js or Python might be used and be able to maintain the connection better? That could then easily write to MQTT or serve up a TCP connection with different timeouts.

---

<div class="post-metadata">

**Author:** ![chrineuh](https://avatars.discourse-cdn.com/v4/letter/c/8baadc/32.png) [@chrineuh](https://discourse.nodered.org/u/chrineuh)\
**Post date:** [5 July 2019 12:47 UTC](https://discourse.nodered.org/t/connecting-to-a-pc-over-tcp/12936/5 "2019-07-05T12:47:32Z")

</div>

yes but that dosen't work ih can not connect to iobroker with mqtt lib for lab view

and with Programm in js ist no so easy for me i have tast a smal server in c# but it wouldnt Connect

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [5 July 2019 13:00 UTC](https://discourse.nodered.org/t/connecting-to-a-pc-over-tcp/12936/6 "2019-07-05T13:00:13Z")

</div>

> [@chrineuh](#):
>
> yes but that dosen't work i

Do you mean that Labview has an MQTT capability but it doesn't work? If it doesn't work then it does not have such a capability. If you mean that it does work but you can't work out how then possibly you could ask on a Labview list.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [5 July 2019 14:52 UTC](https://discourse.nodered.org/t/connecting-to-a-pc-over-tcp/12936/7 "2019-07-05T14:52:58Z")

</div>

Guys, we don't need MQTT for everything. TCP can be made to work just fine.
