Hello Guest it is December 26, 2024, 09:54:58 PM

Author Topic: Remote Input to Start and output when complete  (Read 7315 times)

0 Members and 1 Guest are viewing this topic.

Remote Input to Start and output when complete
« on: April 18, 2019, 09:50:41 AM »
Have a question i hope someone can assist with.
Have a machine we purchased from Cncrouter parts, its a Pro table with a x,y,z axis and is a very well built machine.
machine is operational and have been able to create g code files from 3d image files and run on the machine.
At the moment i have a ink pen mounted on the end of the z axis that is used to draw the pattern on a sheet of paper just to test and make sure everything is working.
Will be looking at mounting a floor mounted extruder machine and run a hose from it to the z axis and attach to the end of the z axis.
When machine is started, will start the extruder and extruder material to duplicate what was drawed on the paper.
At the moment,, starting the print from the Mach 3 screen.
is there a way to use the Mach3 to load the G code file and then a remote input such as from a push button etc. be wired into the machine to start the print cycle.

Offline reuelt

*
  •  520 520
Re: Remote Input to Start and output when complete
« Reply #1 on: April 20, 2019, 12:03:45 PM »
Have a question i hope someone can assist with.
Have a machine we purchased from Cncrouter parts, its a Pro table with a x,y,z axis and is a very well built machine.
machine is operational and have been able to create g code files from 3d image files and run on the machine.
At the moment i have a ink pen mounted on the end of the z axis that is used to draw the pattern on a sheet of paper just to test and make sure everything is working.
Will be looking at mounting a floor mounted extruder machine and run a hose from it to the z axis and attach to the end of the z axis.
When machine is started, will start the extruder and extruder material to duplicate what was drawed on the paper.
At the moment,, starting the print from the Mach 3 screen.
is there a way to use the Mach3 to load the G code file and then a remote input such as from a push button etc. be wired into the machine to start the print cycle.

Why not Read this thread for Ideas
https://www.machsupport.com/forum/index.php?topic=8252.msg52260#msg52260
"the gift of God is eternal life through Jesus Christ our Lord"
Re: Remote Input to Start and output when complete
« Reply #2 on: April 26, 2019, 12:24:41 PM »
Still trying to figure out a simple way and not being very familiar with Gcode etc..., but learning more by reading info on this site.

I was reading about a M30 command. That the best i can tell if you put this at the end of a Gcode program and once the program was completed it would automatically have the Gcode program restart at the first of the Gcode.
Is there a Gcode type command that could be added at the beginning of the program - Wait for input to go true and if that input went true then start running and executing the Gcode program again.
If so, can you assign the start to a input in mach3?
Thanks for any advice.
Re: Remote Input to Start and output when complete
« Reply #3 on: April 26, 2019, 01:50:02 PM »
I was reading about a M30 command. That the best i can tell if you put this at the end of a Gcode program and once the program was completed it would automatically have the Gcode program restart at the first of the Gcode.
M30 rewinds the file to the beginning, and stops there. Press Run to run the file again.
M47 rewinds and runs the file automatically.   over and over.
You can have a remote start button to start the file.
Re: Remote Input to Start and output when complete
« Reply #4 on: April 26, 2019, 02:03:14 PM »
Thanks
I was reading some other post on the web and saw where it was mentioned that you could go into Config-Ports&Pins-Input Signals and assign for example Port#1 Pin 12 to OEM Trig#1 if you Enabled OEM Trig#1.

Then go into Config-System Hot Keys and place a value of 1000 which is the "Hotkey number" for a particular keyboard function, which I assume the 1000 value = The Cycle Start Pushbutton on the Mach3 screen.
 
Have not tried this yet. Is there a way to know what the Hotkey number value is for a particular keyboard function in mach3?
Thanks for any advice.  Still learning a little at a time, but at the moment having to try and work on this between projects so any assistance is appreciated.

Offline reuelt

*
  •  520 520
Re: Remote Input to Start and output when complete
« Reply #5 on: April 26, 2019, 02:26:12 PM »

Is there a Gcode type command that could be added at the beginning of the program - Wait for input to go true and if that input went true then start running and executing the Gcode program again.
If so, can you assign the start to a input in mach3?

Miscellaneous functions, called M codes, are used by
the CNC to command on/off signals to the machine
functions.
i.e.
MØ3 - spindle forward (CW),
MØ5 - spindle stop stop, etc.....
M07 -  mist coolant on
M08 -  Flood coolant on
M09 - All coolant off

You would note that M## codes normally output a signal to a pin of a parallel port that can be used in the Break Out Board (BOB) to control a RELAY on or off.
So the RELAY is what will "push the button" to on your extruder or conveyor belt to load material etc

Attached is the MACH3 std M-codes list.

Std M codes can be edited (modified) and you can also create your own (higher number) M codes too.

But for your requirements, you can for simplicity (& proof of concept) initially adapt
M03 or M04 to on  and M5 to off
M07 or M08 to on and M9 to off
YOUR extruder machine.
The PWM or 0-10V output can be used to control the flow rate of the extruder material

You could use G4 to wait

To further assist you, it would be good that you let us know your motion controller (parallel port or ext USB or ext Ethernet) and BOB brand and model.



« Last Edit: April 26, 2019, 02:32:29 PM by reuelt »
"the gift of God is eternal life through Jesus Christ our Lord"
Re: Remote Input to Start and output when complete
« Reply #6 on: April 26, 2019, 03:23:42 PM »
thanks
What we actually have is a Pro48 table from Cncrouterparts with the Nema34 Electronics kit.
It has Cncrouterparts custom breakout boards but is using EthernetSmoothStepper for the brains.
Really nice unit. We have been testing our theory of using the extruder etc.. to prove some concepts for new products we looking at producing and it has worked great for that.
You have to manually load the material and push the Cycle Start on the Mach3 interface which is okay, except for testing to produce a production machine. Looking at Automatically feeding the material, etc.. and then once in place, start the Cncrouter machine with a remote dry contact relay which is controlled by a PLC.
Basically, with the external extruder hose mounted on the Z axis instead of actual Spindle it will function very similar to 3D printer.  I can handle the Automation of feeding material in automatically at a exact position everytime and removing it and feeding more material in since my background is Allen Bradley and Omron PLC controls etc... but trying to figure out a way to start the Cncrounter mach3 program etc..
Thanks for your assistance and posting the attachment

Offline reuelt

*
  •  520 520
Re: Remote Input to Start and output when complete
« Reply #7 on: April 26, 2019, 04:20:37 PM »
[CycleStart] is Alt-R on keyboard
So what you need to do is
connect a relay to an unused INPUT pin.
Then assign an OEM Trigger to it in INPUT SIGNALS settings of ports and pins say OEM_Trig#1
Then make the OEM_Trig#1  emulate keyboard scan code of Alt-R which is 1000.
see attached

Then your PLC triggering a relay (connected to OEM_trig#1  pin) should be able to remotely [CYCLE-START] loaded Mach3 program.

"the gift of God is eternal life through Jesus Christ our Lord"
Re: Remote Input to Start and output when complete
« Reply #8 on: April 26, 2019, 07:28:30 PM »
Thanks
Re: Remote Input to Start and output when complete
« Reply #9 on: April 26, 2019, 07:30:57 PM »
is there a way to get a output from the mach3 to let you know the cycle is complete.
what i had thought about was at the end of each program add the Gcode to go to a certain position and have the axis trigger a prox switch that could be used to signal the cycle is complete, automatically remove the product and move another in place, then trigger machine again and continue operation.