Feed until input signal is detected

More
04 Mar 2022 20:05 #236369 by jontta
Hi,

I built a 1-axis 7 meter long pusher device, what feeds (pushes) boards, aluminium etc into automatic saw to be cutted in commanded length.
This linear device is now 99% ready, I started to make custom UI with glade with python callbacks etc and everything goes forward, thanks to unbeliavable good manuals, tutorials, examples and of course this forum archives.

But now last thing what I have not figured out (hope it is last), I want that the system automatically measures the length of feeded piece,
so I bought optical laser sensor to do the job.

Idea is that user clicks "get measure"-button from UI and this feeder device pushes the material forward until optical sensor detects it, python script calculates length of material based on axis location information etc.. but how do I make axis movement to stop based on certain input signal detection? So I command from position X0.00 to move G1X7000Fxx and when material triggers the sensor, how to stop feed?
I had many plans to do this but all those are ending up to be quite big and complicated solutions.
Like assigning the input pin to pause whole program, but then the assignment needs to be removed in order run the device correctly in other phases.

There must be some very simple oneliner solution to do this, what I just cannot figure out? :)

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

More
04 Mar 2022 20:23 - 04 Mar 2022 20:24 #236370 by rodw
if you set halui.program-pause, it should pause. You might need to pulse it using one shot or timedelay so it is momentary in action.

triggering halui.program-resume would continue.
Last edit: 04 Mar 2022 20:24 by rodw.

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

More
04 Mar 2022 20:37 #236371 by MaHa
When i read the thread title, i think about probing could do this.  Have a look at G38.2. Then you get the trigger point also in a parameter, where it exactly stoped.
Once i made some tests with a triangulation sensor for part detection. It was more or less unusable with glossy, reflecting surfaces. When it worked, it was most accurate, but it was not safe for an automated process.

 

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

More
04 Mar 2022 23:49 #236380 by andypugh
Why not program a linear feed of the required length. (G1)
Then reset the position to zero. (G10)
Then do it again.

You would need to configure the system to have a very long axis. But LinuxCNC is perfectly happy with an axis bigger than the observable universe.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.079 seconds
Powered by Kunena Forum