# When is output of a TPWrite updated in the \`Operator Window\` ?

**URL:** <https://tech-community.robotics.abb.com/t/when-is-output-of-a-tpwrite-updated-in-the-operator-window/6366>\
**Category:** RobotStudio\
**Created:** [November 9, 2014, 11:04am UTC](https://tech-community.robotics.abb.com/t/when-is-output-of-a-tpwrite-updated-in-the-operator-window/6366 "2014-11-09T11:04:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pollux](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/pollux/32/4028_2.png) [@pollux](https://tech-community.robotics.abb.com/u/pollux)\
**Post date:** [November 9, 2014, 11:04am UTC](https://tech-community.robotics.abb.com/t/when-is-output-of-a-tpwrite-updated-in-the-operator-window/6366/1 "2014-11-09T11:04:58Z")

</div>

Hi,

I’m using to `TPWrite` to debug my code and write some verbose messages to follow the application flow. Though they time when the messages actually appear on screen in the `Operator Window` is a bit unclear to me. For example, I have two tasks one which accepts a new socket connection. When I connect to this listening socket with my application I log some information using `TPWrite` then I show some info when I receive data on this socket. But only when I close the remote socket or when I press the `Stop` button in the `RAPID` all messages appear at one (which can be a lot).

Maybe this is the way it works but if there is a way to directly show messages I write using `TPWrite` that would be great!

pollux

---

<div class="post-metadata">

**Author:** ![Neily03](https://avatars.discourse-cdn.com/v4/letter/n/c6cbf5/32.png) [@Neily03](https://tech-community.robotics.abb.com/u/Neily03)\
**Post date:** [November 9, 2014, 11:38am UTC](https://tech-community.robotics.abb.com/t/when-is-output-of-a-tpwrite-updated-in-the-operator-window/6366/2 "2014-11-09T11:38:06Z")

</div>

Are you using TPErase first to clear the teach pendant screen?

---

<div class="post-metadata">

**Author:** ![pollux](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/pollux/32/4028_2.png) [@pollux](https://tech-community.robotics.abb.com/u/pollux)\
**Post date:** [November 9, 2014, 11:42am UTC](https://tech-community.robotics.abb.com/t/when-is-output-of-a-tpwrite-updated-in-the-operator-window/6366/3 "2014-11-09T11:42:05Z")

</div>

Hey Neil,

No I’m only using `TPWrite`. I’m not sending just a couple of messages though and using the operator windows to inspect the messages (not the virtual flex pendant).

Should I use `TPErase` ?

[This is the code I’m using (two tasks).](https://gist.github.com/roxlu/71a8ac025506ce85b71d)

Thanks

---

<div class="post-metadata">

**Author:** ![Henrik\_Berlin](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/henrik_berlin/32/1011_2.png) [@Henrik\_Berlin](https://tech-community.robotics.abb.com/u/Henrik_Berlin)\
**Post date:** [November 10, 2014, 7:44am UTC](https://tech-community.robotics.abb.com/t/when-is-output-of-a-tpwrite-updated-in-the-operator-window/6366/4 "2014-11-10T07:44:54Z")

</div>

Does the Virtual FlexPendant behave in the same way as RobotStudio, or do you get the messages directly?

---

<div class="post-metadata">

**Author:** ![pollux](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/pollux/32/4028_2.png) [@pollux](https://tech-community.robotics.abb.com/u/pollux)\
**Post date:** [November 10, 2014, 10:29am UTC](https://tech-community.robotics.abb.com/t/when-is-output-of-a-tpwrite-updated-in-the-operator-window/6366/5 "2014-11-10T10:29:29Z")

</div>

Hi Henrik,

Both had the same behavior, but I think it’s related to using multiple tasks and `WaitUntil`. When I write -a lot- using TPWrite the messages are coming in; it feels like the output wants to fill it’s buffer before actually showing it. But after changing my code structure a bit it seems to work fine.

So I think it was my code if this is not expected behavior.

Thanks  
pollux
