Hello Guest it is March 28, 2024, 04:27:22 PM

Author Topic: Xhc control card connecting to sangmutan bldc spindle control  (Read 3109 times)

0 Members and 1 Guest are viewing this topic.

Can anyone please advise how I can assign 2 output pins to activate from M4 in Mach .
My problem is that the sangmutan drive needs two pins to go active low to reverse the spindle.

Specifically I've connected DCM on my Xhc card to GND on connector CN15 on the drive control
I've connected FWD on the Xhc to S/P on the drive,
And I have connected REV on Xhc to F/R on the drive,

FWD is controlled by M3
REV is controlled by M4

However when I use M4, I also need to have S/P on the drive to get a signal as if I'd commanded M3

Hopefully my explanation is adequate, and somebody can advise, but essentially I need to activate FWD and REV simultaneously on my Xhc control using the M4 command in Mach

Any suggestions please?

Thanks

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Xhc control card connecting to sangmutan bldc spindle control
« Reply #1 on: August 20, 2016, 07:09:13 AM »
In the folder / file ;  C:\ Mach3 / macros / Mach3Mill / m4.m1s

Add the line   ActivateSignal(OUTPUT4)   or whatever Output#  you require – calling M4 will then activate the Output# defined in Spindle Setup and the Output# you have chosen here.

Obviously a similar procedure may be necessary for turning it off.

Tweakie.
PEACE
Re: Xhc control card connecting to sangmutan bldc spindle control
« Reply #2 on: August 20, 2016, 07:28:47 AM »
You are a genius
Works like a charm
Thanks for saving me from hours of head scratching

 ;D

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Xhc control card connecting to sangmutan bldc spindle control
« Reply #3 on: August 20, 2016, 07:52:11 AM »
Thanks for the kind words - that's the first thing I seem to have got right this week.  ;D

Seriously though, I am pleased that you are on your way to getting everything working as it should.

Tweakie.
PEACE
Re: Xhc control card connecting to sangmutan bldc spindle control
« Reply #4 on: August 20, 2016, 03:47:40 PM »
Hi tweakie

It's a pity that all the manuals with these products are so inadequate and Bradley written, with little if any support from the vendors
It makes figuring things out so much more diffucult, but thanks to guys like you and forums like this, we can usually muddle our way through.

Which brings me to my next difficult question, which is along similar lines.

I need to fit a z axis brake to my machine , and control it from the Xhc card.
My servo drives don't use an enable signal, so I'm wondering how I can realise the brake prior to every z axis move.
Is there a macro that I can add an output call too that will be called before each Z, or is it only necessary to lift off the brake as soon as the servos have power .

Can you suggest how I might hook this up

Many thanks

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Xhc control card connecting to sangmutan bldc spindle control
« Reply #5 on: August 21, 2016, 01:43:12 AM »
Once a servo has power it should hold it’s position. I would be inclined to use a brake which is automatically released when the servo is powered and applied once the servo power is removed (perhaps something like a spring loaded electromagnetic clutch).

Tweakie.
PEACE
Re: Xhc control card connecting to sangmutan bldc spindle control
« Reply #6 on: August 21, 2016, 04:48:44 AM »
Hi tweakie,

So how would I get a signal that my servois are powered?
Is it simply a case of assigning a PIN number to enabled and then using that to activate a relay and then the brake?

I'm not clear on how the enabled signals in Mach work

Thanks

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Xhc control card connecting to sangmutan bldc spindle control
« Reply #7 on: August 21, 2016, 05:18:03 AM »
Perhaps I am misunderstanding your setup or what you need to do but as you do not have any Mach3 Enable signals connected I assume your servo's lock their position when power is applied to the machine and freewheel when the power is turned off.
If this is true then I would energize the brake electromagnet (to release it) from the same circuit that supplies the power to the machine - when power to the machine is turned off then the brake is automatically applied. I envisage this to operate totally independent of Mach3.

Tweakie.
PEACE