# Chart Monitoring Example

**HMI Panel File**

<figure><img src="/files/jqrWnFiDglq1Tm4V7spC" alt=""><figcaption></figcaption></figure>

{% file src="/files/UzfQBAofw7xdD1LPJ7l2" %}
HMI panel file
{% endfile %}

**Robot Program File**

```python
# joints values
j1 = 0
j2 = 0
j3 = 0
j4 = 0
j5 = 0
j6 = 0

# TCP position
x = 0
y = 0
z = 0

# joints torque
t1 = 0
t2 = 0
t3 = 0
t4 = 0
t5 = 0
t6 = 0

# joints motor temperature
temp1 = 0.0
temp2 = 0.0
temp3 = 0.0
temp4 = 0.0
temp5 = 0.0
temp6 = 0.0

# controller outputs
o1 = 0
o2 = 0
o3 = 0
o4 = 0

# controller temperature
controller_tmp = 0

def bool_to_int(val):
    if val:
        return 1
    else:
        return 0
    end
end

# update thread
thread update():
    while True:
        joints = get_actual_joint_positions()
        j1 = joints[0]
        j2 = joints[1]
        j3 = joints[2]
        j4 = joints[3]
        j5 = joints[4]
        j6 = joints[5]

    	tcp = get_actual_tcp_pose()
    	x = tcp[0]
    	y = tcp[1]
    	z = tcp[2]

    	torques = get_joint_torques()
    	t1 = norm(torques[0])
        t2 = norm(torques[1])
        t3 = norm(torques[2])
        t4 = norm(torques[3])
        t5 = norm(torques[4])
        t6 = norm(torques[5])

        temp1 = get_joint_temp(0)
        temp2 = get_joint_temp(1)
        temp3 = get_joint_temp(2)
        temp4 = get_joint_temp(3)
        temp5 = get_joint_temp(4)
        temp6 = get_joint_temp(5)

        o1 = bool_to_int(get_standard_digital_out(0))+6
        o2 = bool_to_int(get_standard_digital_out(1))+4
        o3 = bool_to_int(get_standard_digital_out(2))+2
        o4 = bool_to_int(get_standard_digital_out(3))+0

        controller_tmp = get_controller_temp()
        sync()
    end
end

run update()
```

{% file src="/files/NfYxFYhCHaMrOBPQDj3W" %}
Script to get robot data
{% endfile %}

{% file src="/files/Q3vGaPjOCv0GVaV0nI1T" %}
Robot program
{% endfile %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.robpod.cloud/hmi-designer/working-examples/universal-robots/chart-monitoring-example.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
