Hello Guest it is January 26, 2021, 06:40:36 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DamonJones

Pages: 1 2 3 4 5 6 »
1
General Mach Discussion / Re: High Speed Servo as Spindle - My Solution
« on: January 18, 2012, 01:24:14 PM »
Very nicely done. I haven't had time to work on any of this project for ever now. Been off on other things. Glad to see things worked out so well for you however.

2
General Mach Discussion / Re: High Speed Servo as Spindle - My Solution
« on: December 12, 2011, 06:12:31 PM »
So far the signal generator (DDS) is just driving a stepper. I have the AC servo on the bench but need to build some cables for the motor and just don't have time right now. I'll let you know when I get things tested.


3
General Mach Discussion / Re: High Speed Servo as Spindle - My Solution
« on: December 12, 2011, 04:40:52 PM »
This is the one I used:

http://www.ebay.com/itm/190570439517?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

Note that even though they say 70Mhz they will only produce a square wave up to 1 Mhz. This is a limit of the build in comparator that it being used to generate the square wave from the sine wave produced. Pulse width is also set in two ways. either by an onboard pot or an external voltage reference. So far my testing shows that this will not need to vary and I can set it and forget it via the pot. Most drives will signal on either the up edge or the down edge of a square wave and don't care about the width of the pulse as long as it's long enough to trigger.

Acceleration and Decel profiles could be programmed into Arduino. Currently I have a fixed program to ramp up and down the final frequency. You bring up a great point of being able to change them on the fly based on the load on the spindle. Either via a feedback loop or via a user defined setup. You could add a DRO to Mach and pass it to Arduino that would then select a profile for different ramping requirements. Just thinking out loud. Will cros that road when the time comes.

One other thought: you mentioned you are passing the speed to Arduino via a macro. Is this the override speed? I did mine via a brain instead so no matter how the override speed gets changed it will always be correct in Arduino. Just a thought for you.

4
General Mach Discussion / Re: High Speed Servo as Spindle - My Solution
« on: December 12, 2011, 02:33:47 PM »
I'll answer a couple of your questions together. Arduino by itself will produce a square wave up to a max of 1/3 the clock speed of 16Mhz. The problem is that the increments for the clock speed get larger the higher the frequency goes. See my notes before and the formulas for frequency. This is why I went to the DDS module. It will create any frequency up to 1 Mhz. as a square wave. Also this technology would not and could not be used to index. The USB bus talking to the arduino does not have a consistent update timing sequence. This is why I build the circuit to switch from the DDS frequency for turning mode to the parallel port STEP and DIR pins for indexing mode. The only way to make the Arduino work to index would to make it become a full motion controller and give it control of all the axis's and just feed it movement instructions. Basically what the Smooth stepper does. This is also why the Arduino should not be used directly to home inputs can be delayed at different intervals depending on what is going on in the Arduino and on the PC.

5
General Mach Discussion / Re: High Speed Servo as Spindle - My Solution
« on: December 07, 2011, 05:39:53 PM »
Glad you found the info useful. It's the least I could do considering it's your 4th axis design that started me down this path in the first place.  ;D

6
General Mach Discussion / Re: High Speed Servo as Spindle - My Solution
« on: December 07, 2011, 01:33:48 PM »
YA macros have there place for sure. Certain functions like updating the speed and watching EStop are best handled with a brain. My macros will become much more than they are now as they will need to handle homing when coming out of turning mode. I also make sure the spindle if off before the switch and if there is any dwell time required the macro will handle that as well. Glad you got things working.

7
General Mach Discussion / Re: High Speed Servo as Spindle - My Solution
« on: December 07, 2011, 02:28:32 AM »
Yes port 0 is the MODBUS. The pins of port 0 are the registers.

I haven't used a macro to talk to the modbus yet. I did that with the a brain. So I'm not much help there. My marcos, at this point, just toggle a user defined LED. That LED is tied to the MOSBUS via the brain.

8
General Mach Discussion / Re: High Speed Servo as Spindle - My Solution
« on: December 06, 2011, 05:36:28 PM »
Just finished drawing up the logic circuit. I'll build this on an Ardunio Proto shield.

Here a link to the PDF

http://damonj.com/pics/Mach3%20Shield%20Logic.pdf


9
General Mach Discussion / Re: High Speed Servo as Spindle - My Solution
« on: December 06, 2011, 04:02:30 PM »
Here is the screen shots. Also a brain view of how to address MODIO registers from a brain.


10
General Mach Discussion / Re: High Speed Servo as Spindle - My Solution
« on: December 06, 2011, 03:43:52 PM »
I can't take credit for the modIO interface but I can make it a bit simpler for you. Here is a link to the library I found.

https://sites.google.com/site/jpmzometa/arduino-mbrt/arduino-modbus-slave

You need the modbus slave library linked at the bottom. It's tar compressed so you will need a program to uncompress it. Drop the folder in your Libraries Folder in your arduino software. Here is all you need to make a sketch that will talk to Mach3. It shows the registers I setup. They are in an array called regs[]. I included a sample if statement to show how to reference them.

#include <ModbusSlave.h>
ModbusSlave mbs;

enum {       
  MB_REGS=6       //Number of Slave Registers
};
int regs[MB_REGS];      //regs[0] = Ignore this register
                        //regs[1] = M3 CW spindle Direction (Active High)
                        //regs[2] = M4 CCW spindle Direction (Active High)
                        //regs[3] = Spindle Speed
                        //regs[4] = Active Spindle 0 = Z Axis, 1 = A Axis
                        //regs[5] = Estop
                       
void setup()         
{
 
    mbs.configure(1,9600,'n',0); //Init ModBus Slave
}

void loop()
{
  mbs.update(regs, MB_REGS); // Update ModBus
  if(regs[5]==0) { // EStop
    digitalWrite(2,LOW); //Set Servo1 to Mach3

  }
}

I'll get a screen shot of the setup for Mach3 and post it shortly.

Pages: 1 2 3 4 5 6 »