Hello Guest it is March 19, 2024, 01:47:35 AM

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

0 Members and 1 Guest are viewing this topic.

Re: Mach4 Printer Port Discussions
« Reply #960 on: February 16, 2016, 05:33:25 PM »
Not sure if this should be posted as another topic.

I went from Mach3 to Mach4 with Parallel Port plugin. I couldn't get any of the motors to move in Darwin, finally I fixed the issue by setting selecting the "negate" radio buttons for each motor for both direction and counts. Hope this helps anyone that runs into the same issue.
Re: Mach4 Printer Port Discussions
« Reply #961 on: April 03, 2016, 09:13:37 AM »
This is my first visit to the forum & I hope I have posted this in the correct place. I have a licensed copy of Mach3 that has performed very well for many years both on my mill and lathe. I now only use Mach for lathe work and recently had a problem that turned out to be mechanical rather than software. During the search for a solution I came across Mach4. I have installed Mach4 Hobby along with Darwin. I have managed to configure my axis motors but I can’t get my spindle to operate. I have spent hours and hours on here trying to discover what I am doing wrong but there is so much contradiction I am at a loss. I think most of the set-up suggestions are for people with smooth steppers? I tried those settings too.
I have the spindle turning on with the on screen button and it will activate with an M3 S1000 command from the MDI screen but the s1000 is ignored & the spindle just turns slowly.
My Mach3 works without issue so I know it’s not my hardware. I have a BOB connected to a spindle board that turns step / direction into a 0-10V signal. I can find the part numbers for these if required.
I am hoping that someone with greater knowledge than I will give me some set-up guidance using the Mach3 spindle settings below (that work) or at least point me in the direction of an “idiots guide”
My Mach3 spindle set up is as follows -
Ports & pins tab – motor outputs, spindle set to –
Step = pin 9,  Direction = Pin 8, Direction is set to low active & Step is high active.
Output signals tab - I have #4 also set to Pin 8, active low (think this is the M3 command in spindle relay control below)
Spindle setup tab – Relay control -
Disable spindle relays (unchecked)
M3 output set to # 4
M4 output set to # 6 (not in use)
In motor tuning (spindle) I have – steps per - 4000, velocity - 33.33, acceleration -  22.5 (Metric units)

One of the confusing things is in Mach4 under spindle is right at the bottom of the page it has a step / direction axis that I set to OB1 (6), then map it. But every time I return to the spindle page this OB1 (6) has defaulted back to none. I did read that this function is not in use yet, is that correct.
Hope you can help, thank you.
Eddie.
« Last Edit: April 03, 2016, 09:17:27 AM by EddieUK »

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #962 on: April 03, 2016, 09:34:55 AM »
Hi Ed:

   In Darwins config, turn on an output on pin #8, call it SpindleFreq as a name. Set it to frequency control if you see a checkbox, ( been awhile Im not sure there is one anymore)
 Now, in Mach4, under diags, there is a selection for Darwin, in it, select a Frequency Spindle and set minimum and maximum frequency you wish to use.
Then, in the config/Mach menu, select outputs, way way down the list is Spindle, turn it on, as device select Darwin, and then under mapping select the
named signal SpindleFreq.

   That should be all you need. Make sure you dont have laser mode selected in Darwins diag config.

 When you command a spindle with M3 or do a S100, look in the error history in the tab on the bottom of the main window, it will show messages from Darwin
about what it did for the spindle commands. "Set SpindleFreq to 100" for example..

 As for DIR, you can make an output and name if SpinDir, in Mach4's config, turn on Spindle Direction and set it to Darwin, mapped to SpinDir.. or whatever
you named the signal to.

 thats about it,

Art


Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #963 on: April 03, 2016, 09:37:19 AM »

By the way , to calibrate it, set the min max to 0 and 100, command a S100 and measure the actual speed, enter than as max.
Now command an S10, measure it and enter the  (speed * .9) in the minimum box.. Thatll get you close..

Art
Re: Mach4 Printer Port Discussions
« Reply #964 on: April 03, 2016, 09:45:17 AM »
Thank you for the quick response, I will go try this now & come back to you.

Thank you...Ed
Re: Mach4 Printer Port Discussions
« Reply #965 on: April 03, 2016, 11:34:10 AM »
Well we are closer but not just there. I took a stab at the frequencies (I don't have a clue) set output pin 8 to 150 MHz in Darwin, toggled the output & the relay clicks in, motor spins slowly as before. Set output 9 to pin 9, called it spindle direction. Went into set frequency spindle, set min to 200, left max at 5000. Now spindle starts using the on screen button, also with an M3 command but still ignoring the S1000 command. Now here's the difference, if the spindle SRO is set high & I try turn on the spindle, I get a buzzing from the BOB, if I move the slider up & down the tone of the buzz changes, I presume because of the frequency change. If I put the slider in a low position the relay clicks in & spindle runs. Can you give me some idea what the frequencies should be ? my spindle has min 200 rpm & a max of 2000. I did notice Darwin adjusts the frequency on its own accord. I tried different frequencies, some high numbers where reduced by Darwin. I don't get any notifications in the error history as to setting frequency. When I run M3 S1000 it says set MDI.

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #966 on: April 03, 2016, 12:39:43 PM »
Hi Ed:

 Heres the deal. In config/Mach , under the spindle tab, you set a minimum and max in RPM. If your spindle goes
8000rpm , fine, set 0 and 8000.

Then, in Darwin, you set a min and max in hz, so you can set 0 and 20000 for example.

 Now, when you do an S4000, mach will see thats 1/2 of your maximum of  8000, Darwin will then send
1/2 of its freq range out as a signal, so 10khz..  Each spindle will take a certain khz and give out a certain rpm.. just
a case of matching them..

  adjust Darwins high until it matches at S8000.. or whatever your max rpm is set to.

Art
Re: Mach4 Printer Port Discussions
« Reply #967 on: April 07, 2016, 02:47:03 PM »
Update - I now have some spindle control but not without issues. I set min & max frequencies in Darwin Diag to 150 & 2000. Darwin output signals pick up on the min frequency and set the output signal Mhz to 150. If I set min to 0 this is picked up too & spindle doesn't work. If I input higher numbers into max Darwin adjusts the Mhz up slightly in output signals, this then dosn't activate the relay correctly and I just get a buzz from my BOB. With my low settings that work my spindle runs smoothly at low revs but doesn't attain maximum speed (I realise I have no calibration at this point) Another clue in the puzzle maybe that unless my spindle rpm slider is in the low position the spindle won't start & I get the buzz once more. Once the slider is down it will start & I can then increase the rpm. I understand your explanation above but the software doesn't let me implement it as you suggest. I don't have any response from spindle commands using MDI but I guess this should come good once I get it working correctly.
Sorry this is becoming a pain.....Eddie

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #968 on: April 07, 2016, 05:13:56 PM »
Eddie:

  Mach4 sends a command such as S400, Darwin checks to see what the min and max set in MAch4 for spindle is.
Lets say you have min max set to 0, 1000. Darwin will then decide you wish 40%. ( 400 is 40% of the 1000.).

 So then Darwin will see you have a f min = 0, and fmax is 20,000. ( This is Hz, not Mhz. ).
  It will then take 40% of that range, so 8Khz, and it makes the output signal put that out.

  When it does this, it puts messages in the error log. What is it saying when you enter

M3S4000 for example.?

Art
Re: Mach4 Printer Port Discussions
« Reply #969 on: April 16, 2016, 10:01:20 PM »
I'm moving from MACH3 to MACH4. I use 2 Parallel ports for input/output, and the system is running.

Looking for some answers,

If I understand correctly Mach4 sends a axis homing command and Darwin which completes the task on it's own. I read and see the driver applies the homing offset that is setup in Mach4 homing configuration page. Then which is responsible for completing the homing move by moving to the zero point? Unless I'm missing something at this point I don't think either side (Mach4 or Darwin) is excepting the final move as it's responsibility but, someone needs to work out the final move and incorporate. I have a script and button at this point to use.

Next is along the same thing is with the spindle speed being reported to Mach4 and keeping track of the actual rotation speed. I use the Super-PID with PWM input and Indexed spindle output. I have the input PWM speed control working fine. I have the index pulse returning to Mach4 as seen on the diagnostic tab. The Mach4 manual hints to the fact the index input is used for monitoring the speed but I have not found where it actually uses it as feed back to compare the the requested speed. So once again unless I missing something which side is responsible of the task to complete the feedback loop for a closed loop system?