multiple motion probe inputs

More
07 Jan 2021 16:20 #194372 by andypugh
One very simple hardware solution would be to plug the probes into headphone jacks that have a built-in switch. Or one of the DC power jacks which also tend to have a contact that closes when the plug is removed: uk.rs-online.com/web/p/dc-power-connectors/7684412/
The following user(s) said Thank You: alkabal

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

More
08 Jan 2021 13:01 - 08 Jan 2021 13:02 #194483 by alkabal
Hi

Yes your 100% right but for my own headphone jacks is not my favorite connector and i'm a little afraid about using this for connecting a probe that need a VCC using this connector.

Imo the best things that can be done is to change linuxcnc code for use 2 probe input "using something like a new Gcode 38.x" dedicated for tool setter.

If someone need to use only one input this is easy to link single card pin input to both motion input


Br
Last edit: 08 Jan 2021 13:02 by alkabal.

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

More
08 Jan 2021 13:28 #194486 by tommylight
Probably can be done using XOR gate in hal wired to probe input.
linuxcnc.org/docs/2.4/html/man/man9/xor2.9.html
Or am i missing the point here ?

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

More
08 Jan 2021 13:53 #194489 by andypugh
It should be relatively easy to achieve in HAL
One way would be to store the probe input states at the point that the machine is turned on. You can then XOR that stored value with the current state of all probe inputs and use that as the single probe input to motion.

This could be done in HAL with existing components:
sample_hold to store the startup value
weighted_sum to convert the several probe inputs to an S32
linuxcnc.org/docs/2.8/html/man/man9/bitwise.9.html to compute the XOR of the startup and current values.
There would also need to be two conv_s32_u32 components as bitwise uses u32, and the others provide s32 values.

Or a custom HAL component.
component multiprobe;
pin in bit enable "connect to halui.machine.is-on";
pin in bit probe[8] "probe inputs";
pin out bit out "output";
function _;
license "GPL";

;;

int then, now;
for (int i = 0; i <8 ; i++) { now += (probe(i) << i)}
if (enable) {
    out = now ^ then;
} else {
   then = now;
}
The following user(s) said Thank You: tommylight

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

More
08 Jan 2021 15:19 #194499 by alkabal
Thanks for example ! I have think about doing a component for that but not trying for now, and for me actually i like to to have hal config much simpler. and without using motion.digital


At each start of probing from gladevcp probe screen i execute the attached ocode.

The things i really like to do is doing something all in one without the need to use M64 M65 or2 and2 not

And i like to check before each probing/tool length :
-if tool is 0 abort and alert user
-if tool is not the configured tool_number abort and alert user
-check if this is probing or tool_length
-check if already triggered or unconnected
-other suggestion ?
Attachments:

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

More
08 Jan 2021 15:22 - 08 Jan 2021 15:41 #194500 by alkabal
I have choose to stop process using (ABORT,xxx) because this work very fine, error message is displayed correctly with i think all GUI and doing this at start of sequence before changing any parameter (G90/G91 G20/G21 Offset or feed) so do not need any restore.


If a way exist for doing this all in one and for add logic inside linuxcnc itself i think about doing this test at the top of any probing sequence automatized or if not already done do this at any G38.x
Last edit: 08 Jan 2021 15:41 by alkabal.

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

More
08 Jan 2021 16:10 - 08 Jan 2021 16:11 #194511 by alkabal
I have write 3 component for now i allways need to use some external component for add security logic :
-toolchanger (for lathe with past to pawl) with some built in security + auto home tool finder + allow to use additional gang tool
-orientV2 for make config simpler and more flexible + adding a jog mode + auto homing (bye-bye and2 scale and other stuff)
-spinload for managing spindle with retarded relay timing + prevent start if Touch probe is connected (bye-bye and2 scale and other stuff)

trying to do the stuff each time for use near the same config for my lathe with +-10v analog and mill with 5v analog + relay for direction so i try to have something "universal" and reusable.

Maybe the fourth need to be "probemanager" lol but i'm not really good coder so this is a lot of trial and error...
Imo i really need some reviewer but for the moment nobody seem to want to try my orientv2 so the other isn't not available online...
Last edit: 08 Jan 2021 16:11 by alkabal.

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

More
02 Jan 2022 21:07 #230572 by Lcvette

I also use a tool length sensor and a touch-probe. Each sensor is connected to a separate input on the Mesa card.
I use the gen_muxeric component to switch between the inputs.

To switch the inputs you need G64P0 and G63P0 in the 3D-Probe macro.

This works with NO and NC. The unused touch probe can be unplugged.

# ---probe signal---
loadrt mux_generic config=bb2
addf mux-gen.00 servo-thread
net probe-is-3d mux-gen.00.sel-bit-00 motion.digital-out-00
net probe-in-wzl1 mux-gen.00.in-bit-00 hm2_7i92.0.7i76.0.0.input-30-not
net probe-in-3d mux-gen.00.in-bit-01 hm2_7i92.0.7i76.0.0.input-31-not
net probe-in mux-gen.00.out-bit motion.probe-input

--
Roland

Roland,

would you mind posting your hal file for this with any other sections or changes required?  I would like to add this functionality to probe basic macros to make it easier for those using both to be able to get up and running!  your help is greatly appreciated!!

Chris
The following user(s) said Thank You: anfänger

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

More
03 Jan 2022 05:53 #230627 by cmorley
I think a better solution is to have two probe inputs to motion. You could disable/enable them with mcode. This is the simplest for the integrator.

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

More
03 Jan 2022 09:29 #230635 by roland
Replied by roland on topic multiple motion probe inputs
Chris,
I no longer use this setup. I would have to look for a backup of the old configuration.
But more than the few lines is not really necessary.
Let me know if you need more infos

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

Time to create page: 0.096 seconds
Powered by Kunena Forum