Welcome, Guest. Please login or register.
Did you miss your activation email?
February 09, 2012, 03:52:36 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
| |-+  Yaskawa Motoman Robot Forum (Moderators: Fabian Munoz, Napierian)
| | |-+  Coordinated Motion with two robots
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Coordinated Motion with two robots  (Read 650 times)
mharper
Guest
« on: March 08, 2010, 07:44:48 PM »

Hello,

I am a newbie to working with robots.  I am trying to coordinate the motion of two robots (HP50-20 and HP5) with NX100 controller.  I am working offline and using MotoSimEG-VRC for testing and, quite honestly, know very little about what I'm doing.  I have defined the HP5 as RB1 and HP50-20 as RB2.  I have pasted three jobs below.  The master job starts two jobs, one for each robot (I didn't include JOB_RB1 as it just calls a series of jobs, the first being CJOB_1).  Essentially, one robot moves to a position (in JOB_RB2), then signals the other robot to move through a series of positions (in CJOB_X, the first group of positions defined in CJOB_1).  My current problem is that it appears that both robots are trying to use the same position info.  For example, if the HP50-20 (RB2) moves properly to its first position, then it appears that the HP5 (RB1), when it moves to its first position, is using the RB2 pulse info, eventually reaching a limit and stopping with an alarm.   This question probably has many answers, but what am I missing?


As an aside, I have no documentation on the PSTART/PWAIT commands.  I found references to them on this forum.  Is there a manual that documents these?

Any help is much appreciated.  Thanks



/JOB
//NAME MASTER
//INST
///DATE 2010/02/24 09:23
///COMM
///ATTR SC,RW
NOP
PSTART JOB:JOB_RB2 SUB2
PSTART JOB:JOB_RB1 SUB1
PWAIT SUB1
PWAIT SUB2
END


/JOB
//NAME JOB_RB2
//POS
///NPOS 0,0,0,59,0,0
///TOOL 1
///POSTYPE PULSE
///PULSE
P0000=0,0,0,0,0,0
P0001=-16863,32236,-73836,38050,140418,82587
P0002=-32518,43281,-42629,50995,139786,91833
...
P0058=-43342,38874,10773,70575,134414,-81943
//INST
///DATE 2010/02/24 09:23
///COMM
///ATTR SC,RW
///GROUP1 RB2
///LVARS 0,0,0,0,0,0,0,0
NOP
SET I001 0
*BEGIN
INC I001
JUMP *FINISH IF I001=59
DOUT OT#(1) OFF
MOVJ P[I001] VJ=50 PL=0
TIMER T=1.0
DOUT OT#(1) ON
WAIT OT#(4)=ON
DOUT OT#(1) OFF
TIMER T=3.0
JUMP *BEGIN
*FINISH
END


/JOB
//NAME CJOB_1
//POS
///NPOS 0,0,0,14,0,0
///TOOL 0
///POSTYPE PULSE
///PULSE
P0000=0,49703,31673,0,3736,0
P0001=0,49703,31673,0,3736,0
P0002=0,49703,31673,0,3736,-17067
...
P0013=0,49703,31673,0,3736,-204800
//INST
///DATE 2010/02/24 09:23
///COMM
///ATTR SC,RW
///GROUP1 RB1
///LVARS 0,0,0,0,0,0,0,0
NOP
SET I000 0
DOUT OT#(2) OFF
TIMER T=0.5
WAIT OT#(1)=ON
DOUT OT#(4) OFF
*1
INC I000
DOUT OT#(2) OFF
MOVJ P[I000] VJ=50 PL=0
JUMP *2 IF I000=13
JUMP *1
*2
MOVJ P000 VJ=50 PL=0
PULSE OT#(4) T=1.0
DOUT OT#(2) OFF
TIMER T=1.0
END

Logged
95devils
Sr. Member
****
Offline Offline

Posts: 312


« Reply #1 on: March 08, 2010, 11:10:30 PM »

I see at least part of the problem.  Don't know where the problem came from.  In the header for both jobs, position variables are referenced.  They are the same position variables.  If you tell either robot to move to P000 the robot is moving to P000.  Who is moving is whoever is in the control group of that job.

I don't understand how this could happen.  P000 through whatever is global.  There can only be one set of numbers for it.  Not two separate pieces of data.  When you define the P-Variable in EG-VRC it is one set of numbers not two.

I'll try something like this in EG-VRC and let you know the results.
Logged

Alcohol:  The cause and solution to all life's problems
Fabian Munoz
Global Moderator
*****
Offline Offline

Gender: Male
Posts: 862


Uruguay Campeon de America 2011 !!!!!!!!!!


« Reply #2 on: March 09, 2010, 02:36:08 AM »

I have / had similar issues with Motosim a P var.
It doesnt work (maybe is my fault) nicely when you star copying, importing, etc programs that uses P var.
It just doesnt know who P000 (for example) belongs to, seems to me that all the P var go to a databank and any program can use them.

mharper, try this:
Write a test prog where robot A uses P000 to 049 and robot B P050 to P099 and modify your I000 and I001 accordingly. See how it works

As far as what 95devils wrote (which is actually what trigger my neuron), i see that the little robot is trying to go as many pulses as the big robot, this maybe possible looking at the pulse numbers but once  the pulses are calculate to actuals distances, the little robot fails



Logged

somar
mharper
Guest
« Reply #3 on: March 09, 2010, 02:58:11 PM »

Thanks 95 and somar!  I think I get the picture.  To be more clear, I generated these jobs outside of VRC so it's my fault that the problem is occurring.

I think what you are telling me is that the P vars are global and therefore, I can't have two sets of vars that use the same indices.  This makes sense as if I change the order of the PSTARTs in the master job, it switches the set of vars that the robots use.  I'll update and let you know what happens.

BTW, how many P vars can be defined in a job?  I think I read somewhere that it was something like 128.  If so, that will severely limit what I'm trying to do since each robot will generally have more than that.  My plan was to split each robot's positions over multiple jobs but if the two robots cannot share P var indices, how should I handle that?

Thanks again.
Logged
Fabian Munoz
Global Moderator
*****
Offline Offline

Gender: Male
Posts: 862


Uruguay Campeon de America 2011 !!!!!!!!!!


« Reply #4 on: March 09, 2010, 04:15:33 PM »

Hi:

Are you sure you are a newbie ?

I think is around 150 or so, there are NO hundreds of them.  You have to take care of the number of P you use.

Anyway, I dont know your applicaction but these are 2 ways to save P var

1) Use SHIFTON/SHIFTOFF
2) Use IMOV
Logged

somar
mharper
Guest
« Reply #5 on: March 09, 2010, 07:25:12 PM »

Yes, absolutely positive I'm a newbie, although I've been playing around with MotoSim EG part time for ~two months and now MotoSimEG-VRC for about a week.  It's quite funny actually...I haven't even seen the real robots yet because things keep getting delayed but that's another story.

The gist of my application is this.  The HP5 will hold a test sample fixed at a given location and rotated on two axes.  This test sample will be illuminated by a laser.  The HP50-20 will move a radiometer around a virtual hemisphere (~1 meter radius) normal to the test sample's current orientation taking reflectivity measurements (actually, the order of movement in the jobs I pasted is opposite to that but the end result is the same).  The angular resolution for the test sample rotated on its axes and the radiometer about the sphere are going to be user defined.  Therefore, there will potentially be thousands of positions.

I was planning to calculate these positions offline and then have an external program write the appropriate jobs with the P vars.  It sounds like I will either have to limit each robot's P vars to half the limit or do the position calculations within the jobs (which I really would rather avoid).  We also have access to Motocom SDK.  Should we consider using it to move the robots?  I've considered it but the manager was wanting to use MotoSim to test for collisions before any runs were made, which required jobs.

BTW, I've tried the suggestions, and indeed got past the issue I was having (i.e., each robot goes to its correct position initially).  That is until I reached CJOB_3.jbi.  Essentially, CJOB_3.jbi is identical to CJOB_1 with the addition of 13 additional positions.  When it gets to the first new position (i.e.,P0014) it failed again.  When I looked at those variables in the variable window, they were populated with data from the other robot which I assumed got loaded from earlier runs before I made the changes to my jobs.  I cleared all those positions and reran.  However, I then got an error that the position was undefined.  So, when I call a job, the position data in the header is not loaded?  I had assumed that when the called job runs, it would load the positions from that job, overwriting any existing ones.
Logged
tony gast
Hero Member
*****
Offline Offline

Gender: Male
Posts: 700


Can I barrow a cup of robots?


« Reply #6 on: March 09, 2010, 08:15:22 PM »

If you load jobs into a controller the last job loaded will overwrite the Pvars if the are used in other jobs.....
Now on XRCs I know that the numbers in variable memory can be arranged  to give more Ps and no base or EX if not needed....just can't remember if this is Yaskawa parameter or user accessible...... I am pretty sure you can do this on a NX100 as well....

I have had many robots with double PVARs and using VDE and had trouble with PVARS as I loaded the job in queue. so I expanded the Ps and got rid of the base and ex.....triple the Ps
Logged

Oh, well
Robo Guru
Sr. Member
****
Offline Offline

Gender: Male
Posts: 464



« Reply #7 on: March 10, 2010, 02:05:43 AM »

I think parameters can be changed to expand the number of P-Variables available to you.  Not too certain what the ultimate limit is though...

These paramters are the Motoman only type so you may want to give them a call.
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!