Incorrect Axis Motion

More
9 years 3 months ago #96027 by sanmd
Replied by sanmd on topic Incorrect Axis Motion
Will do on the Notepad++.
As for the source pins, I have the following lines:
Code:
net xstep <= stepgen.0.step net xdir <= stepgen.0.dir net ystep <= stepgen.1.step net ydir <= stepgen.1.dir net zstep <= stepgen.2.step net zdir <= stepgen.2.dir
These lines are all below the net lines I listed in the above post but the device kind of works so I assume hal doesn't exactly read top to bottom? A question I have is about the meaning of the numbers after stepgen. I thought those related to the axis or port or something and tried changing the parport lines like this:
Code:
net ystep => parport.0.pin-04-out setp parport.0.pin-04-out-reset 1
to this (changing the '0' to a '1'):
Code:
net ystep => parport.1.pin-04-out setp parport.1.pin-04-out-reset 1
only to get errors. Also, is there anything else that needs to be done for source pins? So far, I think I've figured out there's a problem with the dir pins because the tool only moves towards one direction.

Please Log in to join the conversation.

More
9 years 3 months ago #96028 by PCW
Replied by PCW on topic Incorrect Axis Motion
parport.1.xxxxxx would refer to the second parallel port (parallel ports are numbered 0,1,2,3 etc)

If you dont have two parallel ports or if the second port is not in output mode,
the pin parport.1.pin-04-out-reset would not exist, so you would get a error

The order of net commands does not matter

The numbers after stepgen are enumerations, that is how you separate one stepgen from another,
so if you had 3 stepgens for as 3 axis machine they would normally be numbered 0,1,2
They are commonly assigned
0 = X
1 = Y
2 = Z
but this is arbitrary

Please Log in to join the conversation.

More
9 years 2 months ago #96995 by sanmd
Replied by sanmd on topic Incorrect Axis Motion
Turns out the code was OK. There was a misplaced jumper on the board that was causing problems. With that reset, the axes actually move normally again. Thank you all for the help!

On a separate note, does LinuxCNC automatically deal with homing and limit switches in their own unique way? I'm having an issue where the home switches act like limit switches though they are clearly coded as home switches. I get an error along the lines of
Code:
joint 0 ..... <something, something>
which I think is resulting from homing not happening before a limit switch is thrown so that'll probably be sorted when homing is.

Is it possible to hard-code an origin for the machine and have it return there every time it finishes up so that it doesn't have to home?

Thank you!

Please Log in to join the conversation.

More
9 years 2 months ago #96996 by andypugh
Replied by andypugh on topic Incorrect Axis Motion

sanmd wrote: On a separate note, does LinuxCNC automatically deal with homing and limit switches in their own unique way?


Yes. In HAL there is a separate input for home and for max and min limit.
A common setup is
Code:
net both-x parport.0.pin-01-in => joint.0.pos-lim-sw-in joint.0.neg-lim-sw-in joint.0.home-sw-in
(I might well not have the pin names 100% correct there)
Each of the three inputs does a different thing, but they can all be connected to the same physical input pin.

If the home switches and limit switches are the same input, then you need to set
Code:
HOME_IGNORE_LIMITS
in the INI file to tell LinuxCNC to ignore the limit switches when homing.

Please Log in to join the conversation.

Time to create page: 0.043 seconds
Powered by Kunena Forum