Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2008, 05:41:08 PM
Home Help Search Calendar Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  Robot Help and Discussion Center
| |-+  ABB Robots (Moderators: Werner Hampel, Sven Weyer, Jim Tyrer)
| | |-+  setting values of jointtarget, IRC5/RS5.09
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: setting values of jointtarget, IRC5/RS5.09  (Read 435 times)
Jim Tyrer
Global Moderator
Sr. Member
*****
Offline Offline

Gender: Male
Posts: 383


If all else fails, read the manual.


« on: September 30, 2007, 04:15:55 PM »

I have in MainModule, and above (outside) of main():

   CONST jointtarget shaftRdyJnt := [[-35,10,0,0,-5,0],[9E9,9E9,9E9,9E9,9E9,9E9]]; !global pos above shaft station
   VAR jointtarget targetJnt; !global target joint angles

and in module recover.posfilter() I have tried:

    targetJnt := shaftRdyJnt;

    targetJnt.robax := shaftRdyJnt.robax

    targetJnt.robax.rax_1 := shaftRdyJnt.robax.rax_1;

None of the above statements set any values of targetJnt for me, and targetJnt remains with all fields zero. kopfkratz
It appears to simply overwrite all of targetJnt's fields with zero, even if I preset any fields with a non-zero value.

Anyone out there with any ideas? (or also working on Sunday? )
Thanks
JimT
« Last Edit: September 30, 2007, 04:18:50 PM by Jim Tyrer » Logged
vulpes_h
Newbie
*
Offline Offline

Posts: 11


« Reply #1 on: October 05, 2007, 07:03:51 PM »

%%%
  VERSION:1
  LANGUAGE:ENGLISH
%%%

MODULE Vulpes
    CONST robtarget pHomePosition:=[[1091.72,-8.63,873.12],[0.873029,-0.003156,-0.487658,-0.001427],[-1,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
  PERS jointtarget jpos10:=[[0,0,0,0,0,0],[0,9E+09,9E+09,9E+09,9E+09,9E+09]];
  CONST jointtarget jpos11:=[[0,0,0,0,0,0],[0,9E+09,9E+09,9E+09,9E+09,9E+09]];

  PROC go_sync()
  VAR jointtarget jpos12:=[[0,0,0,0,0,0],[0,9E+09,9E+09,9E+09,9E+09,9E+09]];
  VAR robtarget P10;
  LOCAL VAR num angelHP6;
  LOCAL VAR num OpenHP1;
  LOCAL VAR num i;

 
   jpos12:= jpos10;

    MoveAbsJ [[0,0,0,0,0,0],[9E+009,9E+009,9E+009,9E+009,9E+009,9E+009]]\NoEOffs,v1000,z50,tDuese45;

     Jnt := [[0,0,0,0,0,0],[9E+009,9E+009,9E+009,9E+009,9E+009,9E+009]];

    tmp:=CRobT();
    P10.extax.eax_a:=tmp.extax.eax_a;

        FOR angelHP1 FROM 40 TO -40 STEP -20 DO
      FOR angelHP6 FROM 30 TO -30 STEP -15 DO
        MoveAbsJ [[angelHP1,angelHP6+10,angelHP6,angelHP6/4,angelHP6,angelHP6*5],[OpenHP1,9E+09,9E+09,9E+09,9E+09,9E+09]]\NoEOffs,vmax,z150,tool0;
      ENDFOR
    ENDFOR

  ENDPROC


PROC MoveToHomePos()
    VAR jointtarget j1;
    VAR jointtarget j2;

    TPWrite stErrortext{116};
    ! Check if robot is in ok area before movement!
    bDummyBool:=FALSE;
    WHILE bDummyBool=FALSE DO
      bDummyBool:=TRUE;
      j1:=CJointT();
      j2:=CalcJointT(pHomePosition,tGripper\WObj:=wobj0);
      IF Abs(j1.robax.rax_1-j2.robax.rax_1)>10 bDummyBool:=FALSE;
      IF Abs(j1.robax.rax_2-j2.robax.rax_2)>25 bDummyBool:=FALSE;
      IF Abs(j1.robax.rax_3-j2.robax.rax_3)>25 bDummyBool:=FALSE;
      IF Abs(j1.robax.rax_4-j2.robax.rax_4)>20 bDummyBool:=FALSE;
      IF Abs(j1.robax.rax_5-j2.robax.rax_5)>30 bDummyBool:=FALSE;
      IF Abs(j1.robax.rax_6-j2.robax.rax_6)>25 bDummyBool:=FALSE;
      IF bDummyBool=FALSE TPReadFK nDummyNum,stErrortext{128},stErrortext{100},stErrortext{100},stErrortext{100},stErrortext{100},stErrortext{99};
    ENDWHILE
    MoveJ pHomePosition,v500,z10,tGripper;
    ! End Proc
  ENDPROC


ENDMODULE
Logged
Sven Weyer
Global Moderator
Jr. Member
*****
Offline Offline

Gender: Male
Posts: 53



« Reply #2 on: October 08, 2007, 11:56:27 AM »

Hi Jim,
try to change the parameter 'targetJnt' to a 'PERS' value. Then you can see the value after safe the module. But when you use the 'VAR' parameter you can't see the the value of this variable.
The next is when you call a routine or you use the 'call main routine' then will be reset all 'VAR' variables on the init. value.

I hope I can help you.

Sven
Logged

Nobody is perfekt!
Jim Tyrer
Global Moderator
Sr. Member
*****
Offline Offline

Gender: Male
Posts: 383


If all else fails, read the manual.


« Reply #3 on: October 08, 2007, 03:11:15 PM »

Thanks for the feedback, guys.

I know that PERS means "persistent", now does that mean that
PERS statement is same as CONSTANT, like you cannot change the value of a PERS var,
or is a PERS var just stored like a GLOBAL?
Logged
Sven Weyer
Global Moderator
Jr. Member
*****
Offline Offline

Gender: Male
Posts: 53



« Reply #4 on: October 09, 2007, 12:38:01 PM »

Hi Jim,
no the PERS is not the same like a CONST variable. You can change any time the value of the PERS variable. But the diffrent of the PERS and the VAR variable is the VAR will be reset automaticlly by a restart of the program by main or you select a routine by manually.

All variable declarations are be GLOBAL but you use at the MODULE the LOCAL part.
Example:
LOCAL PERS bool bTest. This bTest is only exsisting at the MODUL but when you make following declaration: PERS bool bTest the variable will the GLOBAL exsisting.

Sven
Logged

Nobody is perfekt!
vulpes_h
Newbie
*
Offline Offline

Posts: 11


« Reply #5 on: October 12, 2007, 01:40:44 PM »

What you could do is create your own Move instruction which includes the stuff you want to do after the motion. Here is just a simple example how to do it, have also included the array stuff.

%%%
  VERSION:1
  LANGUAGE:ENGLISH
%%%

MODULE ABB
  VAR robtarget myTarget{2}:=[[[0,0,0],[1,0,0,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],[[0,0,0],[1,0,0,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]];
  VAR robtarget myTarget1:=[[0,0,0],[1,0,0,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
  VAR robtarget myTarget2:=[[0,0,0],[1,0,0,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
  VAR robtarget myTarget3:=[[0,0,0],[1,0,0,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

  !My special instruction
  PROC MyMoveL(
    robtarget mytarget,
    speeddata myspeed,
    zonedata myzone,
    PERS tooldata mytool,
    PERS wobjdata mywobj)

    MoveL mytarget,myspeed,myzone,mytool\WObj:=mywobj;
    !do the drill stuff
    rDrill;
  ENDPROC

  !
  PROC main()
    !IF you want to loop thru the array of robtargets
    FOR i FROM 1 TO 2 DO
      MyMoveL myTarget{i},v200,z1,tool0,wobj0;
    ENDFOR
    !
    !or just if you want to have the motion instruction in a flow
    MyMoveL myTarget1,v200,z1,tool0,wobj0;
    MyMoveL myTarget2,v200,z1,tool0,wobj0;
    MyMoveL myTarget3,v200,z1,tool0,wobj0;
  ENDPROC
ENDMODULE


_________________
Per Svensson
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.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!