Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: p7m13 on December 29, 2024, 10:42:17 AM

Title: 2 cnc boards
Post by: p7m13 on December 29, 2024, 10:42:17 AM
I have 3 motors managed by a Chinese 4-axis board.

https://fr.aliexpress.com/item/32918200137.html?spm=a2g0o.productlist.main.15.31927a38hHL5zY&algo_pvid=2070012e-b8cf-4db4-b7dc-f20f27ffc20a&algo_exp_id=2070012e-b8cf-4db4-b7dc-f20f27ffc20a-7&pdp_npi=4%40dis%21EUR%216.61%216.59%21%21%216.72%216.70%21%40210390b817354862584254867e4333%2110000012811635421%21sea%21FR%211897906811%21X&curPageLogUid=hchAF7XenEek&utparam-url=scene%3Asearch%7Cquery_from%3A

Finding the right wiring diagram was particularly difficult.
The 3 engines run well with Mach3.
The only thing I notice is that, with identical adjustment parameters, the 3 motors run slower on x than on the other 3 axes: I wonder why ...
I would like to add 2 axes. Buying a Chinese FIVE-axis board will probably lead to the initial result : major cabling problems.
So I'm considering buying the same 4-axis "white eagle" board.
My question is: is it possible to run 2 occurrences of the program simultaneously ?
Title: Re: 2 cnc boards
Post by: Tweakie.CNC on December 30, 2024, 01:22:05 AM
Quote
My question is: is it possible to run 2 occurrences of the program simultaneously ?

No, that would not be possible.

Tweakie.
Title: Re: 2 cnc boards
Post by: p7m13 on December 30, 2024, 04:51:33 AM
If I buy a new interface board from China, I'm afraid I'll have big wiring problems.
I think I'm going to stick with my 4-axis board and place several inverter switches to manage, from time to time, the fifth axis
Title: Re: 2 cnc boards
Post by: p7m13 on December 31, 2024, 01:25:19 PM
Another possibility: not to add inverters but to keep the current setup for XYZ and to add another Windows (which I have) for the toggle and rotation of my divider. I then have my 5 axes but I have to buy a second manual steering wheel.

What is the best ?
Title: Re: 2 cnc boards
Post by: JohnHaine on December 31, 2024, 02:03:39 PM
What do you mean by inverter?
Title: Re: 2 cnc boards
Post by: p7m13 on December 31, 2024, 04:50:38 PM
interruptor with 2 states
first item of https://www.manomano.fr/pieces-detachees-pour-petit-electromenager-4725?model_id=67237821&referer_id=697152&msclkid=9258a352f4be19ba2269c42692620acf&utm_source=bing&utm_medium=cpc&utm_campaign=Bing%20Shopping_CPC_FR_B2B&utm_term=4575892537250586&utm_content=Tous%20les%20produits
Title: Re: 2 cnc boards
Post by: JohnHaine on January 01, 2025, 02:44:34 AM
Change-over switch
Title: Re: 2 cnc boards
Post by: JohnHaine on January 01, 2025, 03:56:16 AM
It would help if you could explain what you want to accomplish. Is it just to add a rotary axis? Why does that need 2 axes, what's the difference between toggle and rotation? 
Title: Re: 2 cnc boards
Post by: p7m13 on January 01, 2025, 11:18:01 AM
https://fr.aliexpress.com/item/1005006353184440.html?spm=a2g0o.productlist.main.3.5d4dxCw7xCw7KM&algo_pvid=1f6f3413-9014-4a38-a3e6-dac442f48d6f&algo_exp_id=1f6f3413-9014-4a38-a3e6-dac442f48d6f-1&pdp_npi=4%40dis%21EUR%21207.47%21200.69%21%21%211542.53%211492.12%21%40210384cc17357478264454986ea5e7%2112000036863166808%21sea%21FR%211897906811%21X&curPageLogUid=3bC97Yaf8iBu&utparam-url=scene%3Asearch%7Cquery_from%3A

In France, this is called a divisor ... On this device that I will use FROM TIME TO TIME, 2 movements are possible: the rotation of the workpiece, the tilting of the support (mandrel or vice or flanges) of the workpiece. I want to make these 2 movements FROM TIME TO TIME thanks to 2 Nema34 8.5 Nm motors. For the tilting, I ordered a helical gear (which will bring an inaccuracy...). For the rocker, I ordered a ball screw with a diameter of 25 mm.
Title: Re: 2 cnc boards
Post by: p7m13 on January 01, 2025, 11:21:06 AM
Modify does not work.   Strange

For the tilting, not the rocker
Title: Re: 2 cnc boards
Post by: Graham Waterworth on January 01, 2025, 11:35:09 AM
In most cases when using a rotary axis you are working on the Y axis centre line so the Y axis is not used.  All you need to do is put a change over relay in the step/dir lines for each axis and set an M code to swap the relay and a 4 axis will do 5 axis.  Using the SwapAxis command will use the settings for the 5 axis.

That is a very flimsy device for using in any machine it needs to be very rigid even for engraving due the length from the pivot point, it will move very easily.
Title: Re: 2 cnc boards
Post by: p7m13 on January 01, 2025, 11:49:48 AM
That's exactly what I was thinking about less than 10 minutes ago: using the Y-axis and playing around with mechanical change over switches.  ;D
My plates are 12 mm thick steel. The engines are Nema34 8.5 Nm.
On the other hand, you offer an electronic selection (here, I need more details).
The mechanical switch reassures my mind, although it may have a defect, in the long run...
Title: Re: 2 cnc boards
Post by: Graham Waterworth on January 01, 2025, 11:51:20 AM
Here is the page from the manual :-

SwapAxis

Sub SwapAxis(FirstAxis As Integer, SecondAxis As Integer)
This function swaps the STEP and DIR pins for the two specified axes. This has
precisely the same effect as changing the pin settings in Config->Ports&Pins. Note that
no other axis parameters or settings are changed. If the two specified axes have different
acceleration and velocity settings, unreliable operation will likely result. Note also that if
you exit Mach3 while the swap is in effect, the swapped pins will be written to the XML
configuration file, and the swap will still be in effect the next time you start Mach3. It is
illegal to perform two consecutive swaps, without first executing a ResetAxisSwap().
Doing so will likely result in incorrect operation.

Arguments:
FirstAxis in an Integer value that specifies the first axis to swap. 0=X, 1=Y, 2=Z,
etc.
SecondAxis in an Integer value that specifies the second axis to swap. 0=X, 1=Y,
2=Z, etc.
Return Value:
None
Title: Re: 2 cnc boards
Post by: Graham Waterworth on January 01, 2025, 11:55:37 AM
Buying a 5/6 axis breakout board is the best option.  Look at CNC4PC.com he has lots to choose from.

https://cnc4pc.com/motion-control/breakout-boards.html (https://cnc4pc.com/motion-control/breakout-boards.html)
Title: Re: 2 cnc boards
Post by: p7m13 on January 01, 2025, 11:57:41 AM
Thank you. I don't see this command on the general window. Can I receive this documentation? Also, I can only connect 4 axes...??
Title: Re: 2 cnc boards
Post by: p7m13 on January 01, 2025, 12:00:52 PM
 I don't understand how permutation can work with an extra axis
Title: Re: 2 cnc boards
Post by: JohnHaine on January 01, 2025, 12:10:50 PM
Right, well not having the ability to coordinate rotary motion with XYZ could be a real disadvantage, for example in some forms of gear cutting.  I sometimes use my rotary axis (driven by Mach3) for knurling, where it is definitely necessary to coordinate its motion.  If you could accept the lack of coordination then I would suggest just using a simple 2-axis controller based on GRBL rather than duplicating Windows and Mach3. 

It seems that there was a 5-axis project in Mach3 back in 2016 but I don't know what happened to it.  As far as I can see Mach3 supports up to 6 axes.  5 axis motion controllers are around and not too expensive, as are 5 axis BoBs.  I'd just "bite the bullet" and do a proper 5 axis solution.  If you do use changeover switches be careful where you put them - not on the stepper driver outputs!  Breaking the connection there when the driver is powered up can blow up the driver.
Title: Re: 2 cnc boards
Post by: p7m13 on January 02, 2025, 04:40:02 AM
 I was planning to combine one of the xyz axes with the tilting (not the rotation axis of the part)
Title: Re: 2 cnc boards
Post by: p7m13 on January 03, 2025, 11:51:25 AM
The 2 rotations (rotation of the platen, tilting of the plate) would not have stops.
In the GUI, I don't see a degree unit. I will therefore have to develop an abacus of motor speed versus rotations
Title: Re: 2 cnc boards
Post by: p7m13 on January 03, 2025, 12:08:39 PM
abacus of coordinate versus rotation