# Production Mix Example

**HMI Panel File**

<figure><img src="/files/60c9SWit2Nxzvnfm1MOf" alt=""><figcaption></figcaption></figure>

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

**Robot Program File**

```python
# variables can also be defined as installation variables to keep in memory their last value
square_count = 0
triangle_count = 0
circle_count = 0
square_target = 0
triangle_target = 0
circle_target = 0

# production task for every different format
def square_task():
    square_count = square_count + 1
    sleep(1)
end

def triangle_task():
    triangle_count = triangle_count + 1
    sleep(1)
end

def circle_task():
    circle_count = circle_count + 1
    sleep(1)
end

# main production task
def start_task():
    while square_count < square_target or triangle_count < triangle_target or circle_count < circle_target:
    	if square_count < square_target:
            square_task()
	    end

	    if triangle_count < triangle_target:
            triangle_task()
	    end

	    if circle_count < circle_target:
            circle_task()
	    end
    end
end

# restore variables to initial values
def reset_task():
    square_count = 0
    triangle_count = 0
    circle_count = 0
    square_target = 0
    triangle_target = 0
    circle_target = 0
end
  
```

{% file src="/files/4Y1SF3sO1ppUmnjnpBnY" %}
Script to perform production mix tasks
{% endfile %}

{% file src="/files/JGfQnZHzoVHVsDmRLHRB" %}
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/production-mix-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.
