Stop or SlowDown on external input

More
14 Jul 2014 18:25 #48761 by piflixe
Hi there,

I'm new to this forum so please excuse if I posted at the wrong spot an feel free to move the post do a better category.

We are currently working on a Laser engraving machine using stepper motors. For optimal reliability we would like to control the speed of the X and Y axis with an external sensor. Two szenarios would be possible:
  1. digital HIGH / LOW Sensor: when Sensor is LOW, process job as usual, when Sensor is HIGH, stop X and Y axis with usual decelaration and wait for sensor to turn LOW, then accelerate and proceed as usual.
  2. analog Sensor (eg. 0 - 12V)
  3. : adjust speed of X and Y axis according to value on Sensor PIN. The mapping might not be linear. When a sudden value change occurs, no steps should be lost, this could also be achieved by an analog filter of the sensor signal

If anyone has experience with this kind of application, I would be glad to know! I assume it could be a very basic functionality or easy to implement but I haven't found anything likewise in the documentation or when searching the web. We would have some financial ressources if a special implementation is needed and are willing to put it back in the opensource software.

Kind regards,
Felix

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

More
14 Jul 2014 18:54 #48763 by Todd Zuercher
See here in the manuals linuxcnc.org/docs/html/gui/halui.html
for #1
halui.program.pause (bit, in) - pin for pausing a program
halui.program.resume (bit, in) - pin for resuming a paused program
for #2 probably
halui.feed-override.scale (float, in) - pin for setting the scale for increase and decrease of feed-override.

Hi there,

I'm new to this forum so please excuse if I posted at the wrong spot an feel free to move the post do a better category.

We are currently working on a Laser engraving machine using stepper motors. For optimal reliability we would like to control the speed of the X and Y axis with an external sensor. Two szenarios would be possible:
  1. digital HIGH / LOW Sensor: when Sensor is LOW, process job as usual, when Sensor is HIGH, stop X and Y axis with usual decelaration and wait for sensor to turn LOW, then accelerate and proceed as usual.
  2. analog Sensor (eg. 0 - 12V)
  3. : adjust speed of X and Y axis according to value on Sensor PIN. The mapping might not be linear. When a sudden value change occurs, no steps should be lost, this could also be achieved by an analog filter of the sensor signal

If anyone has experience with this kind of application, I would be glad to know! I assume it could be a very basic functionality or easy to implement but I haven't found anything likewise in the documentation or when searching the web. We would have some financial ressources if a special implementation is needed and are willing to put it back in the opensource software.

Kind regards,
Felix

The following user(s) said Thank You: piflixe

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

More
14 Jul 2014 19:16 #48765 by andypugh

  • digital HIGH / LOW Sensor: when Sensor is LOW, process job as usual, when Sensor is HIGH, stop X and Y axis with usual decelaration and wait for sensor to turn LOW, then accelerate and proceed as usual.
  • analog Sensor (eg. 0 - 12V)
  • : adjust speed of X and Y axis according to value on Sensor PIN. The mapping might not be linear. When a sudden value change occurs, no steps should be lost, this could also be achieved by an analog filter of the sensor signal


    I think that the best inputs for this would be motion.feed-hold and motion.adaptive-feed.
    www.linuxcnc.org/docs/html/man/man9/motion.9.html
    Both of these need to be enabled with G53 and G52 respectively. If your system is not using G-code then a different solution would be needed.
    Most systems use G-code, but it is possible not to, I got about 10% into a system for laser rastering that worked directly from a jpg.

    What is the source of your 0-12V signal? If you are using the parallel port then it is easier to interface digital signals than analogue, and a variable frequency square-wave is the easiest to interface (into the software encoder counter). The same is true of many of the alternative interfaces, but some do offer analogue inputs.
    The following user(s) said Thank You: piflixe

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

    More
    16 Jul 2014 05:12 #48821 by piflixe
    Thanks for your quick reply! I think if reading an analog signal is hard to realise, we would start off with digital. Is there a documentation of how to get started with the hal interface? - I am quiet new to linux cnc and not especially good in programming. Would you be willing to help us with the inital setup? As I mentioned, we have some financial ressources and I think it would be more effective to have someone at hand who is familiar with linuxcnc.

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

    More
    16 Jul 2014 05:31 #48822 by andypugh

    Thanks for your quick reply! I think if reading an analog signal is hard to realise, we would start off with digital. Is there a documentation of how to get started with the hal interface?

    You could try:
    www.linuxcnc.org/docs/html/index_de.html
    (Some of that might be in German, but most of it isn't).
    The section on HAL is the part that it sounds like you are interested in, "HAL Introduction" but you will also find it useful to look through all the HAL component descriptions to see what they can do.
    You would generally read an input like you souned to have with an "encoder" component in "counter-mode" and use the velocity signal in HAL to adapt the feed.

    Would you be willing to help us with the inital setup?

    There is lots of free help available on this forum.
    You might also want to consider attending:
    doodle.com/qn5sr87e6atphk43

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

    More
    16 Jul 2014 23:46 #48849 by cncbasher

    Hi there,

    I'm new to this forum so please excuse if I posted at the wrong spot an feel free to move the post do a better category.

    We are currently working on a Laser engraving machine using stepper motors. For optimal reliability we would like to control the speed of the X and Y axis with an external sensor. Two szenarios would be possible:
    1. digital HIGH / LOW Sensor: when Sensor is LOW, process job as usual, when Sensor is HIGH, stop X and Y axis with usual decelaration and wait for sensor to turn LOW, then accelerate and proceed as usual.
    2. analog Sensor (eg. 0 - 12V)
    3. : adjust speed of X and Y axis according to value on Sensor PIN. The mapping might not be linear. When a sudden value change occurs, no steps should be lost, this could also be achieved by an analog filter of the sensor signal

    If anyone has experience with this kind of application, I would be glad to know! I assume it could be a very basic functionality or easy to implement but I haven't found anything likewise in the documentation or when searching the web. We would have some financial ressources if a special implementation is needed and are willing to put it back in the opensource software.

    Kind regards,
    Felix



    can you explain your reason for this ? or the problem you are trying to solve ?
    i have a number of lasers , and not had to resort to adjusting the speed in this way .

    so i wonder if it is the style of explaination
    any way let us know and lets see if we can solve your problem .
    is this a height focus issue , or rasterising error etc

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

    More
    18 Jul 2014 04:03 #48906 by piflixe
    The reason for this is that due to very limited laser power and fragile surfaces, we have to reduce engraving speed when laser is not "burned in". The surface is normally white, turning black when being burned therefore absorbing more light therefore a much higher engraving speed is possible. We can observe that process using the light being reflected.

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

    More
    18 Jul 2014 05:23 #48908 by andypugh

    We can observe that process using the light being reflected.


    So, ideally you need something that produces a variable frequency digital pulse depending on light intensity.
    It is probably possible to do this (somehow) with a photocell and 555 counter. An alternative would be to use an Arduino, either to generate a "tone" based on measured voltage, or hooked up via USB (that isn't real-time, but might be responsive enough).

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

    Time to create page: 0.099 seconds
    Powered by Kunena Forum