Repository navigation
1kW AC servo as milling machine spindle motor #1000
Replies: 7 comments 24 replies
|
Hi @nickshl |
|
@terjeio, I have question about feedrate when linear and rotational axis mixed together. For example, to cut M3 thread with 15 mm down motion I used this command(starting point from 0):
Which is move 15 mm down along with 10800/360 = 30 rotations(M3 has pitch 0.5mm which two rotation per 1 mm). Looks like F in this case mean degree per minute, when I set F to 2 * 360 * 60 = 43200, it gives about 2 revolution per second. However, "The NIST RS274NGC Interpreter - Version 3" says:
It looks like F should be set in mm per minute for Z axis movement and A axis rotation should be synchronized to finish at the same time with Z. Am I missing something? |
@terjeio have you given a thought on this? Waiting for your remarks/comments. I have already tested rigid tapping rigorously using axis mode as explained by @nickshl. To make this machine fully compatible to the G-code, we need to somehow bind it with a gcode and the best way I feel is to call a macro say "tap.macro" just like we call "tc.macro" upon sending T2M6. We will play with all the variables related to speed, pitch, etc in the macro file. You are the best judge whether we should go with G84 (Fanuc and Haas) or G33.1 (linuxcnc). |
|
Thanks for quick actions @terjeio ! I could not get parser matter and exit handling via event. However, I will try your solution and learn from it. Right now I am using a G65 macro for rigid tapping which consumes one of my Axis (B). So I am not using Spindle Sync feature at all. I just switch to position control mode of servo drive when I start tapping and then I give the standard motion commands only which doesn't require spindle sync. E.g. G01 Z-10 B3600 F200 will make rigid tapping of 1mm pitch where B is in degrees. As both are axis, they have to move in sync only independent of they are accelerating, decelerating or moving at constant speed. For Power failure tap removal macro, my plan is:
What according to you best NVS parameters I can use for above storage? Thanks again for great help! |
|
I "fixed" communication issues: Now, why do I used quotas when I said "fixed"? Because while I don't have any communication issues, I cant know for sure if it won't happen at some point because grblHAL uses plain protocol over UART and CNC machines is noisy environment. There even closed issue for that: Add a g-code checksum #440. While this issue wasn't resolved, but it pointed to ability to make a plugin for that. And I I made such plugin(Who am I lying to? Claude did it). At this point it works on both ends: grblHAL controller and pendant. It encapsulates all traffic into packets(SOH, seq, type, length, data and CRC), it checks CRC and acks/naks received packets in both directions and it do retransmission(up to 4 times) if packet nacked or ack wasn't received. As a bonus this plugin allow to change port, baud rate and encapsulation(Plain/Packetized) via controller settings(ioSender show it in "Aux ports" for some reason). I plan to work on it for a little bit and then I would like to add it as official plugin to grbHAL(and into WebBuilder of course). @terjeio, is it possible if I'll send you all files for this plugin? Also, what maximum line length grblHAL can receive or send? Is it defined by LINE_BUFFER_SIZE which 256 bytes(without null-terminator)? What length is and what realistically needed(I assume longest line from the controller is full status report)? |
|
@terjeio, for some reason button "Generate and download firmware" doesn't work if "CRC ensured transport" is selected. It definitely worked yesterday... |


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Turns out AC servo has position mode with Step/Dir control and Speed mode with RPM control via 0-10V(actually -10...+10V for direction control). And the best part: those servo has combined Position/Speed mode with switch between by digital input. So: we can connect Step/Dir to axis A, 0-10V connect to speed control and spindle enable signal use to switch between modes. When spindle enabled - spindle speed controls via M commands. When spindle is off we can control position using G1 and A axis, which makes rigid tapping possible.
This is how I did it on my Sieg X2:

All reactions