# Freedrive\_mode() argument 'a' and 'v' must be positive

**URL:** <https://forum.universal-robots.com/t/freedrive-mode-argument-a-and-v-must-be-positive/23443>\
**Category:** Report a Bug\
**Created:** [August 24, 2022, 1:13pm UTC](https://forum.universal-robots.com/t/freedrive-mode-argument-a-and-v-must-be-positive/23443 "2022-08-24T13:13:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cg1](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@cg1](https://forum.universal-robots.com/u/cg1)\
**Post date:** [August 24, 2022, 1:13pm UTC](https://forum.universal-robots.com/t/freedrive-mode-argument-a-and-v-must-be-positive/23443/1 "2022-08-24T13:13:26Z")

</div>

Steps to reproduce:  
call the script function freedrive\_mode(), without any inputs, multiple times in a row without caliing end\_freedrive\_mode()

Expected Behavior:  
would expect the the robot to go into freedrive and stay in freedrive

Actual Behavior:  
Crashes with a Error popup saying freedrive\_mode: argument ‘a’ and ‘v’ must be positive

Workaround Suggestion:  
downgrade to 5.11 or remember to end freedive mode before starting it again.

Robot Serial Number:  
in house robot: 20225201500  
and two more with unknown serial number out in the field

Affected Version(s):  
both version 5.12.1.xxxx and 5.12.2.xxxx seems to have the issue

---

<div class="post-metadata">

**Author:** ![jorge](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jorge](https://forum.universal-robots.com/u/jorge)\
**Post date:** [September 12, 2022, 10:11pm UTC](https://forum.universal-robots.com/t/freedrive-mode-argument-a-and-v-must-be-positive/23443/2 "2022-09-12T22:11:14Z")

</div>

Hi, I’m seeing the exact same problem, were you able to work around it?

Thanks,

---

<div class="post-metadata">

**Author:** ![jorge](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jorge](https://forum.universal-robots.com/u/jorge)\
**Post date:** [September 13, 2022, 1:19am UTC](https://forum.universal-robots.com/t/freedrive-mode-argument-a-and-v-must-be-positive/23443/3 "2022-09-13T01:19:47Z")

</div>

I was able to figure out what the issue is.

This error happens if you continuously send a freedrive \_mode() command. The fix for me was to send the command and then basically go into a loop with a wait inside until I want to exit the command or stop the program.

FYI

---

<div class="post-metadata">

**Author:** ![matthias.bayerer](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@matthias.bayerer](https://forum.universal-robots.com/u/matthias.bayerer)\
**Post date:** [September 15, 2022, 7:09am UTC](https://forum.universal-robots.com/t/freedrive-mode-argument-a-and-v-must-be-positive/23443/4 "2022-09-15T07:09:05Z")

</div>

Hello @cg1,

![Freedrive_Program](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/1/110d4eacc1529397a87a8ed98bd8e30fe94c393b.png)

This is an example how it would work. You just start the Freedrive mode and then make a query for the User which says “Freedrive is now active!” or something like this. When the User now presses the “Yes”-button the if-query ends the freedrive mode with “end\_freedrive\_mode()”

The freedrive is active till you press the button, the programs basiclly waits for your input.

Best regards  
Matthias

---

<div class="post-metadata">

**Author:** ![cg1](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@cg1](https://forum.universal-robots.com/u/cg1)\
**Post date:** [September 22, 2022, 10:53am UTC](https://forum.universal-robots.com/t/freedrive-mode-argument-a-and-v-must-be-positive/23443/5 "2022-09-22T10:53:43Z")

</div>

Hi Jorge and Matthias  
Thanks for the response, nice to know that the error can be mediated.  
I will make the changes suggested, but would still consider it a bug because of the change in behavior between versions, it would at least be nice with a better error popup…

and Again Thanks
