# TO find robot speed in VAL3

• Hello all,

I'm working on a staubli TX-60 robot and am using val3 for it's programming. I'm new to val3 and i wanted to know if there was a way I could get the speed with which the robot is moving and also if there is a function to calculate the time that the robot takes to move from one position to another

• Hi Rahulsajeev0909,
Yes you can get the monitor speed of the robot by using the function getMonitorSpeed() and also set the speed by using the setMonitorSpeed() function.
For the speed monitoring of the move instruction you can use the internal clock to start a timer before the move and then stop it after the move has completed by using waitEndMove() after the move instruction. For Example:

Code
``````MoveTimer = clock()
Movej(Pick, tTool1, mPick)
waitEndMove()
MoveTimer = (clock()-MoveTimer)``````
• Hi Rahulsajeev0909,
Yes you can get the monitor speed of the robot by using the function getMonitorSpeed() and also set the speed by using the setMonitorSpeed() function.
For the speed monitoring of the move instruction you can use the internal clock to start a timer before the move and then stop it after the move has completed by using waitEndMove() after the move instruction. For Example:

Code
``````MoveTimer = clock()
Movej(Pick, tTool1, mPick)
waitEndMove()
MoveTimer = (clock()-MoveTimer)``````

The getmonitorSpeed() shows the monitor speed of the robot but we need to find the speed of the robot's movements. Is there a function to find that out??, we tried using getspeed() but couldn't find the result. Can u show me an example of how to use getspeed()??
And also the clock() function shows the time in seconds but we need to find the time taken in milliseconds as our movement is very quick and for a short distance

• You can use the clock speed to record in milliseconds, just take the value after the decimal point or you can convert directly to milliseconds if you do a conversion in the code. So if your move only takes milliseconds your timer variable looking at the clock will return 0.500 seconds and you can multiply by 1000 to output your result in ms. Your resolution is in 1ms increments

Your velocity value will be defined in the descriptor of the move you want to do, mdesc. In that datatype you will have acceleration values, decelerating values, velocity etc and the robot will be moving at the maximum capacity of those constraints so if you set it to 100% it will try move at 100%.

getSpeed will return you the translation speed of the tool but this is only calculated based on the velocity commands of the move so will be based on what values you have in the mdesc for that move.

It just takes your current tool as an argument and returns a num value so:

toolCartSpeed = getSpeed(tGripper)

Where:

toolCartSpeed is defined as a num datatype

tGripper is defined as a tool datatype

• Buenas tardes ,

where you could move and modify the speed value, acceleration of a movement in axis 2

of a staubli TS240 robot

Cheers

• Buenas tardes ,

where you could move and modify the speed value, acceleration of a movement in axis 2

of a staubli TS240 robot

Cheers

Hi,

You are able to change the motion values on the motion descriptor:

vel, accel, decel : % of nominal values on joint

Tvel : max translation velocity in mm/s at tool centre point

Rvel : max. rotation velocity in degrees/s at tool centre point

Blend: Trajectory blending. From the fastest to the slowest :

- joint: TCP trajectory (1) has no constraint between leave & reach distances

- Cartesian: The TCP can shift from the trajectory between leave & reach distances, but must stay on same plane as the trajectory

- off: no blending, the TCP stop at each point

Leave/Reach: distance to blend when leaving and reaching the point

Don't know if you are able to change individual joint values.

• ELEsgalho,

thanks for the info

• Thank you guys for the info and sorry for the late reply

Create an account