Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Bx3mE on May 28, 2016, 11:22:35 AM

Title: Mach4 how to use M62 P0 Command to control Output 0
Post by: Bx3mE on May 28, 2016, 11:22:35 AM
Hi,

I have Smoothstepper setup and have run it With pmdx 126 for a while now.

I am configuring my CNC for use with an Engraving Laser Diode.

To control my Laser Driver i have three signals: Driver On, Beam On and Beam Intensity (PWM).

I want to control Beam on using M62 P0 (Followed by a Move Command G1 X...)

I have tried different connections on the pmdx Port#1Pin#1, Port#2Pin16 and 17 but non seems to work.
Further investigation using the diagnostic screen shows that Output 0 Never toggles to On..... No matter of hardware configuration this should toggle right? Im running build 2914 of Mach 4.

Can anyone point me in the right direction? ??? ???
Title: Re: Mach4 how to use M62 P0 Command to control Output 0
Post by: DazTheGas on May 28, 2016, 11:51:22 AM
M62 is not yet implemented in the Mach4 Plugin.

DazTheGas
Title: Re: Mach4 how to use M62 P0 Command to control Output 0
Post by: Bx3mE on May 28, 2016, 11:56:04 AM
Reading from the Warp 9 site: http://warp9td.com/index.php/faq/faq-g-code-m-code


"
The commands are as follows, with x referring to digital output 1, 2, 3, 4, 5 or 6.

M10Px      Turns Output x OFF with subsequent motion command.  Used in Mach3.  (Logically backwards.)
M11Px      Turns Output x ON with subsequent motion command.  Used in Mach3.  (Logically backwards.)
M62Px      Turns Output x ON with subsequent motion command.  Used in Mach4.
M63Px      Turns Output x OFF with subsequent motion command.  Used in Mach4.
"


Very confusing....


I have just spent good 20 hrs to fix this... Is there another good way?
Title: Re: Mach4 how to use M62 P0 Command to control Output 0
Post by: DazTheGas on May 28, 2016, 11:59:53 AM
I think that could be refering to mach3

DazTheGas
Title: Re: Mach4 how to use M62 P0 Command to control Output 0
Post by: Bx3mE on May 28, 2016, 12:03:17 PM
Yes but on the same page he refers to a mach4 sample...

"Make sure your G-Code includes  M11P3 or M10P3 (the 3 indicates output #3) commands followed by a move command, like this Mach3 Example or this Mach4 Example."
Title: Re: Mach4 how to use M62 P0 Command to control Output 0
Post by: Bx3mE on May 28, 2016, 12:09:59 PM
But still - is the output LED Icon in the Diagnostic screen dependent of the plugin?
Title: Re: Mach4 how to use M62 P0 Command to control Output 0
Post by: rrc1962 on May 28, 2016, 05:48:49 PM

I have just spent good 20 hrs to fix this... Is there another good way?

Don't feel bad.  I've been all day trying to figure out why 1 does not equal 1 in an M code.  Frustrating when things work fine in the editor, then go south when you run it in MDI with no error messages.
Title: Re: Mach4 how to use M62 P0 Command to control Output 0
Post by: bob_at_pmdx on May 28, 2016, 10:28:19 PM
I have tried different connections on the pmdx Port#1Pin#1, Port#2Pin16 and 17 but non seems to work.
Further investigation using the diagnostic screen shows that Output 0 Never toggles to On..... No matter of hardware configuration this should toggle right? Im running build 2914 of Mach 4.
I can't speak to the ESS plug-in and whether or how they implement M62/63.  I *think* that signals controlled via M62/63 will NOT have their status reflected in the indicators on the diagnostics tab until the current MDI or GCode file has conpleted.  If I remember correctly, the reasoning was that the Mach4 core does not know when the signal is actually turned on or off by the device.  I am not at a PC where I can test this, but that may explain why the diagnostics tab indicators never turned on.

Bob
Title: Re: Mach4 how to use M62 P0 Command to control Output 0
Post by: Chaoticone on May 29, 2016, 12:04:52 AM
But still - is the output LED Icon in the Diagnostic screen dependent of the plugin?

Assuming you are talking about the diagnostics page in one of the default screens (wx4 or wx6), the output leds represent the state of output signals (the only thing Mach4 controls). If your looking for the status of hardware pins you will need to look at the SmoothStepper (or whatever hardware your using) diagnostics.
Title: Re: Mach4 how to use M62 P0 Command to control Output 0
Post by: dude1 on May 29, 2016, 04:14:34 AM
ESS diag page
Title: Re: Mach4 how to use M62 P0 Command to control Output 0
Post by: Bx3mE on June 02, 2016, 11:31:08 AM
Thanks all for your input - im leaving this issue open until M command is implemented in ESS plug-in.