Hello Guest it is March 19, 2024, 03:53:15 AM

Author Topic: Mach4 Printer Port Discussions  (Read 1243697 times)

0 Members and 2 Guests are viewing this topic.

Offline kvom

*
  •  37 37
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #1020 on: May 04, 2016, 04:03:21 PM »
I don't see any Darwin pages with min/max frequencies.

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #1021 on: May 04, 2016, 05:21:32 PM »
It used to be in debug/darwin, but I think its in diagnostic/Darwin now..

Art


Offline kvom

*
  •  37 37
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #1022 on: May 07, 2016, 07:59:05 PM »
I have tried any number of combinations, but no spindle motion has resulted.  Attached is the M3 configuration.  Looking at it I have thought it's a step-dir motor control with pin 2/3 being dir and pin 14 being step.

In M4 I configured these three output pins with 14 having a 12500 frequency, and 2 and 3 w/o frequency, and then the spindle frew/fwd/rev in M4 outputs.  Then in diagnose/darwin window I tried  various frequency ranges.   No motion.  Looking for ideas.

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #1023 on: May 07, 2016, 09:27:33 PM »
Its hard to say without knowing how its wired.. Doesn't look like step/direction to me, looks like you have 2 relays for controlling cw or ccw, so You have to make an output signal in Darwin called SpindleCW at set it to pin 2, make another for SpindleCCW and set it to pin3 . You then make a third output signal Called SpindleFreq.

  In Mach3, turn off that spindle axis. In Mach4's config for output signals, select the SpindleCW, SpindleCCW and SpindleOutput signals and map
them the Darwins new output signals. In Diagnostics/Darwin, set a low freq of 0, and a high freq of 20,000.

  Restart, and command an M3S5000, see what happens...You should get debug messages telling you what Darwin is trying to do with the m3 ....



Art

Offline kvom

*
  •  37 37
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #1024 on: May 07, 2016, 09:33:17 PM »
That's basically what I did, except I specified a frequency in the output pin definition.  I'll zero that out and only specify frequencies in the diagnostic page.

Offline kvom

*
  •  37 37
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #1025 on: May 10, 2016, 11:28:18 AM »
Spent a good amount of time trying things in Mach4, but also comparing with M3.  Some conclusions:

1) The motor relays are required to be activated, but do not themselves control the motor.  Unchecking the box disables the spindle.

2) The spindle is a step-dir motor, but is configured to run only forward, since its dir pin is set to 0.  I never tried to execute a M4 command until now.  Whether a different pin would allow reverse is unknown.  I assume that since pin0 is the dir, the default direction signal is off.  When the spindle is running, the BoB light for pin 14 is on, and off when the spindle is off.

4) M3 has a motor tuning definition for the spindle.  How to replicate this in M4 is a mystery.  I can certainly define motor tuning for motor5 in M4, but how to tell M4 it's the spindle?
Re: Mach4 Printer Port Discussions
« Reply #1026 on: May 10, 2016, 01:21:38 PM »
I don't know the specifics of the Darwin driver, or whether it supports out-of-band motors.  But in general, to config a stepper motor as a spindle motor you need to map one of the motors to an "out of band" asxis (i.e. "OB1" to "OB6") instead of "X", "Y", etc.  For example, map "Motor3" to "OB1".  Then go to the normal motor config screen to set the tuning params for "Motor3".  Then go to the "Spindle" tab.  Down at the bottom select the "Step/Dir Spindle Axis" check box and select "OB1" in the drop-down list.  And make sure to set the min/max RPM values.

Fill in Darwin-specific config stuff as appropriate.

Bob

Offline kvom

*
  •  37 37
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #1027 on: May 10, 2016, 02:08:46 PM »
Tried the above suggestion.  But spindle doesn't move and when I re-enter the M4 config the spindle mapping to OB1 reverts to none.

I think that if the spindle is configured as a step-dir motor in Darwin, then the Darwin jog function would cause the motor to turn.

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #1028 on: May 10, 2016, 03:00:30 PM »
>>I think that if the spindle is configured as a step-dir motor in Darwin, then the Darwin jog function would cause the motor to turn.

  No, that would only happen if you mapped the motor to an axis. If using OutOfBand, you need to define a motor in Darwin, then
set its pins appropriately, DIR for CW or CCW, and step for the frequency output. Darwin has been tested with either setup, but
one isnt really superiour to the other. You should be able to get the frequency one working as easily or easier.

 When you select an M3S100, if the spindle is properly configured and mapped as an output signal, Darwin will write entries into the
debug log ( not the normal log, the error log..). If your not getting any messages, such as  "Freq Spindle: 200 hz" , in the error log,
then either Darwin isnt seeing a mapped signal to Darwin for output, or Its not seeing Frequency mode selected in Darwins diagnostics
config. 

Art
 

Offline kvom

*
  •  37 37
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #1029 on: May 10, 2016, 05:03:16 PM »
I've tried so many combinations my eyes are crossed.   ::)

But I did find out a few things from looking at the working M3 config.  First, the output#for the spindle relays (2 and 4) are not pin#s but references to the output#s defines in the other tab.  output# 2 is pin 16.  output# 4 is not enabled and has no pin#, which explains why m4 doesn't do anything.

Second but of info.  When I turn on the spindle in M3 and go to the diagnostic screen, I seen that output 2 is flashing, and pin 16 led is on on as well as 17, but no others.  17 is the charge pump.  When the spindle is not moving, led 16 is not on.

In M4 if I configure 16 as an output signal and enable it, the led stays on all the time.  In addition, any time 16 is active, the fan motor in the VFD enclosure turns on, so I believe that this pin enables the VFD but doesn't effect the motor.  However, since there are no other leds illuminated, I can't see how pin 14 is being used by M3 even if it's configured as the spindle pin.