Author Topic: Threading on G0602 with PMDX-424  (Read 2316 times)

genestuff

  • Posts: 8
    • View Profile
Threading on G0602 with PMDX-424
« on: November 18, 2020, 04:11:08 PM »
I’m in the process of converting my Grizzly G0602 Lathe to CNC using a PMDX-424 through a PMDX-407 Spindle Speed Control board.  I have pretty much everything running except the spindle control.  I’m using a 200 count encoder with an index and have tried several settings with only marginal success.

I’ve set the “Encoder Config” to “Bi-directional (quadrature) Encoder with Index” with Encoder counts per revolution set to 200.

I have selected “Spindle Conf’s” “Spindle Speed Control” to “PWM” with its “Min PWM Duty Cycle” set at 3 (because higher values seemed to change the indicated RPM when it’s working?).

If I select “Measure RPM from the Encoder” I get no “True RPM” reading when I run the spindle, but I do get a “True RPM” reading if I select “Measure RPM from the Index input”.  However, in neither case can I run a threading G-Code even one developed using the conversational tab. Although both selections provide A, B, & C indications with the PMDX-SmartBOB I/O Status Screen.

With both, I also get an Error Message of “PMDX: Encoder mode has index, cannot set Encoder Position” and the threading G-Code stops on the second G76 line?

I tend to suspect that the Error Message should be telling me something I’m just not bright enough to know what it is?  On the other hand, it could be something else entirely.

Any insights would be greatly appreciated.

Here’s the threading G-Code I developed using the conversational threading option:

N0 (Machine type - MachMotion Lathe Canned Cycles)
N5 (Filename: C:\Mach4Hobby\GcodeFiles\Conversational Partial Facing Cut Test Code.tap)
N10 (Generated on 11/17/2020 at 6:58:00 PM)
N15 G00 G40 G54 G64 G80 G90.1 G99 G18 G20 (Safe Start Block)
N20 %

N25 %
N30 (Starting Gcode for Threading Cycle: ThreadingCycle-0)
N35 G50 S1500 (Spindle Speed Cap)
N40 G00 G40 G54 G64 G80 G90.1 G99 G18 G20 (Safe Start Block)
N45 %

N50 %
N55 T1212 (Tool Change)
N60 G99 (Feed per Revolution)
N65 G97 S500 (Constant Speed)
N70 M03 (Spindle Forward)
N75 M07 (Mist)
N80 G00 X0.5200 Z0.0200  (Rapid move to Clearance Height)
N85 G76 P020030 Q0.005 R0.001 K1
N90 G76 X0.435 Z-1.0 R0.0 P0.0325 Q0.005 F0.0769
N95 G80
N100 (End Gcode for Threading Cycle: ThreadingCycle-0)

N105 %
N110 M09
N115 M05
N120 M30
N125 %
N130 (End Gcode file)
N135 %


12strings

  • Posts: 278
    • View Profile
Re: Threading on G0602 with PMDX-424
« Reply #1 on: November 24, 2020, 02:27:10 AM »
What version of Mach4, PMDX plug-in and PMDX firmware are you running?  "Help->About" for Mach4 version, or Config->Plugins and select the PMDX plug-in to get the PMDX versions.  And also, as mentioned in the other thread, can you post your full package profile here.

And one more thing: the contents of your "history" window after the error or warning shows up (click the "History" button in the lower left).

Though I'm not sure how much help I can be here as I don't have an spindle encoder I can hook up.  But I can look through your config for anything that looks suspicious.

genestuff

  • Posts: 8
    • View Profile
Re: Threading on G0602 with PMDX-424
« Reply #2 on: November 25, 2020, 11:43:46 AM »
I've been working on my threading problem since my last post and had some interesting results.  I've now gotten the above G-Code to run, cutting air, through to the M09 at the bottom of the code where it freezes.  It makes about 9 passes during the run before freezing.

Interestingly, if I then try to re-run the same code again it freezes at the second G76 having cut nothing? If I then re-home the X axis it will, again run the G-Code up to the M09 at the end???

I'm not really sure why it's sort of working now but it seems to be, at least to the extent it is?  It might have something to do with my playing with the encoder configurations, that's about all I've really been doing except for populating my tool table?

I'm really looking forward to your thoughts.

Thanks
Gene

In answer to your questions (see attachments):

Mach 4 Version 4.2.0.4524
Build 4524

PMDX Plug-in 0.53.263
PMDX Firmware 0.60.208

12strings

  • Posts: 278
    • View Profile
Re: Threading on G0602 with PMDX-424
« Reply #3 on: November 25, 2020, 12:40:07 PM »
When the system freezes, is there any message in the lower left of the screen?  Click on the "History" button and post what it says (if anything).

Does Mach4 remain "enabled" but the machine just stops moving?  If so, what do you do to get it moving again?  Just hit the HOME buttons?  Disable and re-enable Mach4?  Provide as much detail as possible.


genestuff

  • Posts: 8
    • View Profile
Re: Threading on G0602 with PMDX-424
« Reply #4 on: November 25, 2020, 02:52:39 PM »
I've posted several screen shots of the significant points in the threading sequence below.  However, messages are as follows:

Pre-run after homing (fresh start of the machine): Limit Switch Z++ Tripped
Running Threading : Encoder mode has index, cannot set Encoder Position
Threading Finishes (frozen at M09): Same as above - Encoder .....
Reset without Homing X Axis: Same as Above: Encoder ...
After second run fails: Same as Above: Encoder mode .....

the Message Queue is full of line after line of "Encoder mode...." (I'd attach it but it says I've attached enough!)
Note: This message appears with the execution of almost any command and I usually find the message queue full of it.

When the initial threading run stops, after about 9 threading passes, Mach 4 stops at the M09 line near the bottom of the code with the spindle still running and the Enable on.  If I try to run the code again, without re-homing the X axis, the code fails at the second G76 line with the spindle off and enable off.  I think the failure response is to simple turn Enable off so everything stops. If I reset the code and re-home the X axis, I can re-run the code as in the first sentence, about 9 threading passes then a stop at M09 still enabled.

When it fails, after running, at the M09 I can run the machine as normal; Jog, Home, re-start the code, etc.  When it fails at the second G76 after the second restart, the Enable is OFF and I have to turn it back on but it will then, pretty much, respond the things again, Jog, Home, etc.  It will also let me reset and restart the code but the code will not get past the second G76 until I re-home.

By the way, if I re-home but forget to reset the code, that is leave it at the second G76 line, it will fail as before.  So I guess I have to both reset the code and re-home the X axis.

Just thought of something as I was writing this, I don't have my mister (coolant) hooked up or enabled in the code.  Could that be why it's failing at the M09?

Just a quick reminder, the failure described above is, of course, a problem but I think the real problem is the "Encoder mode has index, cannot set Encoder Position" message and the fact that I have to configure the Plug-In to run off the Index to get any spindle Real RPM indication.  I don't know but, seems to me that, if I have an encoder and the SmartBob can clearly read it, it should be using it for RPM?

Anyway, I'd love to get these final things cleared up and I really appreciate your help.

thanks
Gene

genestuff

  • Posts: 8
    • View Profile
Re: Threading on G0602 with PMDX-424
« Reply #5 on: November 25, 2020, 02:58:10 PM »
Just for completeness, here's the Message Queue: