- Posts: 11
- Thank you received: 0
Need a HELP on G-Code
- SKH
- Offline
- New Member
-
:laugh: lol.. Most of the Sri Lankan wall-sockets and plugs are just like that.
We re using genserkins.
which means can't we get the XYZ coordinates directly without building the source??
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19899
- Thank you received: 4655
SKH wrote: sing genserkins.
which means can't we get the XYZ coordinates directly without building the source??
OK, genserkins is a good start.
Genserkins and Joints_axes is probably a better combination, and is something you should consider, but is not 100% necessary.
Are the XYZABC coordinates on the screen correct? Is the problem that your logging process it capturing joint positions and not cartesian positions?
What is the teach process you are using?
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
-
- Posts: 22
- Thank you received: 240
It is in src/emc/usr_intf/axis/scripts in the sources, but I don't know where it is or if it is installed in a distro.
Should give you a starting point.
I am also not sure what positions you are after, but AFAIK the motion planner works in cartesian planes even if the end result is different from the output that would produce.
Please Log in or Create an account to join the conversation.
- SKH
- Offline
- New Member
-
- Posts: 11
- Thank you received: 0
we are using the get_cart() function to save Cartesian coordinates.(Q1.Is this function doing that?)
here Ive attached a file ,that i saved from this method.
As you can see there are 6 values saved each time.(Q2.why we are getting 6 values when i use get_cart(). it should be X,Y,Z only right?)
(Q3.can't we use joint values to make the g-code?)
also we haven't configure those DH parameters yet.(we taught it is not necessary since we are manually recording the coordinates other than running a direct G-code,) ( Q4.is it a must to configure DH parameters?)
right now we are able to Home the robot arm successfully.
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
-
- Posts: 22
- Thank you received: 240
SKH wrote: We referred the modified version of teach-in.py given in the below link.
The link didn't show up, (you don't need to use the URL bracket pairs, they don't seem to work for some reason)
forum.linuxcnc.org/forum/41-guis/25849-t...eration?limitstart=0
I presume you mean this script
forum.linuxcnc.org/media/kunena/attachme...16368/Teachin.py.txt
we are using the get_cart() function to save Cartesian coordinates.(Q1.Is this function doing that?)
To see what you are getting, you need to read
src/emc/usr_intf/axis/extensions/emcmodule.cc
src/hal/halmodule.cc
www.linuxcnc.org/docs/devel/html/man/man9/axis.9.html
here Ive attached a file ,that i saved from this method.
As you can see there are 6 values saved each time.(Q2.why we are getting 6 values when i use get_cart(). it should be X,Y,Z only right?)
You have said your machine is 6 axis and your photo of the DRO shows XYZABC, so why would you expect only XYZ ?
(Q3.can't we use joint values to make the g-code?)
That is the whole point of a teach program
You could have the teach-in.py script write out as GCode, but you would need to process the fields in position first, to insert modal codes and axis letters into the string.
( Q4.is it a must to configure DH parameters?)
What do you mean by DH ?
If you mean must you have the machine homed before starting, yes otherwise there is no base reference for the values that you output.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19899
- Thank you received: 4655
No. If you consider the end-point to be the centre of the circle that forms the "hand" of the arm, then consider how many ways that you can put that centre point in a give XYZ position in space you will see that here are an infinite number of solutions.SKH wrote: As you can see there are 6 values saved each time.(Q2.why we are getting 6 values when i use get_cart(). it should be X,Y,Z only right?)
The positions you are getting are the XYZ point in space and the ABC anglular positions of the end-effector in space.
Put more simply, you need 6 inputs to solve the 6 degree-of-freedom equations that define the joint positions.
I think that setting the DH parameters correctly will be absolutely necessary to get the machine to work properly.also we haven't configure those DH parameters yet.(we taught it is not necessary since we are manually recording the coordinates other than running a direct G-code,) .
If you can't jog in straight lines in cartesian space then the inverse solutions to the kinematics equations will be wrong.
Please Log in or Create an account to join the conversation.