Endstop and probe wiring help

More
11 Apr 2019 14:48 #130666 by oddwick
Hello, i have what is probably a silly question, but cant seem to find an answer and i am sure that i cant be the only person in the world with this problem...

What i currently have are pair of gantry routers, and aside from scale (one is large format), they are identical in all respects. they are running on the 2.8 master branch linuxcnc so that i can use joints/axis to automatically square them (brilliant!!).

here's the rub. i dont have enough inputs for my parallel port to do everything that i need to do. both of them have been running with no z limit/home switches and instead i have been using a touch probe to set my stock surface. lately i have ran into some problems when having to stop a job or worse yet, power failures and the machine gets stuck. with the new way joints and axises are treated, i cant physically move the machine without homing first. wellllllll, when your bit is stuck in a workpiece that is a bit difficult because i cant move the z axis up. my previous homing sequence was:
z -> 0
x -> 1
y0 -> 2
y1 -> 2
with the z axis having a 0 home search velocity. prior to homing, i was able to jog the axises to some degree. after reading on slaved axises, i revised my homing sequence thus:
z -> 0
x -> 1
y0 -> -2
y1 -> -2
and now i cant jog the y axis until i home it. and if i try to jog the z axis, instead it moves y1 which is not only disastrous for a gantry, you can well imagine how that goes over in a stall situation with your bit still in the piece!

so after reading, as best as i can tell this intentionally done with linuxcnc. why, i dont know, the powers that created this software know better than i. it seems counter intuitive to have your joints separated by default and only slaved after homing. i think having your joints slaved by default and ONLY separated during the homing sequence makes much more sense, or better yet giving you the option to start off slaved or not. but thats me and not being a software engineer, take it for what its worth!

so the long and short of it is that i now need to have an endstop on my z axis so that i can lift it first because there seems to be no other way. but since a parallel port has only 5 inputs, i need 6. is there a creative way to wire this?

what i currently have is:
10 - x home
11 - y0 home
12 - y1 home
13 - estop
15 - touch probe

all of them besides the estop are wired as NO. can this be wire with maybe the z sharing the touch probe? if so, how would i set this up? my other idea was to take the estop out of software and rewire it to the controller power supply so that it kills power, but i think that opens up a whole new can of worms.

so that is why i am consulting those more informed than i. any ideas?

thanks,
dexter

Please Log in or Create an account to join the conversation.

More
11 Apr 2019 15:17 #130671 by pl7i92
you can do all home switches to one input

net all-limit-home <= parport.0.pin-10-in-not


use a NC endswitch in a row
like is showed in this video

Please Log in or Create an account to join the conversation.

More
11 Apr 2019 15:32 #130674 by Clive S

you can do all home switches to one input

net all-limit-home <= parport.0.pin-10-in-not

Are you sure? I think you need two inputs for gantry homing with 2.8 master

Please Log in or Create an account to join the conversation.

More
11 Apr 2019 15:33 #130676 by Clive S

here's the rub. i dont have enough inputs for my parallel port to do everything that i need to do.


Have you thought about a second PP as then you would have 10 inputs:)

Please Log in or Create an account to join the conversation.

More
11 Apr 2019 16:27 - 11 Apr 2019 16:50 #130680 by dgarrett

it seems counter intuitive to have your joints
separated by default and only slaved after homing.


LinuxCNC provides a generalized implementation to convert
motor positions to positions in a Cartesian framework. The
methods provided support simple machines with trivial
kinematics (like mills and lathes) *and* complex machines
that use serial kinematics (like puma robots) or parallel
kinematics (like a hexapod).

A gantry that uses two joints (motors) for a single
coordinate (axis letter) takes advantage of provisions
provided by the trivkins kinematics module but must conform
to the general methods that allow LinuxCNC to support
machines that use more complex non-identity kinematics.

In LinuxCNC (master branch 2.8~pre):

1) Joints are prime movers (typically motors).

2) Joints may be moved individually in 'joint' mode
but there are NO built-in provisions to 'slave' the
motion of multiple joints.

3) A forward kinematics transformation converts joint
positions to world (Cartesian) coordinates (xyzabcuvw).

4) Coordinated motion in Cartesian space uses an
inverse kinematics transformation to compute
joint (motor) positions from world coordinates.

5) Joints must be homed to establish a reference for
inverse kinematics transformations.

A systems integrator can implement methods to allow joint
jogging when using a gantry with synchronized (negative)
HOME_SEQUENCEs as documented here:

linuxcnc.org/docs/master/html/config/ini...l#_inhibiting_homing

Excerpt:
System integrators can allow joint jogging prior to
homing with hal logic that switches the
[JOINT_N]HOME_SEQUENCE items. This logic should also assert
the motion.homing-inhibit pin to ensure that homing is not
inadvertently initiated when joint jogging is
enabled.

Implementing this method on a gantry that uses two joint
numbers (motors) for a single coordinate (axis letter) will
by default allow joint jogging of each motor *independently*
(NOT slaved) and thus imposes the hazard of racking if not
exercised with great care by the operator.

It is unlikely that current, existing guis support
synchronizing joint jogs but a systems integrator can
implement a means to synchronize joint jogging using the
motion module's MPG (wheel) jogging facility (hal pins like
joint.N.jog-enable, jog-scale, jog-counts) or any of the
various halui methods for joint jogging.

For example (with joint jogging enabled as described above),
the following hal connections would 'slave' joints 1 and 2
for MPG jogging:
net sync12_enable <= user_panel_enable
net sync12_enable => joint.1.jog-enable 
net sync12_enable => joint.2.jog-enable

net sync12_scale  <= user_panel_scale
net sync12_scale  => joint.1.jog-scale 
net sync12_scale  => joint.2.jog-scale 

net sync12_counts <= user_panel_counts
net sync12_counts => joint.1.jog-counts
net sync12_counts => joint.2.jog-counts 

The hal sources for the user_panel_enable,scale pins would
typically be implemented in a pyvcp, gladevcp panel or an
independent application using halcmd; the user_panel_counts
is typically dervied from a jog wheel. For testing or
demonstration, it is convenient to use sim_pin as follows:
$ sim_pin sync12_enable/mode=Toggle \
          sync12_scale \
          sync12_counts

Notes:

1) With the axis gui, it is advisable to specify
non-identity kinematics when using two joints for an axis
letter, eg:

[KINS]
KINEMATICS = trivkins coordinates=xyyz kinstype=Both

2) Implementing 'slaved' joint jogging as described above
will not alter joint jogging provisions provided by an
existing gui so using gui-supported jog buttons or keyboard
jogging may lead to racking.

Additional References:

a) More information on LinuxCNC kinematics:
linuxcnc.org/docs/master/html/motion/kinematics.html

b) Cartesian coordinates:
en.wikipedia.org/wiki/Cartesian_coordinate_system

c) Kinematics:
en.wikipedia.org/wiki/Kinematics

d) trivkins man page:
linuxcnc.org/docs/master/html/man/man9/trivkins.9.html

e) sim_pin documentation:
linuxcnc.org/docs/master/html/man/man1/sim_pin.1.html

f) motion man page (MPG jog pins):
linuxcnc.org/docs/master/html/man/man9/motion.9.html
Last edit: 11 Apr 2019 16:50 by dgarrett.
The following user(s) said Thank You: Mike_Eitel, Clive S

Please Log in or Create an account to join the conversation.

More
12 Apr 2019 00:56 #130706 by oddwick
Thank you so much for such an informative reply! that really helped put a lot of things in perspective. i understand the principle of joints and axis and i figured as much where linuxcnc is a general framework.

1) Joints are prime movers (typically motors).

2) Joints may be moved individually in 'joint' mode
but there are NO built-in provisions to 'slave' the
motion of multiple joints.


what i dont understand tho is why the individual joints of an axis would ever need to be handled separately. it may be that only being familiar with cartesian machines, my understanding of an axis was a joint or multiple joints moving in concert to produce motion on the specified axis. aside from very specific instances and times(like in my case homing a gantry with 2 joints on y axis), why would one ever need to move only one joint at a time? could you give an example by chance? im having a hard time wrapping my head around the logic of it...

Have you thought about a second PP as then you would have 10 inputs:)


The thought actually crossed my mind, but then i would need another controller entirely, which would make 4 controllers for 2 machines.

you can do all home switches to one input


the problem is that i think that with a gantry on 2.8, since there are 2 separate joints homing simultaneously, that wouldnt work. in theory at least, both should hit the home switch more or less at the exact same time.

at least for the time being i think i am going to switch out my estop for z home, although i don't like relying on only software safety.

is there a way to conditionally assign pins or parport inputs in linuxcnc? that would be nice if one could say that while axis n is homing, then pin x is a home switch, but while running, then pin x is an estop, probe, limit, or whatever.

Please Log in or Create an account to join the conversation.

More
12 Apr 2019 01:11 #130707 by tommylight
You can try to set the parallel port to "x" mode, that would do 8 outputs and 9 inputs, but not all parallel ports can do that. In hal you have to change the mode when the parallel port address is
loadrt hal_parport "0x387 out"
to
loadrt hal_parport "0x387 x"
That is of the top of my head, have not used that for over 2 years, but i know it did work on all parallel ports i tested then.

Please Log in or Create an account to join the conversation.

More
12 Apr 2019 15:17 - 12 Apr 2019 15:20 #130733 by Todd Zuercher

Thank you so much for such an informative reply! that really helped put a lot of things in perspective. i understand the principle of joints and axis and i figured as much where linuxcnc is a general framework.

1) Joints are prime movers (typically motors).

2) Joints may be moved individually in 'joint' mode
but there are NO built-in provisions to 'slave' the
motion of multiple joints.


what i dont understand tho is why the individual joints of an axis would ever need to be handled separately. it may be that only being familiar with cartesian machines, my understanding of an axis was a joint or multiple joints moving in concert to produce motion on the specified axis. aside from very specific instances and times(like in my case homing a gantry with 2 joints on y axis), why would one ever need to move only one joint at a time? could you give an example by chance? im having a hard time wrapping my head around the logic of it...

Have you thought about a second PP as then you would have 10 inputs:)


The thought actually crossed my mind, but then i would need another controller entirely, which would make 4 controllers for 2 machines.

you can do all home switches to one input


the problem is that i think that with a gantry on 2.8, since there are 2 separate joints homing simultaneously, that wouldnt work. in theory at least, both should hit the home switch more or less at the exact same time.

at least for the time being i think i am going to switch out my estop for z home, although i don't like relying on only software safety.

is there a way to conditionally assign pins or parport inputs in linuxcnc? that would be nice if one could say that while axis n is homing, then pin x is a home switch, but while running, then pin x is an estop, probe, limit, or whatever.


Yes, it is possible to use one or more inputs for multiple things, depending on what the different uses are. The E-stop would not be an an option for this, since it needs to be active all the time. But probe or limit can both share pins with the home switch and I'm sure some others things could share as well. In fact it is fairly normal practice to have the home and limit switches share. What other inputs are you need?

The separation of Joints and Axis generally makes more sense with non Cartesian machines where the Joints and their movements may have no direct correlation with the XYZ axis movements (for example a robot arm with all rotating joints.)

I can think of one tortured example of a Cartesian machine where you might need to move individual joints separately. Imagine a gang router with 4 parallel Z axis. Normally you would want all 4 spindles to move up and down together as a single Z axis. But when you need to change tools you will have to readjust the depth on each spindle separately or maybe you need to compensate for varying material thicknesses of the parts placed on each spindle.
Last edit: 12 Apr 2019 15:20 by Todd Zuercher.
The following user(s) said Thank You: oddwick

Please Log in or Create an account to join the conversation.

More
12 Apr 2019 15:45 #130734 by Todd Zuercher

and now i cant jog the y axis until i home it. and if i try to jog the z axis, instead it moves y1 which is not only disastrous for a gantry, you can well imagine how that goes over in a stall situation with your bit still in the piece!


Part of your problem trying to jog in joint mode before you home the machine is what joints you have assigned to which axis. It sounds like you have joint0 assigned to X (good), joint1 assigned to Y1 (ok), joint2 assigned to Y2 (problem) and joint3 assigned to Z (problem).

Most user interfaces in Linuxcnc assign joint jogging buttons to their "normal" Cartesian axis equivalents. Joint0-X, Joint1-Y, Joint2-Z, Joint3-A... So when in joint mode before you home the machine, when you press the buttons that would normally jog the Z-axis you actually jog joint2 (one of your Y axis motors). I'd suggest switching joint 2 and 3 so that joint 2 is the Z-axis and joint 3 is your 2nd Y-axis.

That would make it possible to easily jog the X and Z before homeing. Then as DGarret mentioned in his long post there are ways to slave together the joint jogging commands, so that you could jog the Y axis before homing. Unfortunately it may not work with most of Linuxcnc's user interface jog inputs, but either a VCP jog button (gladevcp or pyvcp) or an external hard input button can be made to do it.

Please Log in or Create an account to join the conversation.

More
13 Apr 2019 01:07 #130746 by oddwick

Yes, it is possible to use one or more inputs for multiple things, depending on what the different uses are. The E-stop would not be an an option for this, since it needs to be active all the time. But probe or limit can both share pins with the home switch and I'm sure some others things could share as well. In fact it is fairly normal practice to have the home and limit switches share. What other inputs are you need?


that sounds like it could work. i know that one can use two switches on one pin for limits and home, but how would one go about setting it up for both a home switch and probe, and how would linuxcnc know the difference? when you cycled through a touch plate routine, it would show that both the probe and home have been triggered. i know i have had some errors before when homing and inadvertently tripping the probe, wouldnt the same be true in reverse?

The separation of Joints and Axis generally makes more sense with non Cartesian machines where the Joints and their movements may have no direct correlation with the XYZ axis movements (for example a robot arm with all rotating joints.)

I can think of one tortured example of a Cartesian machine where you might need to move individual joints separately. Imagine a gang router with 4 parallel Z axis. Normally you would want all 4 spindles to move up and down together as a single Z axis. But when you need to change tools you will have to readjust the depth on each spindle separately or maybe you need to compensate for varying material thicknesses of the parts placed on each spindle.


that makes alot of sense. i really like the whole joint/axis concept which makes my gantry routers much more useable. i can square it in software with minute adjustments now rather than torturous hours of measuring and adjusting endstops. now close enough really is good enough! :laugh:

i guess what i am trying to find out is where the logic of joints over axes rather than axes over joints comes from. i have a general grasp of kinematics and have used reverse kinematics, but in terms of animation. i believe that robotics and animation are similar enough that the overall concepts should hold. but when dealing with machines and motion, that the axis would be the overriding unit.

true, there are times when you would have need of moving one joint, but the vast majority of your motion takes place with in the defined axes. i think of it like a car. you have 4 tires (usually) and they all work together and convert rotary movement to linear movement in the same direction (hopefully), and even while cornering, some rotate faster than others, but they are all in concert. when you need to replace a wheel, you can rotate it arbitrarily, but that is such a rare situation compared to normal driving. but sometimes i forget about the separation between gui and linuxcnc treat axis as linuxcnc! so on reflection, i guess it is really rather more or less the job (or should be at any rate) of the gui to really know the difference! i always wondered why one would need a joint mode....

Part of your problem trying to jog in joint mode before you home the machine is what joints you have assigned to which axis. It sounds like you have joint0 assigned to X (good), joint1 assigned to Y1 (ok), joint2 assigned to Y2 (problem) and joint3 assigned to Z (problem).

Most user interfaces in Linuxcnc assign joint jogging buttons to their "normal" Cartesian axis equivalents. Joint0-X, Joint1-Y, Joint2-Z, Joint3-A... So when in joint mode before you home the machine, when you press the buttons that would normally jog the Z-axis you actually jog joint2 (one of your Y axis motors). I'd suggest switching joint 2 and 3 so that joint 2 is the Z-axis and joint 3 is your 2nd Y-axis.


ahhh interesting... that is EXACTLY what i need which is to be able to lift the z axis and then allow the machine to home normally. thank you! i wasn't aware that you were able to assign the joints arbitrarily, and thought that if you declared your machine xyyz, then your joints had to be x0 y1 y2 z3. that makes things MUCH easier! i love it when you ask for help and actually get it!

Please Log in or Create an account to join the conversation.

Time to create page: 0.201 seconds
Powered by Kunena Forum