Hello Guest it is April 29, 2024, 04:29:20 AM

Author Topic: Closed Loop Monitoring of Mach4?  (Read 591 times)

0 Members and 1 Guest are viewing this topic.

Closed Loop Monitoring of Mach4?
« on: February 17, 2023, 02:48:18 AM »
Hi,

I am trying to make some closed loop control of my process with Mach4. Basically, it will involve collecting an image, some decision making (preferably in python) based on the image and some geometric data, and then Mach4 should do one of two options based on the decision.

Does any body have any experience with something similar to this? Do you think it can work?

I suppose I would use an analogue input signal from the python script to instruct Mach4 what to do next?

In future, it may be useful to carry additional data across back into Mach4, is it possible to pass across a string or CSV or something as an input?

Thanks in advance for any ideas!  :)

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Closed Loop Monitoring of Mach4?
« Reply #1 on: February 17, 2023, 11:21:40 AM »
Are you trying to cut things using fiducials?
Re: Closed Loop Monitoring of Mach4?
« Reply #2 on: February 18, 2023, 08:18:54 PM »
Hi,
I rather think that mach4 can do what you require, its all about timing.

When most people talk about 'closed loop' they think of Mach trying to maitain angular position control over the shaft of a motor.
Windows is not a realtime operating system and therefore Mach4 is a bufferd control which precludes from the microsecond timining that
such a closed loop requires.

If however you are talking about Mach4 being stopped while an image is collected, and then execute certain actions as a result of processing that image, then yes
it could do so.

May I suggest you write your Python program to collect the image data and output a signal (digital), or signals (binary), or even analog if you have an analog capable
motion control to Mach. Having Mach execute certain chunks of code based on an iput should be no trouble.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Closed Loop Monitoring of Mach4?
« Reply #3 on: February 19, 2023, 10:00:35 AM »
we make many similar  function like that ,for example we connect the driver to get absolute position by external c# app
actually what should happened as i understand yours needed ,is that the image + decissi0n will be done on yours external app
and then yours app will generate the gcode and run the mach according the results
what i try to say you should look at mach yours executer while all yours toolpath and design will be external
mach have good Api and can do it very easy
only one point i didn't  solve
when you force mac load nc file  its take time to mach to load and generate ,there is no any way to get from mach signal that its finish and can run
after long try ( mach help didnt help) only way i found is deley  amount of time constant time+ time according file length
but mach its real powerful for this Api




Re: Closed Loop Monitoring of Mach4?
« Reply #4 on: February 22, 2023, 12:13:03 PM »
Hi All, thanks very much for your inputs.