Wiring of servo spindle - MESA 7i76E

More
03 Jun 2022 09:20 #244491 by deus
To clarify - I have a solid state relay (NO) now and basically need a signal from LinuxCNC to my MESA output pin hm2_7i76e.0.0.output-07 (which should de-energise if there is a fault in LinuxCNC to switch my emergency circuit).
What would be this signal be called in LinuxCNC?

Also as a second question why doesn't LinuxCNC have a pin hm2_7i76e.0.0.output-07_not basically inverting a signal to the output pin (similar to the input pins).

Does this makes sense?

Thank you!

PS: I Incorporated in the hal file already the e-stop_latch which works well but I believe that is not what you meant.

Please Log in or Create an account to join the conversation.

More
03 Jun 2022 09:25 #244492 by deus
Thank you spumco - that all makes sense. Thank you for taking the time to reply.
I think I will leave the emergency port for the servo out for now as I am happy with my current estop latch.
Down the line when I gained a little more experience and know what is useful and what is not I might use this emergency input at the servo drive.

Please Log in or Create an account to join the conversation.

More
03 Jun 2022 10:44 - 03 Jun 2022 10:44 #244497 by smc.collins
which brand of servo and which model ? I have been looking for a small spindle like this for a while.
Last edit: 03 Jun 2022 10:44 by smc.collins.

Please Log in or Create an account to join the conversation.

More
03 Jun 2022 10:54 #244502 by deus
Just have a look here:
www.szghauto.com/product/93.html

Best AC servo I could find in terms of specs (i.e. torque, RPM and still being 240V single phase). Furthermore, it actually will fit on my mill without any major modifications and it also doesn't weight a ton.

 

Please Log in or Create an account to join the conversation.

More
03 Jun 2022 10:57 #244504 by smc.collins
I am definitely keeping that in mind. Doesn't that drive support RS485/ethercat etc ? I'd be willing to bet that LinuxCNC could control that over serial or ethercat

Please Log in or Create an account to join the conversation.

More
03 Jun 2022 11:42 #244511 by spumco

To clarify - I have a solid state relay (NO) now and basically need a signal from LinuxCNC to my MESA output pin hm2_7i76e.0.0.output-07 (which should de-energise if there is a fault in LinuxCNC to switch my emergency circuit).
What would be this signal be called in LinuxCNC?

Also as a second question why doesn't LinuxCNC have a pin hm2_7i76e.0.0.output-07_not basically inverting a signal to the output pin (similar to the input pins).

Does this makes sense?

Thank you!

PS: I Incorporated in the hal file already the e-stop_latch which works well but I believe that is not what you meant.
 


Because there is no way to drive a physical output both high and low at the same time.  Outputs are on or off.

I assume you're fairly new at LCNC - so am I - but you'll get some of the nuances of HAL quickly.  Consider your own question:

"...inverting a signal to the output pin."  This is what you want to do: invert the SIGNAL to the output pin, so if you have a logical test = TRUE, you want the output deasserted (pin low).

In the online manual, under 'realtime components', have a look at the "not" component.  (You know what these are by now, right?  If not, ask)

This a a hal component which inverts a signal - that's it, but dead useful and what you want here:

loadrt not counts = 1
addf not.0  servo-thread

net estop_signal <= halui.estop-something-something (pin HIGH when estop deasserted, LOW when asserted)
net estop_signal => not.0.in
net estop_signal_inverse <= not.0.out
net estop_signal_inverse => hm2_7i76e.0.0.output-07 (pin LOW when estop deasserted, HIGH when asserted)
(bonus)
net estop_signal_inverse => hm2_7i76e.0.0.output-08 (big red light on operator console lights up when estop asserted)

If this doesn't click with you, let me/us know and we'll have another go at it.
 

Please Log in or Create an account to join the conversation.

More
03 Jun 2022 16:46 #244525 by deus
That is an excellent explanation. And you are right - I am fairly new to this business 3 days in. ;)

I am still not sure the exact signal i should send out to my physical e-stop circuit.
  • What is the typical fault signal called within Linux CNC that would be good to trigger the physical e-stop loop?

I got the spindle almost set up - I managed to send out my analog voltage. I only need to solder up the spindle cables and now I am wondering if I should get some shielded cables (for UVW, 240V and the braking resistor).
  • What did you guys do? Did you spend the dollars?

And as you go along there are some other questions that came up as well:
  • How do I know what my encoder scale is. I looked in the manual and couldn't find anything and also on the name plate there is nothing. Is there some sort of standard encoder scale (i.e. 100)?
  • Another question that came up - I saw that you could run the spindle directly with PWM  using the MESA 7i76e board. The servo I have would support that. Is there any advantages or disadvantages? Besides the fact that the setup of analog seems to be more common and quite easy to setup.
I appreciate all the help and I am genuinely impressed by the excellent support. I hope I will be able to pay this back... Cheers

 

Please Log in or Create an account to join the conversation.

More
03 Jun 2022 22:34 #244548 by spumco

That is an excellent explanation. And you are right - I am fairly new to this business 3 days in. ;)

I am still not sure the exact signal i should send out to my physical e-stop circuit.
  • What is the typical fault signal called within Linux CNC that would be good to trigger the physical e-stop loop?


    I got the spindle almost set up - I managed to send out my analog voltage. I only need to solder up the spindle cables and now I am wondering if I should get some shielded cables (for UVW, 240V and the braking resistor).
    • What did you guys do? Did you spend the dollars?


      And as you go along there are some other questions that came up as well:
      • How do I know what my encoder scale is. I looked in the manual and couldn't find anything and also on the name plate there is nothing. Is there some sort of standard encoder scale (i.e. 100)?
      • Another question that came up - I saw that you could run the spindle directly with PWM  using the MESA 7i76e board. The servo I have would support that. Is there any advantages or disadvantages? Besides the fact that the setup of analog seems to be more common and quite easy to setup.

        I appreciate all the help and I am genuinely impressed by the excellent support. I hope I will be able to pay this back... Cheers

  • This depends on your physical e-stop loop.  As with everything LCNC, there are millions of ways to skin the proverbial cat.
    • First thing is to read forum posts, especially the HAL examples and Classic ladder sections.  You can even find some nice people who have posted wiring diagrams of estop schemes...
    • There are plenty of built-in fault signals available in LCNC, including axis-amp-fault, spindle-amp-fault, and user-interface type faults.  Read the user manual for 'motion' and 'io' components and you'll find a slew of toys to play with.
    • One semi-secret thing to consider is that all the components under the 'realtime' section in the manual are fast, while the 'user components' can be slower to react.  If you rely on a user component (halui.something-jibberish) it will react to inputs more slowly than a realtime component.  It's not really a secret, BTW, just one of the bajillion things to know about LCNC.  Someone smarter can explain why in detail, and I could be wrong, except the internet is always right.
    • My preference is to have a safety relay which cuts all bus power to drives and air/hydraulic solenoids.  That relay is controlled by both the operator (via latching NC switch) as well as LCNC through a Mesa output - either can assert the estop condition.  More importantly, a physical pushbutton is connected to the safety relay through a holding circuit which is NOT connected to LCNC.  Only the human can deassert the estop condition.
    • You, as the machine builder, get to pick what you want to have happen.  Again, my preference is to tie the drive & spindle alarms to LCNC but not the estop loop.  I am of the opinion that an estop is a last resort - LCNC is smart enough to stop motion if a drive alarm is asserted without killing everything.
  • Shielded cables are never a bad idea - a little surprised you didn't get a set with the motor/amp combo.
    • I have really nice shielded cables from my VFD to the motor, but I cheated.  I found that new-surplus servo cables are pretty cheap if you know how & where to look.  Siemens makes extremely nice cables - including a continuous-flex version.  They're every bit as nice as the eye-wateringly expensive Beldon VFD cables.  Check ebay for Siemens servo cables - they're usually green (signal) and orange (power).  Spend some time educating yourself about the varous part numbers and you can usually find something mislabeled, or doesn't say "SIEMENS" or "SERVO" in the listing title.  It helps if you can match up the connector pins.
    • Look in the servo manufacturer's literature and find a big servo (like >5kw @220v) and see what the official cable part number is.  All the big-name servo mfgr's have pages and pages of tasty, ferociously expensive cables with a multitude of cable ends available.  Write down the part numbers for the big, high-amp applications and start trolling ebay.
    • If the seller knows what it is = $$$.  If the seller has some annoying green and orange cables in a pile over in the corner = <$.
  • The braking resistor should really have oversized, high-temp, cables.  Shielding - meh.  Resistors can get hot, and that bus is dumping a ton of energy in a short period of time.  Especially if you program your mill to act like a Speedio and bang that spindle +/- 4kRPM in a heartbeat while rigid-tapping a thousand holes.  Sewing machine meets Tapmatic = hot braking resistor.
  • Your encoder scale should be in the datasheet/manual of your motor. Or on the manufacturer's web site.
    • If you can't find it, it's possible you can decode the thing by carefully taking off the encoder cover and reading a part number off it - then google is your friend.
    • You may even be lucky and the ppr or cpr is on a label.  Whatever you do, don't take the encoder itself off or take some screws out to investigate it.  No poking around.  If the encoder is rotated in relationship to the shaft the hall sensor(s) phasing will be off and the thing wont work properly (if at all).  Resetting the hall phasing can be a huge pain unless you have an aftermarket servo amp designed to 'auto-phase'.
    • More to the point, if you're trying to connect the servo to the same manufacturer's amp, it should be pre-set with the right settings.  If you're trying to connect the amp's encoder output to a Mesa card (or other encoder input to LCNC), the encoder outputs from the amp are probably buffered and/or emulated.  Most drives have software (for tuning) where you can program whatever encoder counts per rev to be sent to the motion controller.
    • This is the same software where you can do 'electronic gearing' and program the drive how many input steps equal one motor rev (assuming its set to step & direction, not torque or velocity mode).
  • Analog vs. PWM.  Advantage to analog - easy.  Advantage to PWM - noise resistant, and potentially less hassle if the analog signal requires some scaling & fiddling to get the commanded speed to equal actual speed.
Hope that gives you something to chew on over the weekend.

-Ralph
The following user(s) said Thank You: deus

Please Log in or Create an account to join the conversation.

More
03 Jun 2022 22:39 #244549 by spumco
PS - you don't need shielded cables from the contactor/breaker to the amp.  Just from the amp to the motor.

240V-in (unshielded) Main disconnect (unshielded) Breaker (unshielded) Contactor (unshielded) Line reactor (unshielded) Amp (shielded) Motor
 
The following user(s) said Thank You: deus

Please Log in or Create an account to join the conversation.

More
08 Jun 2022 15:22 - 08 Jun 2022 15:24 #244766 by deus
Thank you so much for all the info. This certainly gives me a bit to chew over the next weeks. ;)

Thank you for the recommendation in your last post - very handy.
Last edit: 08 Jun 2022 15:24 by deus.

Please Log in or Create an account to join the conversation.

Time to create page: 0.113 seconds
Powered by Kunena Forum