Welcome, Guest. Please login or register.
Did you miss your activation email?
February 09, 2012, 06:24:38 AM
Home Help Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question / Answer to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  Industrial Robot Help and Discussion Center
| |-+  Stäubli & Bosch Robot Forum (Moderators: Werner Hampel, Jim Tyrer, Martin H, Fabian Munoz)
| | |-+  how to stop tx60 on the trajectory immidiately
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: how to stop tx60 on the trajectory immidiately  (Read 849 times)
CrossConnect
Newbie
*
Offline Offline

Gender: Male
Posts: 14


WWW
« on: June 30, 2010, 02:13:29 PM »

hi all

I want to stop the robot(CS8 cntlr) as soon as the user presses the F1 key on the user page. The robot should stop on trajectory where it is with out completing it's on going move command. I don know how to do it. I am very new to saubli kindly help.
I have been programming Kuka for quite a lot there i  use the interrupt feature to stop the robot on trajectory.
Your help is greatly appreciated
 
Logged

You get what you want, Think big to get big
Jim C
Stäubli Robotics Support
*****
Offline Offline

Gender: Male
Posts: 89



« Reply #1 on: June 30, 2010, 03:57:07 PM »

The TX60 and CS8C controller use the VAL3 programming language.

You want to use the instruction stopMove() or resetMotion(). If you use stopMove() The arm will stop, but you can resume moving and finish the pending trajectories using restartMove() instruction. The resetMotion() instruction stops the arm and cancels and remaining trajectories.

The operator can also stop the arm by pressing the move/ hold button on the pendant.
Logged
CrossConnect
Newbie
*
Offline Offline

Gender: Male
Posts: 14


WWW
« Reply #2 on: July 02, 2010, 08:42:10 AM »

thanks jim
But I have requirement not that simple
I have a task1 running
the task detailed below

programme task1
begin
 while(true)
   movej(p1,flange,mNormal)
   movej(p2,flange,mNormal)
   movej(p3,flange,mNormal)
   movej(p4,flange,mNormal)
 endwhile
end

program start()
begin
 taskCreate "T1",100,task1()
end

now i want to stop to stop this robot in between
when i press F1 on userPage
can u suggest me how to do it where should i palce resetMotion() or stopMove()
 
Logged

You get what you want, Think big to get big
klausi
Newbie
*
Offline Offline

Posts: 11


« Reply #3 on: July 02, 2010, 11:09:24 AM »

Hi CrossConnect

I would suggest you to create a newy programm that would run in an extra task. This programm should periodically check if user presses F1 .  
When this event occurs, this program should issue a stopMove() command.

You could use the workingMode instruction to check robot(trajectory generator)  state.

I imagine something like :


program auxiliary()
begin
  while true
    l_nKey=getKey()
    workingMode(nIsHold)
    switch l_nKey
      // F1 key
      case 271
        if nIsHold==2
          restartMove()
        else
          stopMove()
        endIf
      break
    endSwitch
delay(0)
  endWhile
end


program start()
begin
taskCreate "T1",100,task1()
 taskCreate "tAux",100,Auxiliary()
end
« Last Edit: July 02, 2010, 11:12:30 AM by klausi » Logged
Jim C
Stäubli Robotics Support
*****
Offline Offline

Gender: Male
Posts: 89



« Reply #4 on: July 02, 2010, 03:03:50 PM »

The code klausi has works for stopMove(), for resetMotion() you would need to also need to stop the task with the robot motion. Otherwise, the next move instruction will cause the arm to start moving again.
Logged
CrossConnect
Newbie
*
Offline Offline

Gender: Male
Posts: 14


WWW
« Reply #5 on: July 03, 2010, 10:50:12 AM »

Hi CrossConnect

I imagine something like :


program auxiliary()
begin
  while true
    l_nKey=getKey()
    workingMode(nIsHold)
    switch l_nKey
      // F1 key
      case 271
        if nIsHold==2
          restartMove()
        else
          stopMove()
        endIf
      break
    endSwitch
delay(0)
  endWhile
end


program start()
begin
taskCreate "T1",100,task1()
 taskCreate "tAux",100,Auxiliary()
end
hi klausi
I ran the programe it did stop the robot but did pressing F1 again did not start the motion. I tried in the simulator , not on the robot
Kibdly can u explain me the following doubts
1> why is the delay() command there in the auxiliary programme
2> did i understand the program correctely, if i say that the if programme checks if the robot is in hold conditin or not based on it , it starts the motion via "resetMotion()" or stops the robot via "StopMove()"
3> if i kill the task "T1" if F1 is sensed is it different from stop move in this case.  Killing a motion process did stop my robot but isit the correct way

thanks
 aktion066


Logged

You get what you want, Think big to get big
klausi
Newbie
*
Offline Offline

Posts: 11


« Reply #6 on: July 05, 2010, 10:36:06 PM »

Hi crossConnect

1) Delay(0) is for multitasking purpose. I write it systematically when I write a program with an endless loop that's aimed to run in a task.

2) I did not have the opportunity to test the sample program I wrote. I wanted that if you press F1 and the robot is moving (not hold mode) then the robot should stop. On the contrary , if robot is in hold mode, the robot should restart (restartMove and not resetMotion as you mentionned)

3) if you kill T1, I'm quite sure it will stop the motion since a resetMotion() in implicitly executed , but this is not really a proper way to proceed.

You may have to use the get() function instead of getKey() since this last one is non-blocking. The program loops so fast that it alternatively issues stopMove() and restartMove() during one "human" keypressed time.

best regards

Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!