You really need to read the manuals we're suggesting because at some point other members may not assist you as they may think they are doing the work for you.
I can give you a 'great' tip which I hope you can understand when you are reading other peoples code, if it contains unknown/complex code.
- Break the step into sections, don't try and understand the complete step as often you get confused with variable names use.
- Look up the first command used in the manual (this will tell you what the intention is and provide an example).
- Look at the variables used and values associated with them and apply them using the example above.
Here is a quick example using a snippet from your backup relating to your HOME question to try and help you understand:
- You mentioned about a line relating to SETHOME in the main program.....So I searched for the command.
- I found 1 instance of it SETHOME 10,#hm;53
- I lookup SETHOME in AS Manual.
- The format of the command is SETHOME accuracy, here
- So it defines the HOME1 with the current location and with a unique accuracy around it.
- Ok, so SETHOME 10,#hm
- Therefore this is defining HOME1 with the location values of #hm with an accuracy of 10mm.
So, I scratch my head, slap computer, stroke cat, drink a coffee and wonder why they are doing it and then decide, I don't care...……
But what I can do is understand what they are doing by doing some leg work with the AS Manual to hand
- I then search for any reference to #hm and the below are the only code references of #hm....which is great as I'm only looking at a small segment
- Great, I can now break this down, understand how it's done, learn from it and possibly understand why.
POINT #hm = p[0,1]
DECOMPOSE ma[0] = #hm
IF ma[5]>180 THEN
degs = ma[5]-360
POINT #hm = #PPOINT(ma[0],ma[1],ma[2],ma[3],ma[4],degs)
ELSE
IF ma[5]<-180 THEN
degs = ma[5]+360
POINT #hm = #PPOINT(ma[0],ma[1],ma[2],ma[3],ma[4],degs)
ELSE
degs = ma[5]
END
END
SETHOME 10,#hm;53
Display More
Ok, so, again AS Manual in hand I go through each step, cross reference along the way and build up my knowledge of what is going on:
POINT #hm = p[0,1] this means define location #hm using location p[0,1].
DECOMPOSE ma[0] = #hm this means obtain all the elements for location #hm (all joint angle values) and create array.
- DECOMPOSE example in manual, confirms for me that I now have array ma[0] - ma[5] which contain joint angles for each sequential joint ma[0] = JT1 and ma[5] = JT6.
Ok, so before proceeding, it looks like p[0,1] is a master location, and that is being used to create a precision point (physical posture).
Then all joint angles are being extracted by use of DECOMPOSE.
Ok, so I can now guess before I read, it is possible now they are going to use these joint angles to manipulate/adjust/create another location, so I read on.
Nested IF statements.....super, there is a selection process here if this, do that, otherwise do something else and after that use SETHOME to create the result.
So I now look at IF/ELSE/END in the AS Manual as I'm a little unsure, but have a reference next to me.
IF ma[5]>180 THEN this means if the value of ma[5] is greater than 180 then continue.
degs = ma[5]-360 this means use the value of ma[5] and take away the value of 360 and define 'degs' with the result.
POINT #hm = #PPOINT(ma[0],ma[1],ma[2],ma[3],ma[4],degs) - This then defines #hm with the extracted values BUT uses 'degs' value for JT6 value.
The result is redefining #hm by just changing JT6 values to a calculated value.
So I look at the remaining if's and can see the same principle being applied.
At the end of the segment, the SETHOME is being used to then define the HOME1 location by the modified #hm location.
Cool, now I know what that segment of code is doing.
Using a master location and then redefining the HOME position angle of JT6 only, depending on where JT6 is.
JT1-JT5 positions are not changing, only JT6 depending on the results.
I can go one step further and see what is happening to p[0,1], is this a master location which never changes, or does this location ever change.
Well, I'm not being paid for it, so I wont...….
But I do know now is:
That if p[0,1] ever is changed, then this will create my HOME1 location posture for JT1-JT5 and the algorithm used will then set JT6 for the HOME1.
Finally, as for why they are doing this, it is quite apparent.
- To always guarantee JT1-JT5 are at the same position and also to manipulate JT6 to make sure it is at a good starting posture.
- This tells me, JT6 is required to be at a guaranteed posture, so that when it moves from here to the next programmed position, it does not try and go the other direction which may result in snapped harness or error.
This is how a manual becomes a major tool in your tool box, especially if you're learning.
Hope this helps on your journey to understanding AS in the Kawasaki.
As far as zero data is
AUX 050102 is the data that should correspond to the shipping data - Only if re-zeroing has not been carried out.
But like I said, if there has been no mechanical change, then the data from sheets could be re-entered to return to how it was from factory and may result in you not having to change any positions.
There is no automatic function to move robot to zero marks.
Except, that robot uses 0 degrees for zeroing (So again, AS Manual on how to create locations)
So create a location that has 0 deg for all joints. ie POINT #zero = #PPOINT(0,0,0,0,0,0) and then a program with JMOVE #zero.
Or move to location that has 0 deg for all joints ie JMOVE #PPOINT(0,0,0,0,0,0)
This will move robot to what it thinks zero values are, and you can visually check scribe lines on joints for alignment or not.
Hope this helps...…...