Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: natefoerg on February 04, 2020, 12:28:21 PM

Title: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 04, 2020, 12:28:21 PM
Morning Gang!

First a little background-

I have been using Mach for about 10-11 years. Started with 2 and have been using 3 for as long as I can remember.

I have retrofit a Bridgeport series 1, a Tree 425 mill (4 axis) and a few routers for friends over the years.

At this time I am just wrapping up a Monarch 10ee lathe CNC conversion. I have an unmodified 10ee as well.

My CNC 10ee is from 1955, and was originally an "air tracer machine" so it was special enough to not be useful as a standard manual lathe anymore, and thus I did not have any qualms converting a 10ee.

The 10ee is set up as follows-
*7.5 baldor VFD and 7.5 Hp 1750 motor. Geared approximately 3:1, so the spindle runs about 1/3 of motor speed. Motor and spindle coupled with a large timing belt. No slip under heavy cuts, but noisy with this belt. Seems this motor has lots of torque. spindle tach never deviated more than 2 rpm when under cutting conditions. So far I am happy with 7.5hp.
*Orig spindle oiler setup destroyed, so I have installed a small pump for constant oiling.
*Steppers on X and Z, 890ozin motors, running G214r geckodrives
*Ethernet SS
*C25 BOB
*CXX spindle pulse board. one notch in wheel, approx 1/4 of disk perimeter. so far signal is very stable. as far as i can tell.
*limit and home switches.
*full compliment of contactors, relays etc for controlling accessories, drive power, SS power, Coolant etc.
*all power supplies 70VDC, 12VDC, 24VDC, etc are activated by relays and contactors such that they are all individually controllable and all items are fused.
*standard dell pc tower running mach3.
*20HP cnc capable Rotary convertor supplying 3 ph to the VFD drive.

So far I am very happy with the conversion, but I am only a few cuts into using it.

I did have a Hardinge CHNC I had converted years ago, but sold it to fund the 10ee conversion, so it is not my first rodeo with a mach3 controlled lathe.

So... on to my real issues, now that I have provided some background.

I have a delta ASDA-B2 drive with a matched 750W servo motor. Encoder believed to be 17bit, biut not enumerated on the motor so I really am not sure. I do not have the delta tuning software, acc keypad or connector cable to use the software tuning.

I have been able to apply 3ph to the delta drive and then also power the two seperate control circut power leads. Pulled from 3 ph.

Servo drive powers up with no faults, and after adjusting parameter 2-30 to 1, I am able to enter Jog mode and get full 3k rpm of servo when jog is commanded. CW and CCW both work.

Although I can get the Delta drive to operate correctly in Jog, running it with Mach3 is another thing.

I have been able to get the ASDA-B2 to respond (correctly) to step and direction (Sign and Pulse according to Delta manual) however, the motor (despite tuning everything I could find in drive and mach and SS configurations, to no avail. I am only able to get the motor running at about 4rpm. No matter what I do I cannot seem to get the servo to run at a reasonable (usable) speed.

I have been doing a lot of reading (spent 12hrs working on this yesterday) and as far as I can tell, Mach3 may not be sending the correct pulse train through the ESS, into the C10BOB and into the Delta Drive.

I did check to make sure that my BOB is outputting a full 5vdc+ to the delta drive. I understand that the Delta drive wants Differential signals for Sign and Pulse. Mach does not do this, and this may be my issue. I have ordered Differential Line Driver from CNC4PC, hopefully will have them by the end of the week.

Another possibility is that the electronic gearing in the ASDA-2B is set incorrectly. I have seen much referring to this here in this forum. I am having trouble with parameters 1-44, 1-45, and 146. I don't seem to be able to figure out how to enter the gearing ratio correctly. I suspect this is due to the fact that the parameters for gearing are able to be input as a large number, I cannot figure out where the real decimal point is in the setting, I fear that if I don't know which decimal is the right one, I have been entering erroneous numbers. I tried 0-ing out the value and they typing in a new one, but I just cant figure out where the number goes in relation to the (many) decimal places that the ASDA-B2 has in these parameters.

I gather that I should have 160,0000 pulses for my 1 full encoder rotation. I also gather that I should set 1-46 to 40,000 as this represents the "line count" I need for electronic gearing to work correctly. I am hazy on these matters.

It may all come down to needing better signal/conditioning of the pulses out of mach3, and having the pulses output in -5v/+5v differential via a Differential Line Driver. '

I plan to install the 750w servo on my 10ee as the Z axis. Mostly just to play with an AC servo/drive for a change. Very interesting stuff.

Notes:

A. the Delta manual is specific to later drives for my drive. I originally was using an incorrect version. the correct version uses a DB44 female connector for CNC1, and the old drive version used a different connector. Once I found the right manual, things made more sense.
B. you cannot alter some parameters unless you deactivate the drive by forcing "servo on" to "servo off" via perameter 2-30. Once disabled, all parameters can be adjusted. Note also that to have drive operate either in JOG or by Mach3, one HAS to activate parameter 2-30 by changing the value to 1 (on)
C. the manual is crazy long. 300 some pages. takes forever to scroll up and down to find information in section to section. very irritating, I would print it, but at 300+ pages, it will have to wait.

The Delta drive has many ways to interface inputs, open collector, single ended input/line driver, etc. I really could use a breakdown of how each works. I am not clear on if their is a way to cheat and run it without a differential signal? I did check to make sure I have a full +5vdc to the drive, but this is only half of a differential signal. I see that some people may have had success applying a single ended stream of pulses to the drive, but as of yet, I have not been able to make it work.

Their is discussion of using resistors and transistors to make the signal usable for the ADSA-B2, but I am really quite lost on this matter. Any insight would be welcome.

IF, anyone has a setup running mach3/ESS/C25BOB and a ASDA-B2 drive, I would be most interested in knowing what your settings in mach3 motor tuning/ports and pins/and ESS settings are. If I had these it could be a sort of baseline to start from.

ASDA-B2 manual is available here-

https://www.scribd.com/document/366289266/DELTA-IA-ASD-B2-UM-EN-20141217

Thanks to everyone to taking the time to read this.

Nate in Ann Arbor Michigan.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 04, 2020, 01:45:46 PM
Hi,

Quote
I am having trouble with parameters 1-44, 1-45, and 146. I don't seem to be able to figure out how to enter the gearing ratio correctly. I suspect this is due to the fact that the parameters for gearing are able to be input as a large number, I cannot figure out where the real decimal point is in the setting, I fear that if I don't know which decimal is the right one, I have been entering erroneous numbers.

I had exactly the same problem, trying to program numbers that have more digits than the display is wide. I had the decimal in the
wrong place and it ages for me to work out why. Eventually I got the special programming cable and used the software, its highly recommended.
I bought the Delta made cable but I believe a 'Firewire' cable will work, although I understand there are two types of Firewire cable, only one of which
is applicable to Delta servos, ergo I bought the right one, a Delta accessory.

https://www.ebay.com/itm/NEW-ASDA-B2-AB-A2-rs232-ASD-CNUS0A08-PLC-Programming-Cable-HJ54-YD/173788498397?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649 (https://www.ebay.com/itm/NEW-ASDA-B2-AB-A2-rs232-ASD-CNUS0A08-PLC-Programming-Cable-HJ54-YD/173788498397?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649)

I'm just about to leave for work but will consider some of the questions you raise and reply tonight.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 04, 2020, 05:11:35 PM
Hi,

Quote
I have a delta ASDA-B2 drive with a matched 750W servo motor. Encoder believed to be 17bit, biut not enumerated on the motor so I really am not sure. I do not have the delta tuning software, acc keypad or connector cable to use the software tuning.

To my knowledge ALL B2 series have the 17bit (nom) or 160,000cpr encoder, thats what make them B2 series.

Quote
I have been able to get the ASDA-B2 to respond (correctly) to step and direction (Sign and Pulse according to Delta manual) however, the motor (despite tuning everything I could find in drive and mach and SS configurations, to no avail. I am only able to get the motor running at about 4rpm. No matter what I do I cannot seem to get the servo to run at a reasonable (usable) speed.

Almost certainly because you have the wrong electronic gearing parameters set.

Quote
I did check to make sure that my BOB is outputting a full 5vdc+ to the delta drive. I understand that the Delta drive wants Differential signals for Sign and Pulse. Mach does not do this, and this may be my issue. I have ordered Differential Line Driver from CNC4PC, hopefully will have them by the end of the week.

If you set the electronic gearing parameters such that you dont require excessively high signalling rate to the drive, say less than 200kHz, then you DON'T NEED
differential signalling, single ended will be fine. The drive is expecting 24V signalling. I have a transistor between my BoB and the Step and Direction inputs of the drive.

I determined that I could have 1um linear resolution with my servos electronically geared to 5000 cpr. To acheive that I set the numerator to 1 and the
denominator to 32.

P1-44 = 1
P1-45 =32

160,000 x 1/32 = 5000.

What happens, in effect, is that  one pulse from my BoB causes the servo to rotate 32 of its native (160,000 count) encoder counts. If I pulse the drive 5000 times
the servo will advance 160,000 counts of its encoder, or one revolution. Easy.

Note that if I want my servo to do 3000rpm in my machine, that is 50 revs/sec then I would need to signal the drive 50 x 5000 =250,000 or 250kHz.
That is very much the top limit for single ended Step/Direction input and I really need to go to differential signalling. When the servo is doing 2000rpm
the signalling rate is a more modest 200kHz, within the capability of a single ended input and my machine is still doing 10m/min which is more than
fast enough for me.

P1-46 is the setting that determines the lines/rev number of the synthesized servo for monitoring purposes only. For instance you might have an external
monitor on your axis that requires 1000 pulses to read 10mm. If your ballscrew is 10mm pitch (conveniently) then you would set P1-46 = 250. The monitor
encoder output would then be 4 x 250 =1000 counts (or pulses) per rev, just right for your external monitor.

Note the the synthesized encoder output has NO BEARING on the internal operation of the native encoder nor the electronic gearing parameters that
accompany it.


Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 04, 2020, 08:08:25 PM
Craig-

Thanks so much for diving into the details of the electronic gears and such. I will read this over about 10 times and hopefully will be able to make it 'click'

I am going downstairs to the shop to see if I can get the electronic gearing and line count set.



As far as getting the pulse stream sorted-

I would like to try and use the existing single ended output 5vdc+ from my C25 board.

You reference this here

"If you set the electronic gearing parameters such that you don't require excessively high signalling rate to the drive, say less than 200kHz, then you DON'T NEED
differential signalling, single ended will be fine. The drive is expecting 24V signalling. I have a transistor between my BoB and the Step and Direction inputs of the drive."

Several questions on this part.

1. What should I set my Mach3 Kernel Speed to? I have successfully used 25,000Hz and 45,000Hz. The PC running Mach3 is an older dell outputting through ethernet to the ESS.
2. In the ESS main config page of the plugin, I can set the ESS controller frequency. Suggestion for a frequency that is under the speed which will allow me to have correct pulsing output for the Delta Drive.
3. The Delta manual here- file:///C:/Users/Nate%20Foerg/Desktop/DELTA_IA-ASD_B2CURRENT.pdf on page 3-18, the figure gives a list of options for which pins on the DB44 connector should be wired up depending upon wether or not you want to hook it up to high or low speed pulses, open collector, etc. I gather that you are suggesting that I use the one called Position Pulse (Input) this is the only one that appears to support the 200KHz freq. Assuming I am correct on this being the correct option, I am unclear on how I should be using the pins here-

########################################
Position Pulse (Input)
PULSE /PULSE SIGN /SIGN PULL HI
43 41 39 37 35
Position pulse can be inputted by Line Driver (single phase max. frequency 500KHz) or open-collector (single phase max. frequency 200 KHz). Three kinds of command type can be selected via P1-00, CW pulse + CCW pulse, pulse + direction, A pulse + B pulse. When position pulse uses opencollector, the terminal should be connected to an external applied power in order to pull high.
Wiring Diagram C3/C4
####################################

Yesterday when testing, I had the pins set as follows-
From BOB, pin 2 (mach3 step pin) running to PULSE pin 43.
From BOB, pin 3 (mach3 Direction pin) running to SIGN pin 39.
From BOB Ground pin running to /PULSE pin 41.
From BOB Ground pin running to /SIGN pin 37.

With these connections I was able to 'slightly' move the motor with Mach3.

As I write this, I am Starting to have things fall slightly into view... looks like I should be using wiring diagram C3/4 on page 3-28 of the Delta manual.

If so, I was close on my wiring yesterday, but without having an external power source applied to "the terminal" (whatever that is. best guess is its pin 35) if that's the case, the diagram looks as if VDC- is applied to pin 35. Not clear on this 'pulling up' concept. I sort of get how it works, but at least in this application, I am unsure how to wire the external power supply. I assume it must be 5VDC+, and that if I used higher power, like the 24VDC the diagram calls for, I might damage the BOB or ESS, if what I believe is correct. All the resistors shown in diagram C3/4 appear to be internal to the Servo Drive. At least thats how I read it. However, I only vaguely read electronic schematics.

I don't get how I can wire the BOB pins 2 & 3 (5VDC+ when active) to Pins 39 & 43 on the Delta drive, as the BOB does not appear to have any -VDC available for pin 37 & 43. I suppose I could use Ground on the BOB as the -VDC. Possibly that's what should be done?

Would be curious to know how a transistor works in your application? I am thinking you have it amplify your 5VDC+ up to 24VDC+ for the Delta Drive to Accept as a digital input?

Again, updating this as I read more about things, I have found this link very informative pertaining to Open Collector. https://www.evilmadscientist.com/2012/basics-open-collector-outputs/

Ok, off to the shop for a few hrs.

Thanks so much for chiming in on these matters. I am most appreciative.

Nate.



Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 04, 2020, 08:53:26 PM
Just wanted to add that after successfully getting the servo to Jog at various speeds, I am amazed by the silence, power and smoothness. The Smoothness compared to a stepper is off the charts.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 04, 2020, 10:24:11 PM
Hi,

Quote
I would like to try and use the existing single ended output 5vdc+ from my C25 board.

Wrong answer, use the 0-5V signal to turn on the base of a signal transistor which in turns the drive input opto on and off.

Quote
What should I set my Mach3 Kernel Speed to? I have successfully used 25,000Hz and 45,000Hz

Immaterial, Machs kernel speed is to do with the parallel port and the ESS obviates the parallel port altogether. If you like the 'kernel'
speed with the ESS is 4MHz, that is the ultimate pulse speed of the ESS, a mere 160 times faster! Warp9 recommend leaving the kernel speed at 25kHz,
not that it should make any difference.

Quote
In the ESS main config page of the plugin, I can set the ESS controller frequency

I use Mach4 and the ESS Mach4 plugin is somewhat different however I think you are refering to the rate at which the ESS talks to Mach and is irrelevant
to driving servos. If the ESS was driving steppers before it will drive servos with virtually no alteration at all.

Will download the manual and have a closer look. Generally you use the built-in 24V supply within the drive to energise the input step/direction circuitry.
The choice of pins concerns the inclusion/exclusion of the series resistor within the drive. If you attempt to switch 24V (or even 5V) direct through the drive
input photodiode WITHOUT a series resistor somewhere in the circuit will blow the photodiode.

Quote
From BOB, pin 2 (mach3 step pin) running to PULSE pin 43.
From BOB, pin 3 (mach3 Direction pin) running to SIGN pin 39.
From BOB Ground pin running to /PULSE pin 41.
From BOB Ground pin running to /SIGN pin 37.

I think you may have miswired it. The output of the BoB (pin 2 or 3) is 5V, correct? You hooked that to the photodiode input (pin 39 or 43) without a series resistor,
and the other side of the photodiode (pins 37 or 41) to 0V. Thus the photodiode has to withstand the full 5V output of your BoB, you may have damaged it already.

When my drives turned up they had a sticker on the outside warning about the correct and alternate incorrect way to wire them....did you look at it, even save it?

Draw a circuit diagram of what you have done and post it. DO NOT HOOK ANY PHOTODIODE UP WITHOUT THE BENEFIT OF A CURRENT LIMIT RESISTOR OR YOU WILL
DESTROY THE PHOTODIODE.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 12:15:40 AM
Well.. looks like you are right. I wired it up sans transistors and was not able to get any response from the drive. Jog still works, but it looks like I may have cooked the optos.

Fortunately there are replacement drives available affordably on ebay.

This drive/motor however can still be used just with the jog command at whatever speed I set in the parameters. So its not useless, it would make a great drive motor for a horizontal air bearing that I am converting to a rotary grinding (work) spindle for grinding bearing spacers and such on the surface grinder.

Alternately, the drive/motor could be used to power any number of things, a poiwer feed for example.

Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 05, 2020, 12:31:56 AM
Hi,
I wouldn't give up just yet.

I would us a battery, say 9V to drive a little current through the photodiode via a milliampmeter to see whether the photo diode is intact.
I may be possible to replace them if they are faulty.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 01:11:48 AM
Nowhere near giving up. Rather, if the diodes are blown, I consider what I have learned so far to be well worth the cost.

I am seeing applications for as servos/drives everwhere now.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 05, 2020, 03:05:05 AM
Hi,
referring to the attached picture from 3-27 of the manual.

Note that the internal 24V power supply is available at pin 17. Following the diagram you should direct connect pin 17 to pin 35.
With pin 35 now at 24V current can pass through the approx. 2kOhm resistor the 75 Ohm resistor, through the photodiode, through
the second 75 Ohm resistor to pin 37 and thence to the 24V COM at pin 14 via the transistor switch of your BoB or input circuit.
There is a second current path through the 2kOhm parallel resistor as well.

You can test the photodiode by having pins 17 and 35 connected as above. Then with your multimeter in ammeter mode probe
between pin 35 and pin 14. If the photodiode is intact I would expect a current of (24-2)/(2000 +75 +75)=10mA plus another
24/2000=12mA being the current through the 2kOhm parallel resistor, for a total of 22mA. If the photodiode is open circuit
you'll see only 12mA.

Note that Delta have an anti-parallel diode across the photodiode. This prevents a large reverse bias from ever being presented to the photodiode.
Photodiodes are notoriously poor at resisting reverse bias, they tend to go into destructive avalanche breakdown, hence the anti-parallel diode
is precautionary. You can test it in identical manner to the photodiode. Connect pin 17, not to pin 35, but rather pin 37. Now with your multimeter
still in ammeter mode probe between pin 35 and pin 14. If the anti-parallel diode is OK you should see about 22-24mA. If its open circuit
you'll see only 12mA.

I bought three 750W B2 series and drives, brand new, for $520 each (including $80 three day DHL shipping to New Zealand) several months ago.
In short you should be able to buy a NEW driver for around $200 plus shipping. I wouldn't be messing around with second hand at that price.

Quote
I am seeing applications for as servos/drives everwhere now.

Modern AC servos have such a wealth of control options, including step/direction position mode, analogue velocity and torque modes, a variety
of index modes (position and velocity), and secondary modes as well. Thus you could have your servo running in position mode as its primary function,
yet by controlling one digital input to the drive, it can switch to velocity mode. They are just so flexible they can be used in so many circumstances.

To date the price of AC servos have prevented many hobbyists from experimenting with them but Delta and DMM are two brands of GOOD quality
at very fair prices. There are even cheaper Chinese made servos and drives and while less is known about the quality and backup of these
cheaper brands many who have used them are reporting good success. Over the coming years more and more hobbyists are going to take advantage
of the performance benefits.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 05, 2020, 03:35:57 AM
Hi,
sorry forgot to attach the picture.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 12:23:59 PM
Morning! or whatever time it is in New Zealand!

I have ordered a transistor assortment off amazon. Should be here tomorrow or friday.

In the interim, I am going to pull a transistor off of some old defunct electronics. I think I have an old Zylotex board that has transistors.

Will see if I can dig one up for testing.

If, as I believe it is, relatively simple to get mach to talk to a servo drive (even though I have failed thus far, I can see it is very possible) then I cant figure out shy everyone has not adopted servos.

If a G203V costs 140USD, decent stepper costs 100USD and ESS cost 180USD, add to that a large DC power supply at 200USD, The stepper cost to drive one axis is 620USD. adding a 2nd axis brings the total up to 860USD. Not really cheap at all.

I can buy 2 new servos and drives for somewhere around 600USD, Add a ESS for 180USD, and the first axis costs 480USD, and adding a second brings the total to 780USD. Actually cheaper than the stepper setup.

At 3+ axis's the math changes to favor steppers. If cost minimization is the goal


If my math is even close to correct, their is no compelling reason to use steppers anymore. Servos are now affordable and seem to be vastly superior motors/drives.


Am I crazy, or am i seeing this correctly?

Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 01:44:49 PM
##################
Note that the internal 24V power supply is available at pin 17. Following the diagram you should direct connect pin 17 to pin 35.
With pin 35 now at 24V current can pass through the approx. 2kOhm resistor the 75 Ohm resistor, through the photodiode, through
the second 75 Ohm resistor to pin 37 and thence to the 24V COM at pin 14 via the transistor switch of your BoB or input circuit.
There is a second current path through the 2kOhm parallel resistor as well.

You can test the photodiode by having pins 17 and 35 connected as above. Then with your multimeter in ammeter mode probe
between pin 35 and pin 14. If the photodiode is intact I would expect a current of (24-2)/(2000 +75 +75)=10mA plus another
24/2000=12mA being the current through the 2kOhm parallel resistor, for a total of 22mA. If the photodiode is open circuit
you'll see only 12mA.
########################


Per your sugesstion above, I have used my cheap digital MM to check what I think is mA, on the meter it is marked 200m. this appears to be in the A_--- range. I am not positive about this, but this is the only setting which appears to me mA.

The range specs are here-
Specifications:
DC Current: 200μA/2mA/20mA ±(1.0%+2), 200mA ±(1.5%+2); 10A ±(3%+2)

wioth 17 and 35 connected (24vdc+ is present from drive pin 17) I have tried reading across pins 35 and 14,  and I get nothing until I hit the 200mA range and then the drive clicks, displays the drive model ASDAB2 on the drive screen. The meter appears to read 124 at this time, and as I continue reading it, the number starts dropping at a fairly quick rate. I suspect if I continued holding the meter leads in  place it might take a minute or two for the numbers to hit zero. Just a guess though, I did not test this theory.

by the way, the warning sticker that you referred to was on the drive. It looked important, but wasd not sure in waht way, so I stuck it to the dide of the drive for later use.

This brings me to the question of the resistors. I am not clear on where the resistors are in the real world. are the 2kohm and 75 ohm resistors contained in the asdab2 drive? thats the way the delta schematic and warni ng stiucker look to me, but I am really starting to suspect the resistors NOT contained inside the drive, but rather I must provide and hook them up external to the drive.

I really wish I had not read the CX-X wiring diagrams as having the resistors, diodes and transistors as being contained inside the drive. This is what happens when you have little understanding of electronics. But hey.. gotta learn somehow.


Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 02:05:17 PM
I was using wiring diagram C3/4, and the one you provided is C3/1. Glad to know I was suing the wrong diagram.

Looking at the correct diagram, the one you provided, it aopears that their are 8 resistors, 4 diodes and 2 transistors (if I read schematic correctly) I am thinking that these are not inside the drive. Am I correct in that?

The transistors look to be NPN. if I read the symbol correctly.

The diodes are either line diodes or photodiodes according to the way I interpret the symbols. I am thinking photodiodes as their has been discussion of them and if I have cooked them or not.

The diagram C3/1 also has a dashed (dotted) line around a diode and transistor, shown twice on the diagram, one for each for SIGN and PULSE. what is the meaning of the dashed line? does it denote something obvious to most, but that alludes me due to the fact that I clearly cannot read electronics schematics?



Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 02:24:31 PM
Additionally, if I am reading the symbol correctly inside the box marked controller on the drigram C3/1, it appears to show a transistor. Does not have the circle around it, but thats what the symbol looks like.

I am trying to wrap my mind around the "flow" of the diagram.

Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 02:27:16 PM
Looks like the diagram you created explains SO MUCH. I see how the resistors and transistors are wired now. YAY.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 02:30:34 PM
What value NPN transistor should I select for connection as shown in the hand done diagram you created?
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 05, 2020, 02:59:25 PM
Hi,

Quote
I have tried reading across pins 35 and 14,  and I get nothing until I hit the 200mA range and then the drive clicks

My apologies, I did specify pins 35 and 14, but I meant pins 37 and 14. By using a ammeter from 35 to 14 is effectively shorting the internal power supply
to 0V, please don't do it again. I'm hoping that the reducing current is an overcurrent limit device within the drive.

Follow the circuit of the picture:
pin 17= 24V output to pin 35, through the resistors and photo diode to pin 37, through you ammeter to pin 14 0V return.

Quote
This brings me to the question of the resistors. I am not clear on where the resistors are in the real world. are the 2kohm and 75 ohm resistors contained in the asdab2 drive?

Yes they are. My bum steer (pin 35 rather than pin 37) might lead you to believe they are not in circuit but if you retest but with the correct pin
you will 'see' the resistance. Again my apologies....measure the current between pins 37 an 14 for the direction photodiode and pins 41 and 14 for
the step photodiode.

I would not worry about transistors until you have established that the photodiodes are intact. Any small signal NPN transistor will do,
I used BC547's. Even a small MOSFET like a 2N7000 would work.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 06:48:59 PM
Good News! I think...

I hooked pin 17 to 35. and hooking my black probe up to pin 14, and the red probe (with meter in 200M scale) I get 22.8 from reading pin 14 to 37 and 14 to 41.

If I follow you correctly, I have just confirmed the photo diodes for SIGN and PULSE are operational, by finding 22.8 Mohms resistance across the internal resistors and photo-diodes.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 07:07:31 PM
I am thinking that if I now hook up a 1Kohm resistor to the output of my bobs step and direction pins, and then to pins 37 and 41,  then hook up my BOB's ground to the ASDA drives pin 14, I would have a way to test the drive again under Mach3 control.

Just checked, no dice. Did not see any response from the drive.

Thinking about all you have written and rereading it time and time again (thank you so much btw) I am thinking that if the photo-diodes are still working (believe verified) then possibly its that I am missing the transistors. because the drive does not want 5vdc signal. It wasnts 24vdc, or as close as I can get to that.

Seems to me their are resistors for current limiting to the photo-diodes, and resistors to act as the 'pull up'  then, and transistors are to amplify the 5vdc signal that is input into the ASDA drive. Then the ASDA drive 'sees' thew amplified voltage, if the voltage is in a range that ASDA will accept, then the drive will respond to the imput.

Do I have this somewhat correct?

What is the job of the photo-diodes? I am thinking they provide a means of insuring the pins 37 and 41 are unable to allow any current, signal or voltage from being accidentally output from the drives pins 37 and 41 and thus to the machine controller. I am also thinking that if their were a failure of the drive that could send dangerous voltage through 37 and 41(somehow), that the photo-diodes provide opto-isolation so that nothing can be output past the photo-diodes and out of the drive to the controller thus making things much safer. But hey, these are just my best guesses.

Thanks so so much for your input! I am grateful for your time and effort.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 05, 2020, 07:11:58 PM
Hi,
just to confirm you are using the 200mA scale. The measurement you are taking has nothing to do with resistance, its a measure of
current.

Usually there are three, maybe four input sockets on a multimeter. The Com, is the black one. The V/Ohm red one is to the right.
The two current input terminals are to the left, one (fuse protected) is up to 200mA and the other, depending on the model is not
fuse protected and up to 10A

One multimeter lead should be in the COM socket and the other in the 200mA socket with the selector dial on 200mA DC.

It sounds like you are reading 22.8mA, which is good news as it suggests that the photodiodes are intact.

Just as a comparison please put the multimeter lead from the 200mA socket to the V/Ohm socket and with the dial set to 20kOHM
measure the resistance between pins 35 and 37 with the drive de-powered. I would expect a shade under 2kOhm.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 05, 2020, 07:26:05 PM
Hi,

Quote
Do I have this somewhat correct?

No you don't!. Delta drives are INDUSTRIAL grade, they are intended for 24V inputs, excepting differential modes.....but we are not talking
differential modes here.....we are talking single ended.

Your BoB is 5V output as is common with hobby grade controllers...and a 5V output is not going to work on a drive that is expecting a 24V
input. That is the true purpose of the discrete transistors in the diagram that I posted. The 5V bob output via a 1k (approx.) resistor to the
base of an NPN transistor will be any amount enough current to turn the transistor hard on. The transistor when conducting hard on will
cause the current to flow from pin 37 to pin 14 and thereby illuminate the photodiode.

You need six transistors, say BC 547's and six 1kOhm or 1.5kOhm resistors for a three axis machine. You could alternately use 2N7000 MOSFET's
which would not require the 1kOhm resistor to make it even simpler. I would recommend a little vero-board or similar to solder it together.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 05, 2020, 07:29:47 PM
Hi,

Quote
No you don't!. Delta drives are INDUSTRIAL grade, they are intended for 24V inputs, excepting differential modes.....but we are not talking
differential modes here.....we are talking single ended.

I'm sorry I've just re-read your post and YES you are correct, the transistor I have depicted allows your 5V BoB to turn on and off the 24V
photodiode circuit.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 07:40:19 PM
Checking the Resistance withg the 20Ohm scale on my meter with Com correct and the Red probe connected to the 200mA, when I check resistence I get 1.28

I think this is in line with your prediction of under 2Kom
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 05, 2020, 07:41:42 PM
Hi,
the photodiode is part of the opto-isolator of the pulse input circuit of the drive. When the photodiode is illuminated the phototransistor
is turned on and a pulse is signalled to the drive. Note that it is light signalled, there is no electrical or galvanaic connection to the internals
of the drive. This is to prevent a voltage mismatch at the input damaging the drive logic and microprocessor. That terminals provided
to the photodiode allow for included resistors when using single ended 24V signalling and much lower resistance (50Ohm approx.) when
using 5V differential signalling.

The only downside of having the two options id that you could miswire the inputs and therefore apply 24V to the photodiode WITHOUT the
benefit of the larger (2kOhm) resistors and thereby damage the photodiodes.

Believe it or not single ended signalling is much easier to understand and implement....and you should definitely do that BEFORE you attempt
differential signalling.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 05, 2020, 07:44:21 PM
Hi,

Quote
Checking the Resistance withg the 20Ohm scale on my meter with Com correct and the Red probe connected to the 200mA, when I check resistence I get 1.28

I think this is in line with your prediction of under 2Kom

This does not make sense.

One multimeter lead should be in the COM socket and the other lead in the V/Ohm socket with the dial set to 20 kOhm scale. Please repeat the
measurement and confirm the connections to your meter.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 10:39:17 PM
So, looks like the photodiodes checkout. I have rechecked my multi meter porb connections and made sure its set up to measure current. set to 200m on the dial, With the drive enabled, pin 17 connected to 35, and connecting the black porobe to the pin 14 (common), and the red probe to pins 37 and 41 respectively, I get readings of 22.5mA

Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 10:48:08 PM
I have done as you suggest here-

"Just as a comparison please put the multimeter lead from the 200mA socket to the V/Ohm socket and with the dial set to 20kOHM
measure the resistance between pins 35 and 37 with the drive de-powered. I would expect a shade under 2kOhm."

I using the 20k ohm setting. I get .88 measured between pins 35 and 37.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: natefoerg on February 05, 2020, 11:05:43 PM
Does it appear to you that I have not toasted the photodiodes? given the measurements I have listed above.

My apologies. I think I was mixing up A and O because I was skiping around so much trying to wrap my head around things. thus creating confusion for you that was unnecessary. Rest assured that I am doing my best to not waste your time and am not trying to be lazy and just ask for everything done for me. I am so happy that I am finally learning this stuff. Its been a dream of mine for years to understand things like resistors, diodes, transistors, timers, ics, etc. I only know enpough to be dangerous, but whole heartedly want to get to a place where I am proficient in basic electronics, plc's, servo drives, communication etc. My strongest interest in life is machine tools (particularly Parker Majestic, Moore and Monarch) so understanding the electronics operating everything and how they do it will give me a better understanding of the whole thing. I get the mechanical side of things fairly well. I can correct geometry with scraping and rebuild spindles and such, but have onle ever had a vauge understanding of how 'real' machines work.

Hobby control I am familiar with. Running industrial controlled machines I have done, but knowing how the industrial machines work is a whole other level of understanding I have a strong desire to achieve.



BTW, I was careful not to short out the internal 24dc like I did before. I thought the clicking sounded 're-set-ish' and so I pulled the meter leads after short observation. fortunately the protective circuitry appears to have saved me.

Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 05, 2020, 11:35:45 PM
Hi,

Quote
Does it appear to you that I have not toasted the photodiodes? given the measurements I have listed above.

No, I think they are OK. Delta is a good brand and while its not impossible to blow them up they are well designed
and do not fail as a result of the usual misadventures they suffer.

Quote
BTW, I was careful not to short out the internal 24dc like I did before. I thought the clicking sounded 're-set-ish' and so I pulled the meter leads after short observation. fortunately the protective circuitry appears to have saved me.

I agree, and am glad because it was my mistake the induced you to do it. I think this is a case in point of what I mean above. Delta has made design
provision that the supply could be shorted WITHOUT causing failure where another cheaper brand may not have.

Delta drives are not hugely expensive but I'm sure I don't want to damage mine any more than you wish to damage yours, so it behoves
us to be a little cautious about wiring them up.

I will draw a circuit diagram that may hopefully clear up some of the confusion.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on February 06, 2020, 12:58:03 AM
Hi,
I have drawn a somewhat simplified circuit diagram for one pulse input of your drive.

With reference to the attached diagram:

If you apply +24V at pin35 and 0V at pin 37 current will flow through the 2k parallel resistor R4, and through R3, R1, the photodiode, R2.
Note that the forward bias voltage drop of the photodiode is 2V.
The current is:
I= 24/2000 (through R4) +(24-2)/(2000+75+75) (through the forward biased photodiode)
 =22.3mA

If you powered the photodiode by applying +24V to pin39 and 0V to pin 37 the current would be:
I=(24-2)/(75+75)
=147mA and the photodiode would be destroyed within micro seconds.

If you power the photodiode by applying +5V to pin 39 and 0V to pin 37 the current is:
I=(5-2)/(75+75)
 =20mA which is entirely acceptable.

The termination of pin 39 allows the use of differential signal which can turn the photodiode on and off rather faster
than using 24V at terminal 35.

What must be avoided is the application of greater than 5V between pins 39 and 37 or the photodiode will blow.
My contention is that the first arrangement, namely using the in-built 24V supply at pins 17 and 14, and pins 35 and 37
of the photodiode input circuit is easier and more forgiving than differential signalling and even 200k pulses per second is
still very fast indeed.

Maybe at a later date you will want to try differential signalling, if you are demanding even faster axis speeds and/or higher resolution,
but for now stick with single ended signalling.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: machiavellian on January 22, 2021, 08:01:22 PM
Hi Craig,

Sorry to wake this sleeping thread.  It's just that reading thru this, I'm rather confused.  This stuff is out of my pay grade!  You've been so patient with @natefoerg, I'm hoping you or someone else can help me out while setting the record straight so folks like me in the future can 'skip to the end' and get the answers they need without wading thru pages of confusing detail.

I'm also trying to figure out how to hook up my CNCdrive AXBB-E to Delta ASDA-B2 servos as well.  So far I have the the ASDA's PULSE & DIRECTION input signals working by connecting them to AXBB-E's unbuffered outputs O9+ & O10+, O9- & O10- to 5V0 and it seems to work.  Is this correct so far?

Now I'm trying to get the AXBB to monitor the ALRM signal from DO5+ & DO5- (while trying to avoid frying anything) and have a few  questions:

1. Can I simply do the same as the pulse/direction controller output signals above, tie DO5- & I2- to 5V0 and DO5+ to I2+?  This is an isolated input on the AXBB, is +5VDC enough to trigger the input on isolated inputs?  Or should I get a AXBB breakout board and use an unisolated input?  Or should I be somehow using the 24V rail.  I hesitate doing this without clearly understanding doing this for obvious reasons.

2. Without going into the history of this machine (from China, its not short or pretty) it appears that the vendor was trying to wire servo ALRM outputs to the Estop CNC controller (it was a XHC MKX) input.  And the 24V estop button. :( Neither the estop nor servo alarms ever worked properly.  Question is, is it OK to gang all these outputs into one input on the controller like they did?  Or do they have to all go to separate inputs and use a brain to OR them together into an ESTOP signal of some kind?

3  Seeing as these servo driver outputs were apparently apparently subjected to 24 volts, can you summarize how to check inputs & outputs using a multimeter?  Again I'm confused by the detail above, all this wiring up transistors, etc, is it really necessary?

4. This is all the user should have to do to get safe & correct function, right?  Three pairs of wires, no commons.  Two pairs for step & direction.  One pair for monitoring alarms.  Am I missing anything?

Thanks in advance.  :)
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on January 22, 2021, 09:05:48 PM
Hi,
I think you'll need a few more wires that that.

I'm wiring up my servos at the moment and in order to get the pulse rate I want I need to use differential signalling for
step and direction, ie a pair of wires for each.

I want one (for the moment, may have more monitors in the future) alarm per servo. Each drive needs an Enable signal and each drive needs
an AlarmReset signal and each drive needs a COM- that can be tied to the 0V of the BoB/controller.

Step = 2 wires
Direction= 2 wires
Alarm = 1 wire
Enable = 1 wire
Reset = 1 wire
Com- =1 wire
Total= 8 wires

On page 3-32 of the Delta manual I'm using circuit diagram C9. So the internal (to the drive) 24V supply (pin 17 CN1) is connected to COM+ (pin11 CN1)
with a short piece of wire within the plug. The digital inputs to the drive called SON (servo on) and ARST (alarm reset) are pins 9 and 33 CN1 per the default pinout
of CN1 page 3-22.

Note that the voltage on those lines is capable of 24V so cannot in any circumstance be connected to a 5V output on your BoB/controller. I got around this
by using a small NPN transistor as a level translator for each line, per the attached circuit diagram. The 5V output of my BoB turns on the transistor and the transistor
shorts to COM- the 24V via the optocoupler photodiode in the drive thereby forming an active low signal to the drive.

The default alarm output (DO) of the drive are pins 28 and 27 per page 3-21. I am using a variant of circuit diagram C5 on page 3-31.
DO5- (pin27 CN1) is connected with a short piece of wire within the plug to COM- (pin14 CN1). The Alarm output is pin 28 CN1 and it will short to COM-
any voltage on that line. Note DO NOT DIRECT CONNECT that line to any power supply or you will overcurrent and blow the transistor in the drive. The voltage
on the line MUST be supplied via a current limiting resistance. I would suggest 4k7 Ohm for 5V and 27k Ohm for 24V.

Craig
 
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: machiavellian on January 23, 2021, 04:10:04 AM
Thanks for the timely and detailed response, Craig.  I'm happy to have found someone with a far deeper knowledge than mine who's willing to help.

First, we seem to be out of sync on page numbers.  I'm looking at this, which is the Delta ASDA-B2 user manual I'm using where details on CN1 begins: https://www.deltaacdrives.com/Delta-ASDA-B2-User-Manual.pdf#page=56  Am I looking at the right manual?

Regarding stepper signaling:

So if I understand correctly, you're aiming to use HPULSE+- instead of PULSE+-?  What are you setting in the servo's parameter P1-00?

On whether to use PULSE or HPULSE, on one hand I definitely like the idea of a higher pulse rate (faster, smoother moves).  On the other hand, I was getting along OK with a 500K pulse rate and I kind of fear potentially up to 8x faster moves.  To implement HPULSE I assume you've got a breadboard setup with transistor & resistor circuits wired up for each servo?  That seems doable, but breadboarding raw components is a little out of my depth and  downtime is killing me.  I really need to get this machine running so I can get on with my project before my wife files for divorce.  No, seriously, since I have the servos stepping what looks to be correctly on PULSE with non-isolated +5V outputs, are you just recommending an ideal config or am I doing something seriously wrong?

Alternatively (or I'm totally missing the point, it happens quite often) could I drive the servo's HPULSE input with the AXBB's isolated outputs (O1-O8) and bypass the breadboarding?  They can do 24V 500mA output.  Can you help clarify TTL (5V) vs. 24V signaling?  I think this is the sources of my confusion.

Regarding connecting CN1-11 to CN1-17, I think I get it, you're putting the servo into source mode [bottom of pg 3-21 (my link above)] that's what's putting you on +24V signaling.  But SON & ARST, on my machine nothing is connected and it works(?)  Is this overridden somehow in the parameters?  I've taken a look at params and don't see anything jumping out at me.  My cables only have 6 wires (see attached image), 2 for pulse, 2 for direction, and 2 for alarm.

Finally, about DO5 alarm output, I think I understand what you're saying, but it appears to be a powered output so why not just wire DOX- (pin 27) to, say I1- and DOX+ (pin 28) to I1+ and keep it fully isolated?

Thanks for your patience, I really appreciate it, Craig.  After staring at the manual for about five hours straight now it's starting to make a little sense.

FYI, just a little background for context, this machine had a bad crash for no apparent reason a few months ago and I've been trying to get it back into operation ever since.  Had to replace the spindle (bent, too much runout) & z-axis ballscrew.  I suspect line power fluctuation - I was running a heavy roughing operation but within parameters that ran fine before - 6061-T6,  1/2" roughing mill, .2 RDOC, .5 ADOC, 20K RPM, forget exact chipload but it was reasonable, maybe .002".  My theory is a servo alarmed, but the servos being improperly connected to the cnc controller by the manufacturer caused it to continue feed instead of estop retracting and this greatly compounded the problem.  So sorry if I'm more than a little paranoid here.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: machiavellian on January 23, 2021, 04:11:45 AM
Uh sorry for that giant image, should have downscaled it.  Apparently no way to remove it on edit(?)
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: Tweakie.CNC on January 23, 2021, 04:29:28 AM
Uh sorry for that giant image, should have downscaled it.  Apparently no way to remove it on edit(?)

Resized it for you   ;)

Tweakie.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on January 23, 2021, 03:18:28 PM
Hi,
you are correct the manual I'm using has slightly different page numbers.

I'm using the line driver input pairs (37,39 and 41,43) but NOT the HighSpeed inputs (36,38 and 40,42).
The line driver inputs allow 500kHz signaling and yet I require 417kHz for my machine, so the 'plain' line driver inputs
are sufficient.

I have made circuit boards to interface between my BoB and the servo drives. I'll post a picture at a later date, I'm at home now and my machine
(under construction) is at work.

The wiring of CN1-11 and CN1-17 becomes clear in circuit diagram C9 on page 3-33. VDD (pin 17) is hooked to COM+ (pin 11) by a jumper in the plug.
All the digital inputs (DI's) become active low, per the example depicted in C9. In that particular case SON (servo on) is the DI depicted and if
pin 9 is pulled low (that is to COM-) then the servo is turned on. I'm using a transistor in my adaptor board to pull the input low.
Note that once you have wired pins 11 and 17 like this ALL DI's assume the same character. Thus the alarm reset signal, ARST, needs to be pulled
low, hence another transistor.

The two inputs, SON and ARST, in effect require three wires, one for each input, but also the COM- which establishes the 0V of the BoB/adaptor board
as the same potential as COM-.

Quote
But SON & ARST, on my machine nothing is connected and it works(?)

Yes, you can either hardwire SON to be permanently on, or program it to be permanently on, OR have a signal to it.....which is what I have done.
Its the norm in industrial practice to have a enable signal to each servo, and I have followed that practice, but its not strictly required.
If the servo never faults then you don't ever need to reset it and therefore ARST is not required. If the servo does fault and you need to reset it
in absence of a ARST signal you'll have to de-power then re-power the servo. I have elected to have a dedicated signal. On my Mach4 screen
I will have three LEDs indicating the fault status of each servo and a button to reset all of them.

Note that my controller has only one SON output and that enables ALL three servos. Also my controller has only one ARST signal an I'm applying
that to ALL three servos.

Each servo has its own fault signal however. If a servo faults I want to know which axis faulted, therefore combining all the fault signals together
would thwart that.

As far as the DO signal outputs. I have elected to wire CN1-27 to COM- CN1-14 and have just on wire attached to CN1-28 travelling back to my adaptor/BoB/
controller combination. You could as you say have two wires and therefore the transistor in the drive is isolated....but why? The transistor has
NO current limiting whether its isolated or not so the precaution about supplying external current limiting applies in either case. I elected a wiring scheme
that requires just one wire in the control cable rather than two, but that just a matter of preference. My scheme means that the DO is active low
which is symmetrical and 'philosophically' identical to my DIs, which is again my preference or 'style' if you will, rather than essential.

Quote
I was running a heavy roughing operation but within parameters that ran fine before - 6061-T6,  1/2" roughing mill, .2 RDOC, .5 ADOC, 20K RPM, forget exact chipload but it was reasonable, maybe .002".  My theory is a servo alarmed, but the servos being improperly connected to the cnc controller by the manufacturer caused it to continue feed instead of estop retracting and this greatly compounded the problem.  So sorry if I'm more than a little paranoid here.

A couple of things to consider here:
1) Limits. As you know the limits can be direct connected to the drive, and the drive is smart enough to stop but also prevent you from jogging even further
out of bounds to get the axis back. The drive could, if you program it, report the limit fault back to Mach and Mach could stop the other servos.
The other alternative, which seems simpler to me, and certainly more 'philosophically' familiar to me, is have the limit switches connected to Mach via the
BoB per normal and allow Mach to EStop all the servos.
2) Estop. You may have noticed there is a programmable DI called EMGS (CN1-30 by default) that if asserted will emergency stop the servo. You could wire your
machine such that if one EMGS is asserted it would stop ALL servos. I have not done so, for any particular reason, I'm quite happy with Machs EStop
arrangement as is. All my limit switches, the EStop panic button, the three servo alarm signals can individually set an EStop and the whole machine stops.

With regards the crash you had.....how have you setup the 'Following Error Window'?

A servo has a number of conditions where it faults, over-voltage, over-current and over-heat are usually immediate EStop conditions....but there are others
which are not immediate. Following Error is one.  You can program the drive to fault if the actual servo position deviates from its commanded
position by a certain amount, called Following Error. If the actual position deviates from commanded position then you will at least have an inaccurate
part but worse may be that one axis lags the other two and you end up with a crash.

When the drive comes from the factory the Following Error parameter is set very wide so that when you are tuning and setting up you do not get whole
bunch of nuisance trips. It is intended that you will narrow the window when you have tuned up. Have you done so? What may happen is that an axis
can lag 1/2 a revolution or so BEFORE an alarm condition is generated, but 1/2 a revolution could also mean CRASH.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: machiavellian on January 24, 2021, 05:27:24 PM
Thanks, Craig, it's all becoming a lot clearer.

I think (with your generous help) I have most issues sorted out.  So rather than going TLDR about that, I'm going to move on.  Just a few things - after more circuit tracing I discovered the manufacturer had connected the emergency stop button using it's 'NO' switches, not 'NC' as is correct practice.  I had just assumed it was correct.  I should have checked the switch operation first off, it would have made so things so much easier.

First new question, is it acceptable to tie all the ALRM outputs (DO5+ & DO5-) from all the servos together as was the machine wired by the manufacturer?  I can't seem to find anything in the manual on this.  (only stuff on cascading inputs not outputs)  I.e. these are active-low outputs, so if, say two are high and one low, will the signal go low?  Or will current flow from the high outputs across drivers as I expect and keep the output high?  I'd like to logically 'OR' these inputs together if possible, I don't have enough inputs on the controller to hook them all up separately along with zero switches, etc.  The manufacturer also had the emergency stop button tied in as well, and this common circuit was all hooked to estop.  Is this acceptable (if maybe not recommended)?  I think the root cause of my estop failure was the 'NO' estop button was causing many if not all the problems.  I'm kind of hesitant to just wire them back together and try now that it looks like I'm on course to getting things working & no fried electronics so far.

Related to this, is there any value to trigger a emergency stop on WARN signal instead of ALRM?  Reading the manual this signals first; I'd like to abort on the first sign of trouble.

For my usage I prefer to have any alarm or estop to just emergency stop the machine.  If this happens I can note any alarm codes, etc, and restart the machine since the job is likely botched or will need some level of manual intervention.  Just looking for shortest path to accomplish that.

Or perhaps separate inputs into three:  WARN, ALRM, ESTOP?  I think I can just afford three inputs on the AXBB controller.  That would keep stop options more flexible.

Regarding HPULSE, just curious, this seems superior to standard PULSE control.  Have you considered using HPULSE?  If you rejected it, can you share why?  I'd think with your advanced usage you would have opted for that.

About the crash, unfortunately I was a little shocked when it happened (it was a pretty loud bang) and I shut off the machine before noting alarm codes.  I recall the servo brakes let go and I could manually rotate them by hand which was unusual.  Several servos were in alarm condition before I powered the machine off.  Hmm, I think the controllers do keep an alarm history, I need to go back and search for alarms that might trace back to the crash...

On tuning (and troubleshooting) and this Following Error, I'll try to understand it better going forward.  The manufacturer had represented the machine as being well-suited & tuned for roughing 6061-T6.  However from what I can tell the servos had no real tuning done to them - comparing their settings to defaults only a few of the most basic parameters were changed.

Now that I'm basically re-engineering the machine I guess I need to take full responsibility for monitoring & tuning.  Thanks for bringing this up.  If you have any recommendations or suggestions for places to read up, watch videos, etc I'm keenly interested in learning more.

One of the things that both impressed and kind of disappointed me watching these servos in operation; even when running challenging jobs the motors never even get warm.  The electronics bay does get to maybe 90F, but nothing gets hot.  I was wondering if the hardware was anywhere near capacity.  Even as it is though, I'm really impressed at these servos - they're as strong, smooth & reliable as I could ever hope for.  Especially for their price, they can be had on Alibaba for really for cheap considering.

Thinking about it, going forward I probably need to dedicate some time to optimizing both G0 air-moves (where the driver automatic self-tuning might work well once I have limit switches correctly hooked up) and G1 material-specific optimization.  Or at least learning to monitor how close to or far from limits I'm pushing these servos (and the spindle) when running jobs.

Any knowlege you or others have to share on these monitoring & tuning topics, I'm sure would be welcome by more than folks just me.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on January 24, 2021, 07:48:40 PM
Hi,

Quote
First new question, is it acceptable to tie all the ALRM outputs (DO5+ & DO5-) from all the servos together as was the machine wired by the manufacturer?  I can't seem to find anything in the manual on this.  (only stuff on cascading inputs not outputs)  I.e. these are active-low outputs, so if, say two are high and one low, will the signal go low?

Yes, I think that would be permissible. I would however put a 50-100 Ohm resistor in series with each so that one sinking output does not current hog as is common
with BJTs. And.....Yes....if one (or more)  output goes low the signal will go low, and that constitutes a wired OR function.

I see no advantage in using WARN in preference to ALRM. In my previous post I explained that I was happy with what Mach4 does already so I'm not using the
Delta supplied EMGS DI at all, if Mach EStops then all step signals cease and therefore all servos stop. There may be subtle differences between EMGS and a Mach wide
EStop, things like is the servo still on, ie the state of SON but otherwise I'm happy with how Mach does it so I see no need to use the broadly equivalent Delta supplied
functions.

Note that if you use my suggestion and wire CN1-27 to COM- and one wire from CN1-28 (per servo) then all those wires can be combined (preferably with a 50-100 ohm resistor)
as wired OR, thus all your servo alarms  behave as one alarm.

I believe HPULSE is largely a PC to servo drive signalling mechanism, capable of MHz as opposed to plain line driving of 500kHz.

The B2 series has a 160,000 count per rev encoder, and with careful use of electronic gearing I have a solution that delivers 1um resolution (linear equivalent) and still allows
me to drive the servos to 5000rpm at 417kHz pulse rate. I do not need HPULSE so I didn't bother with it. If you had an A2 series or later with an 20 bit encoder, 1,280,000
count per rev, and you want even finer resolution than I require the HPLUSE would be the only viable signalling solution.

I have not experimented with it but I would suggest to you that signalling using HPULSE at low MHz rates, which is radio frequency, in a noise prone environment
is not likely to be easy. As it is, I was doing this over the Christmas break and I had no access to parts beyond what I had in stock. Thus I used what I had,
a dozen 300Mhz UnityGainBandwidth opamps, and made my own line drivers with them. As it turns out I can get my home brew line drivers to run at 3.5MHz driving
a 270pF line capacitance....so way WAY better than I need. I have experimented with my home brew line drivers and they work perfectly, I really see no need to invest
yet more time, energy and materials into an HPULSE signalling solution.....which will not yield any real benefits when using my mill. After all I want my mill to make chips....
not fly to the moon.

The short answer to your question is I did not use HPLUSE signalling because I did not need it and I suspect would take quite a bit of messing around to signal reliably
anyway.

Unless the load-to-motor inertia ratio is over 10-15 then self tuning should work fine. I have not experimented with my machine (still under construction) to even
know whether I could benefit from the notch filters for instance. Following error is not so much a tuning item as a machine accuracy parameter, and Delta can't set
that for you....you have to understand what it is and set it yourself to suit your machine.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on January 24, 2021, 07:57:56 PM
Hi,
the FollowingError is called 'Excessive Error Warning Condition' in the Delta manual and is parameter P2-35.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on January 24, 2021, 07:59:28 PM
Hi,
and note the default setting of P2-35 is 480,000 encoder counts, that's three revolutions!!!!

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on January 24, 2021, 08:32:23 PM
Hi,
my servos are direct connected to 5mm pitch ballscrews, so if I leave the Excessive Error Warning Condition at its default of 480,000 counts or three
revolutions that is a linear equivalent of 15mm.

So the axis could lag by 15mm BEFORE the alarm was asserted. That's way WAY too much, I would expect my machine to fault 'Following Error'
at no more than 15um....not 15mm!

So I'm going to set my Excessive Error Warning Condition parameter to 480,000 / 1000 =480 counts. If that works OK and I don't get any/many
faults I'll try narrowing the window some more.

Just goes to show that you cannot leave this parameter at default......it will most likely be wildly different to what you actually require in practice.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: machiavellian on January 24, 2021, 09:51:55 PM
Interesting.  For my purposes I don't think Excessive Error is an issue, at least as far as accuracy is concerned.  The machine is under high load (I assume inducing Excessive Error?) when roughing but I usually keep 0.05" off the part surface for this pass, then do a 2nd semi-rough to .02", then go to a surfacing technique to +0 using usually one pass.  Point being, the machine (servo error + frame spring) isn't under much load in the final passes when accuracy matters.  I do increase feed / reduce rpm to keep chipload up on final passes, but the apparent machine load is still relatively low.  A good thing to keep an eye on though, definitely.

In my (limited) experience his usually gets me to +/-0.0025" on flat surfaces but I'm getting tessellation artifacts on curves.  When I try to combat them by tightening my CAM tolerance it results in machine hitching, another thing I'm trying to combat by using a new controller.  I'm aiming to get tolerance to .001.  Not sure if it's lookahead controller CPU or link bandwidth bottleneck, but I guess that's a topic for a different thread.

Are you using the Delta ASDA software's 'scopes' functions for monitoring & tuning?  I still have a lot to learn about this.  Thinking of buying a cable for each driver so I can just monitor them all realtime, at least while tuning.

Anyway, like I said, my primary goal is to avoid repeating a crash situation where a servo alarms, releases the brake & shuts down, allowing the bit to get traction and suddenly rapidly feed into the material and the kinetic energy had nowhere to go, which I'm pretty sure is what happened.  LSTP (P1-32) was set to 00 on the servos which should have hit the servo brakes on alarm but this didn't happen for some reason, the servos were free to spin post-crash.  I can't explain this.  Do you have any ideas what might have happened?

Looking at the fault records (P4-01 thru P4-04), I see repeating fault codes 0003 (undervoltage), 0022 (input power phase loss).  Since all drivers are seeing the same errors, I surmise these are power on/off errors and can be safely ignored. (??)  Unfortunately any interesting fault codes from the crash have scrolled out of history and are lost.

Ok, I ordered a 1/2 watt resistor assortment pack, will probably just inline them on the cable.  Or at least take a look at current hogging current flow using a resistor as a temporary shunt.

Thanks again for the valuable advice, Craig.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: machiavellian on January 24, 2021, 09:54:37 PM
So I'm going to set my Excessive Error Warning Condition parameter

FYI I was just looking at the ASDA software's scopes capabilities and it looks like you can monitor Position Error (PUU).
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on January 24, 2021, 11:47:40 PM
Hi,

Quote
Interesting.  For my purposes I don't think Excessive Error is an issue, at least as far as accuracy is concerned.

How can you possibly say that? If the Excessive Error Warning is set too high then the servo will lag a considerable distance
WITHOUT faulting. You must know and control that parameter, it is the most significant performance parameter of the whole
lot.

Excessive Error Warning Condition = Following Error.

If you nominate Excessive Error Warning Condition to be 100 then if the servo lags from its commanded position by 100/160,000 x360=0.225 degrees
or 13.5 arc min then the alarm is activated and your machine will shut down.

As an example: my machine has direct coupled 5mm ballscrews so the linear error of  100/160,000 x 5 =3.125um will cause the 0009 alarm to go off.

Having said that the fault record suggests that you are losing your  power supply, that's what fault codes 0003 and 0022 indicate.
How have you wired the input power......could excessive current be causing the power supply to 'brown out'?

I haven't used the oscilloscope function but I think you be expecting more that it can deliver. If my understanding is correct the scope can and indeed does monitor and
display following error but with a given range of input signals, steps, ramps etc. It does not follow general signals that you would encounter in a tool path or if it does
can display a few milliseconds worth at best.

Quote
Thinking of buying a cable for each driver so I can just monitor them all realtime, at least while tuning.

I don't think thats quite going to work. The data link is so slow that you cannot really hope to have a realtime scope. Its more for seeing how a servo responds to a test
signal, like a step change in position. Very useful for tuning parameters to adjust overshoot, oscillation and speed of response etc.

I have a data cable that allows me to program the drives. Do you not have one? I consider  it essential, trying to program a drive by pushing buttons like a microwave
is a nightmare and error prone. If you don't have a programming cable.....do yourself a favor and get one.

Quote
Ok, I ordered a 1/2 watt resistor assortment pack, will probably just inline them on the cable.  Or at least take a look at current hogging current flow using a resistor as a temporary shunt.

Just put the resistor inline in each of them, don't try any parallel resistances.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: machiavellian on January 25, 2021, 04:12:09 AM
Sorry, it's late and I have to be at work tomorrow at 8AM so I have to be brief.

On Excessive Error, perhaps I'm misunderstanding or over-simplifying things.  My understanding comes from a background in Kalman Filters as implemented for stabilization & navigation in drones.  (My background these days involves a lot of drones, my home project is focused on building parts for really large drone prototypes)  I interpreted Excessive Error as being the delta between current state & desired state.  Why else would the default be so high?  My assumption is/was that if the driver is behind in steps, this is not a good thing but probably not fatal as long as it doesn't overcompensate in increasing feed rate in an attempt to catch up.  My guess (?) is that this might result in a stop short of the final desired move but little more.  And Excessive Error would primarily occur under high-load scenarios like roughing that would be compensated for in later passes.  Isn't this 'undershooting' is one of the things the 2nd rough pass targets before moving to finishing tools for a final pass?

You might be right about power supply.  My home machine is powered by residential single-phase 240AC wired directly the the main breaker panel.  I don't recall the gauge the electrician pulled, but it was overkill for 15/20A service.  I don't think I can improve the power situation for the machine.

My point on the scopes, I'm interested in getting a feel for the orders of magnitude for various dynamic parameters & perhaps some logging, not trying to react in realtime or anything like that.  For example, watching this Position Error as the machine is roughing.  But again I'm the n00b here, haven't even tried it yet.  I'd just like to get my material removal rates as high as I safely can, this seems to be a good way to get a feel for things besides just listening for spindle bogging.  The parts I run are big, roughly star-shaped so are problematic, they need a lot of material removed.  Even with aggressive params a part takes about 90 minutes per setup and there are two setups per part.  and I need to make a lot of these parts.

Yes, I have a cable...  Its been a long day I may be missing your points yet again, sorry if thats the case.  Thanks for the feedback will update this might take a day or two.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on January 25, 2021, 05:18:17 AM
Hi,

Quote
I interpreted Excessive Error as being the delta between current state & desired state.  Why else would the default be so high?  My assumption is/was that if the driver is behind in steps, this is not a good thing but probably not fatal as long as it doesn't overcompensate in increasing feed rate in an attempt to catch up

That understanding is close. The servo drive enacts a closed loop trying to reduce the delta between the actual position and the commanded position.
If the servo is lagging the control loop will increase the drive current in order to catch up, if its leading the command the control loop will reduce or even
reverse the current to reduce the error. The position closed loop bandwidth is of the order of 500Hz and so the servo follows the commanded path with
plenty of'get up and go' and very quickly. This correction happens in milliseconds.

Ideally the servo would follow the commanded position exactly but inevitably it will lag a little behind. The Following Error Window, or Excessive Error Condition
as Delta call it, is the limit on the error before we decide that the machine has failed to follow the toolpath and the machine must EStop.

You may recall that when we used open loop steppers that if a stepper lost a step, or several, the machine would carry on assuming that the stepper was
following the correct toolpath despite the fact that it  is not, by virtue of those lost steps. We always wished that Mach would stop so we could correct
the lost steps rather than carry on making a bad part.  This is the meaning of Following Error....it allows us to program the 'number of steps gained/lost
before Mach Estops'

So to make accurate parts we want the Following Error Window to be a small as possible, and could therefore be assured that the machine is very closely following
the commanded path. If we make the window too small, then the servo will frequently slip just outside of the Following Error Window and fault out.
In order to have the servo follow a toolpath we wish that it have high acceleration, which is synonymous with torque, which is synonymous with current.
We also want the servos to rotate at high speed so that it may track a rapidly moving toolpath and speed in synonymous with applied voltage, given
that the applied voltage must overcome the back EMF.

A good means of measuring how hard a servo is working is to monitor its current. If the current is high its because its trying to accelerate to catch up.
A good means of measuring a servos speed is to monitor its applied voltage. Fortunately Delta has provided the means to monitor those
quantities as an analogue voltage. Thus you could have two meters which would monitor current and voltage in real time without a scope.
Would that be adequate?

The problem about trying to minimize cycle time is as much about good CAM and speeds and feeds as about servos. The idea is that you run the toolpath
but slowly increasing the feedrate (with the override) until the spindle is at some comfortable level short of max current. Having a toolpath that does not have
occasional short bursts of extremely heavy cutting is essential here, otherwise a heavy cutting event will occur on top of a high continuous load and the
spindle will overload and stall. You have to have good Gcode to do it.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: machiavellian on January 25, 2021, 05:12:13 PM
Only have a few minutes but on my lunch I tried ganging the ALRM outputs on DO5 from the drivers together and they appear to be ANDing the output, not ORing them like I need.

I called the Delta technical support number (great idea suggested by a colleague!) and spoke with an excellent engineer about the question of whether this is valid and if not what to do about getting all DO's into a single PLC input.

The short version of the discussion is he suggested trying flipping the signaling to normally low (alarm pulls high), this should get the OR effect I'm looking for.  But he's going to get back to me with the 'official' (supported) way to accomplish this.  I'm going to try to get out in the garage-shop late tonight after work and give it a try.  Will post back if/when that happens & what Delta says.
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: joeaverage on January 25, 2021, 06:17:27 PM
Hi,

Quote
I tried ganging the ALRM outputs on DO5 from the drivers together and they appear to be ANDing the output, not ORing them like I need.

By ganging them together as I have suggested the ALRM signal is ACTIVE LOW. Thus with all alarms off the pull up resistor on the ganged terminal will
be high, whenever an ALRM goes low then the ganged signal will also go low.

Craig
Title: Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
Post by: machiavellian on January 31, 2021, 08:54:55 PM
Sorry about the delay.  Been a busy week.

FYI the recommendation from Delta Electronics is to wire the alarms together in series, just like you would fail-safe NC switches like home switches, etc.  In hindsight it's obvious (at least to me) this the correct circuit improvement, I should have seen this but got caught up in powering the circuit, etc.  I tested it, it works fine.  No parameter default overrides, nothing exotic required.

For those looking for the short answer on how to hook up servo alarms:  Just hook the alarms all in series, power with +24V, hook to an input and trigger active-low.

I've kind of come full-circle here, am back to considering adding the estop button to the circuit and calling that estop so the machine just retracts & stops on an alarm, no plugins, no brains, it just works.  On the other hand, it would be nice to somehow differentiate alarm vs. estop somehow so the (semi-intelligent) operator (me) doesn't just override an estop by hitting start twice.  Like I have in the past...

Craig, your thoughts?