# Realtime socket communication between program node and daemon

**URL:** <https://forum.universal-robots.com/t/realtime-socket-communication-between-program-node-and-daemon/1952>\
**Category:** URCap Development\
**Created:** [May 4, 2018, 1:26pm UTC](https://forum.universal-robots.com/t/realtime-socket-communication-between-program-node-and-daemon/1952 "2018-05-04T13:26:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gomathisankar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/gomathisankar/32/607_2.png) [@gomathisankar](https://forum.universal-robots.com/u/gomathisankar)\
**Post date:** [May 4, 2018, 1:26pm UTC](https://forum.universal-robots.com/t/realtime-socket-communication-between-program-node-and-daemon/1952/1 "2018-05-04T13:26:20Z")

</div>

Hi,

we have an http based daemon service running. When the program is running, we want to inform the daemon service over http protocol whenever a cycle is completed or duration of idle time. Basically, I am storing the cycle counter or idle time duration in URScript variables.

```
public void generateScript(ScriptWriter writer) {
	writer.writeChildren();
	Variable variable = getSelectedVariable();
	if (variable != null) {
		String resolvedVariableName = writer.getResolvedVariableName(variable);
		writer.appendLine(resolvedVariableName + "=" + resolvedVariableName + "+1");
    }}

```

Can I access the URScript variables using Realtime client or RTDE interfaces from daemon service?

What is the best way to do?

Thanks,  
Sankar  
Founder of Daacoworks

> **[The Best Assets Operations and Maintenance Management software | CMMS | SCADA...](https://www.daacoworks.com/)**
>
> Cloud based, Mobile App based, Assets Operations and Maintenance Management Software. built for maintenance team. CMMS, Asset Management, SCADA, Data Historian, Remote Access, IoT Edge Software | Daacoworks | Prism
