Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: joeaverage on May 05, 2018, 07:44:44 PM

Title: Out-Of-Band Axes in Hobby vs Indusrial
Post by: joeaverage on May 05, 2018, 07:44:44 PM
Hi All,
in Mach4Hobby we are limited to one out-of-band axis and that axis is always the spindle. As such there is good control over it via the API but not indexing. That is to say that the spindle
is meant to be free running and cannot without some work-around be stopped at some precice location/angle.

If I understand Mach4Industrial allows all six out-of-band axes. Does anyone know what control mechanisms exist for those axes? I imagine for instance it would be highly desired that there
could be more than on free running spindle for multispindle machines. I imagine also that position/index control would be available. I'm thinking that such a feature would be required of a 'tombstone'
type workpeice which required indexable movement in order that multiple parts could be made from the one tombstone as an example.

The workaround I have used with Mach4Hobby is to programmatically reassign my spindle as a rotational axis, C say, then call a C axis move to the required index. Provided no other axes are called
on the same line of Gcode then it could be considered that the C axis moved independently of all other axes ie a quasi 'out-of-band' axis.

I must say that until I understood the implication of the restriction to one out-of-band axis and that its always a spindle as applies to Mach4Hobby I would have said there is nothing about
Mach4Industrial that I'd miss. I'm now thinking that I miss not having indexable out-of-band axes, even one would be good.

Notwithstanding Chads use of MacroB and the glowing report he makes of it, it is not a feature that I require at this time, but would like at least one indexable out-of-band axis.

Craig
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: dude1 on May 06, 2018, 02:54:59 AM
There are some MacroB Mach can use that if you knew what they where you would miss them, manly for production stuff checking tools, setting tool heights, offsets so on the fluffy stuff fanuc and renshaw use's.
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: Cbyrdtopper on May 07, 2018, 08:13:23 AM
Craig,
 
Is the out-of-band on hobby always the spindle?  I was kind of hoping I could use a separate axis out-of-band.

We are currently working on retrofitting a Milltronics with a SMTC; originally it had a servo to rotate the tool magazine, so we put a servo back on it. 

I was going to ask before long how you moved an out of band axis, for us, to pre load the tool changer, seperate while g code is running.  What did you plan on using an out-of-band axis for?
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: joeaverage on May 07, 2018, 02:24:27 PM
Hi,
trying to remember where I read it but yes in Mach4Hobby you have only one out-of-band axis and it is always the spindle.

Craig
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: Cbyrdtopper on May 07, 2018, 02:50:57 PM
Well that's a bummer.  I guess I'll have to get the industrial license so I can have the Tool Magazine pre load while running g code.  Any Idea how to make it do such a thing?  

I made a macro using "T" once before per Steve's input.  It works great, but it is running off of a DC Gear Motor via Outputs and not an Axis.

I plan on being able to rotate the magazine through the PLC we are adding to this mill, it will be easy enough to keep track of positions between Mach and my PLC respectively, but being able to rotate the axis ANY time I want will pose to be a nice puzzle.

Any thoughts?
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: joeaverage on May 07, 2018, 02:55:57 PM
Hi,
no not really. That's why I was asking about how you'd go about getting motion from those other out-of-band axes. I was hoping that someone who had Industrial
could shed some light on it. I downloaded Industrial Demo but saw nothing to indicate how all the out-of-band axes work.

Craig
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: Cbyrdtopper on May 07, 2018, 03:03:02 PM
Yeah, the industrial version we are using doesn't have need for out-of-band.  And, like you, I have found nothing indicating how to add motion to an out of band axis.

I'm currently finalizing the wiring on our electrical panel and then putting it back in the cabinet on our machine.  I hope by the end of the month we will have some motion on the

machine, pending time putting out fires here at the shop.  Once it is moving I can test the out-of-band axis.  Just have to figure out where to start haha.
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: Cbyrdtopper on May 10, 2018, 10:21:32 AM
Craig,
I was really hoping Steve would chime in and let us know how this works haha.  ;)
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: smurph on May 10, 2018, 12:07:11 PM
Out of band axes are for controlling things like chip conveyors, stock feeders, carousel motors, etc...  They are not coordinated motion axes but instead are totally independent of other axes.  OOB axes use the scripting jog methods for motion and they can be homed.  So one can use incremental or absolute jogging for precise positioning.  Or velocity based jogs as a percentage of max velocity or feed per minute.  No G code will ever move one of these axes in coordination with any other axis.  Meaning that no axis letter can be assigned to them.

Contrary to the feature matrix on the website, the Hobby version has all 6 OOB axes available.  It was Mach4 Lite that was limited to only one OOB axis.  Obviously, one would need a motion controller that could control at least 12 motors to take advantage of every coordinated and OOB axis.  So...  you quickly get out of hobby territory, price wise. 

Not all motion controllers support these OOB axes.  So check with the controller vendor first. 

Steve
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: Cbyrdtopper on May 10, 2018, 12:14:39 PM
Awesome!  I'll check to make sure that HiCON Can use the OOB Axis, it controls 6 axis.

I plan on using an OOB Axis for a SMTC carousel and I would like to rotate it freely with the Click PLC as well as in Mach.

I'm thinking about having the Axis be based on a register value and letting the PLC Script move the axis based on what that value is.   I can manipulate the register easily enough from Mach or the Click.

Does that sound plausible?
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: smurph on May 10, 2018, 01:03:32 PM
Yes.  As long as you keep things from getting split brained. 

Steve
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: garyhlucas on May 10, 2018, 01:33:23 PM
Awesome!  I'll check to make sure that HiCON Can use the OOB Axis, it controls 6 axis.

I plan on using an OOB Axis for a SMTC carousel and I would like to rotate it freely with the Click PLC as well as in Mach.

I'm thinking about having the Axis be based on a register value and letting the PLC Script move the axis based on what that value is.   I can manipulate the register easily enough from Mach or the Click.

Does that sound plausible?

Have you used a Click PLC before? I have used one twice and I am really underwhelmed. The very limited functions wound up costing far more money for programming than the cost savings on the hardware. On the other hand we are thrilled with the Domore BRX PLCs from AD. Ethernet, analog, modbus, highspeed I/O with motion commands, free programming software, autotune PID, modularity, a low price. What’s not to love?
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: Cbyrdtopper on May 10, 2018, 02:13:10 PM
Yes.  As long as you keep things from getting split brained. 

Steve

What do you mean split brained?

Garyhlucas,
I have used both the Click and the BRX.  Here are my thoughts, for what its worth.
The BRX is extremely powerful and the cost can't be beat for what you get.  So many features and easy to use software. 
The Click is an unbeatable cost for function, IMHO, and is powerful enough to use.

I like the Click matched with Mach4 because it is easy to interface the TCP Modbus.  And the most difficult thing I control is the Tool Change with the PLC and that's easy to program. 
Also, since I don't connect machines to any outside network, I don't have to set up each modbus contact.  I just start my Modbus range with the Modbus address on the click and I don't have to configure anything else.
I use the Click because it does what I need and doesn't have the extra bells and whistles sitting there looking pretty because I don't use them. 

But again, the BRX is an awesome little PLC! 

Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: joeaverage on May 10, 2018, 07:27:20 PM
Hi,
Quote
Contrary to the feature matrix on the website, the Hobby version has all 6 OOB axes available.
Kool!
Quote
OOB axes use the scripting jog methods for motion and they can be homed.  So one can use incremental or absolute jogging for precise positioning.
Kool!

Quote
No G code will ever move one of these axes in coordination with any other axis.  Meaning that no axis letter can be assigned to them.
Well that explains why I couldn't 'see any means of controlling them' even in Industrial.

I have some serious experimenting to do. The ESS allows up to six motors. I'm thinking three (co-ordinated) for the three
axes, one for regular spindle and one for an indexing spindle/axis. My application requires that the spindle be indexed
at certain times. My plan is to have two motors out-of-band motors, one as a free running spindle and the second
indexing spindle and the step/dir signals selected by an output of the ESS.

Now only have to work out how to keep track of the reference position during that time where it is used as a free
running spindle....that may be a challenge! May be required to re-reference when entering indexing mode on each
occasion.

Fun...fun....fun

Craig
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: smurph on May 10, 2018, 10:58:04 PM
M19 is usually used for spindle orientation.  It is an interface script that should eventually call the "spindleorient.mcs" script.  You only need to find the index pulse once (home the spindle, so to speak).  Then you can mathematically calculate where it is by the number of counts per rev on the encoder, assuming the encoder is 1:1 with the spindle shaft (highly suggested).    Rollover may be an issue.  Use and encoder with the lowest resolution needed to get the job done to keep rollovers at bay.  Just re-home if you detect a rollover.  However, most M19s will spin at a certain speed and find the index pulse every time and then index from there. 

We don't define the arguments to M19, as there are so many variations from the MTBs.  So Brett has just done up and example M19 that can be used as a starting point.  I might be in the newest builds.  It uses R and P arguments to the M19 script.  R is the angle to orient in degrees and P is the direction to orient (0 == shortest path, 1 == clockwise, 2 == counter clockwise).

Steve
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: joeaverage on May 11, 2018, 12:31:38 AM
Hi Steve,
I'd been contemplating how to go about retaining 'reference' during free running mode.

My spindle (the grunty high torque one) is based on an Allen Bradley servo and is 1:1. The encoder is available
as outputs from the drive, 8000 count/rev. If I track the encoder with a MPG input to the ESS and subtract
8000 from the count at each 'zero crossing' or index event it should prevent a counter from overflowing
and therefore retain 'reference'.

The only time where I would be concerned about the number of complete turns in addition to the angle within
the current revolution would be when I was rigid tapping and then I would be using the spindle as a C axis
coordinated with the rest of them.

Looking forward to viewing the M19.

If someone were to question 'do you need all this crap' I would have to answer no, but its so much fun fiddling
with all this....and a hobby should be fun right.... even if it doesn't make sense!

Craig
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: Cbyrdtopper on May 11, 2018, 03:38:34 PM
I'm doing some bench tests on this OOB Axis.  

I've got it to move using the mc.mcJogAbsStart.  I can move it to "Absolute Position" but I have no idea where to find this position.  How do I check the Position of this motor?  I tired using mc.MotorGetPos and it only returns 0.  

Is there a register that displays this value?  I really need to know the position of this motor so I can communicate real time positions between Mach and the PLC.

I'm going to look at the homing of this motor next.  
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: smurph on May 11, 2018, 03:54:02 PM
The motion controller may not be reporting feedback for motors on the OOB axes, if that is the case.  It should.  Make sure you are passing the correct value for the motor ID.  Check the return code of the API function!!!  :)  See if there is an error code.  If all is well, then there is something wrong with the motion plugin.  Typically, you would use mcAxisGetMachinePos() to get the position in machine units for the axis.  mcMotorGetPos() for the motor that is attached to the OOB axis should return the motor counts.  There is no coordinate system other than the machine coordinate system for OOB axes. 

The screen has DRO types that should show the machine position of the OOB axes.  Also there is a DRO types to show the counts and velocity of the motor as well. 

However, one could track the position of the motor with a script variable.  Home it first.  This is position 0.  Then track all moves (adding to the variable for incremental or explicitly setting the position for absolute). 

Steve
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: Cbyrdtopper on May 11, 2018, 04:19:34 PM
Okay.  I just figured out the homing.  That wasn't too bad. I just need to add the RC in there so I'm not assuming anything in my code.

I did figure out that the DRO could read the OOB Axis position.  I also got the mc.MotorGetPos to work, I was looking at the wrong motor.  It returned 20,000 counts for a move of 1 unit, of course this will obviously change when I get the motor calibrated to the tool carousel, but for now, I just did the math to get the position, I will throw that into a register for Mach and the PLC to use.  That should work just fine.  

I'm going to do some more testing with this and get my PLC and Mach changing the OB Axis position to make sure that it will do what I want.   Is this still considered Hobby??? lol
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: joeaverage on May 11, 2018, 04:33:25 PM
Hi Chad,
where did you find:

Quote
I've got it to move using the mc.mcJogAbsStart

I cant find mcJogAbsStart in the API.chm.

Craig
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: joeaverage on May 11, 2018, 05:09:26 PM
Hi,
when I used Zero Brane to write a macro mc.JogAbsStart() is compliant but its not mentioned in the API.chm.

The version of the API.chm I have is Rev 1.01 March 2015. Is there a later revision? I recently updated to 3756 and I would have thought that if there
were a later revision it would have come with the update.

Craig
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: Cbyrdtopper on May 11, 2018, 05:44:53 PM
Hey Craig,
I'm using 3787.  It is not in the API on this version either.  I found it by typing and seeing it pop up in Zero Brane.  I guess they haven't updated the API yet.
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: joeaverage on May 11, 2018, 05:58:13 PM
Hi,
well we should be used to NFS developing new stuff and leading their documentation.....I mean I'm of course happy that mc.JogAbsStart() exists but how is anyone supposed to know!
Further, what other gems have been introduced that we have no idea even exist?

Craig
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: smurph on May 11, 2018, 06:12:42 PM
Further, what other gems have been introduced that we have no idea even exist?

One may NEVER know...  :)

I usually don't document an API call until it has been fully tested.  There are tons of undocumented API calls in Windows too, and I suspect for the same reason.  However, the reason THIS one (and a few others) is not documented is because I had to re-install Windows (long story) and I lost all of my license keys for a lot of my development software.  The Help documentation software included. 

I did have a backup, but some of the stuff is stored in some mysterious location.  Typically, the CAD/CAM stuff allows for you to "park" your license, reinstall, and then pull the license back down.  So those were easy.  But other things were not so easy and/or you just forget that they are licensed.  Anyway, I have that all sorted now.  But I detest writing documentation because people then complain that it is not good enough, etc...  So I have to be in a particularly "I don't give a rip" mood before I can motivate myself to write that stuff.  :)

Steve
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: smurph on May 11, 2018, 06:55:59 PM
I'm going to do some more testing with this and get my PLC and Mach changing the OB Axis position to make sure that it will do what I want.   Is this still considered Hobby??? lol

Well...  hobby can be/is expansive.  For instance, one of my hobbies is ham radio.  People can get into that hobby and just buy radios and antennas just to talk.  But others. such as myself, get hopelessly drawn in and end up having tons of test equipment following them home and/or start building solid state amplifiers and power supplies. 

So...  I think you are building the equivalent of a solid state amplifier.  :)

Steve
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: joeaverage on May 11, 2018, 07:15:33 PM
Hi Steve,
my cheap and nasty spectrum analyser cost me $5000NZD when I bought it and it was a demo unit at that!

That was before the advent of Ebay, or perhaps me being aware the Ebay is a pretty fair source for test gear. Still you have to shop
around and the good stuff can be had at good prices, just plain expensive....as opposed to eye-watering pie-in-the-sky stuff.

Craig
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: smurph on May 11, 2018, 07:56:10 PM
I buy dead stuff and fix it.  I'm successful about 75% of the time.  You have to watch out for stuff made in the 90s because they will most likely have the leaky surface mount electrolytic caps that can corrode the traces on the PCBs.  Sometimes beyond repair  Tek TDS500 series scopes, for instance.  But my wife HATES this stuff because the 25% that I can't fix seems to stay around.  :)  Plus I usually keep the stuff I do fix as well.

I got a Tek 492AP spectrum analyzer for free.  It was all ganked up with display storage issues.  But it is up and running like a new one now.  Up to 21 GHz!!!  That was my best fix ever.  Next was a Fluke 6080 signal gen from eBay.  That one cost less than the shipping to get that heavy beast to my door.  It is now running 100% as well.  So eBay can be even cheaper if you can fix the stuff.  I find that capacitors are almost always the culprit, no matter what vintage/type they are.  Even the good non leaky electrolytic caps let go with high ESR.  Capacitors are just little serial killers that are just waiting for a chance to pounce.  Nasty little beasts! 

But with eBay, I have a complete RF lab for less than the cost of a new HF radio.  eBay is good for machine tool stuff too.  But you better know something about what you are looking for, in call cases.

eBay can be frustrating though.  I simply hate the "buy it now" listing types.  Because most will invariably try to sell something dead for 10 times what it is worth and the listings clutter up your search for months on end! 

Steve
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: joeaverage on May 11, 2018, 08:17:17 PM
Hi Steve,
my most recent purchase was a HP 54720D scope and three input amps and active probe. 5 Gsamp/sec so about 1 GHz bandwidth.....The guy I bought it from was a retired HP Engineer and he did a nice job on
it. The thing weighs 70lb and shipping to NZ was going to cost over $1000, got around that by using UPS, no tracking, no insurance, but it got here!

Bought a house since and mortgage has put paid to any plans for more RF gear. In addition now working for a company fixing welding gear, a good percentage of inverter types.
As a consequence I've built up a selection of HV isolated probes, high bandwidth current clamps and  a 13kV HF voltage probe. Most of my electronic hobby time seem to be designing
and building wiredrive PCBs, phase controlled bridges to hundreds of amps etc for work related projects. Have had some fun designing and building a servo drive for a decent (2.6kW) AC servo
fitted with an eight pole resolver. All in all a great learning curve. Cheaper than RF too!

Craig
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: pjcevallos@gmail.com on March 26, 2022, 02:02:39 AM
Hi everybody

I am using Mach4 EtherCAT as my motion controller and I would like to try out-of-band axes for an auto tool changer, or to move a something up/down.

I have read that I need to use macros with API, but I am completely new to those.

Any tip of where should I start and also more advanced sources to program macros for OB axes in Mach4?

Best regards

Pablo
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: KatzYaakov on March 27, 2022, 07:47:14 AM
which hardware did you you use for the ethercat?
and why you choose  ethercat?
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: pjcevallos@gmail.com on March 27, 2022, 08:20:49 AM
which hardware did you you use for the ethercat?
and why you choose  ethercat?

Motion controller: kingstar. It requires a computer with intel cores 8th to 10th gen and intel NIC. Then, the NIC only works for EtherCat communication and you connect as many ethercat slaves as you want (of course knowing Mach4 capabilities in this case)

Ethercat stepper drivers (unfortunately these ones are expensive) and matched motors

And for I/O you could use any ethercat PLC o etherCAT coupler with the modules you need. Most common are beckhoff and wago

Hope these gives enough information, but if not feel free to ask.

I am still waiting to know how to control OB axes :)

Pablo
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: KatzYaakov on March 27, 2022, 08:34:05 AM
But why did you choose use ethercat and not standart step/for
About OB please explain me what you mean, because I use servo magazine,I use rotary axiss... what exactly your need
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: pjcevallos@gmail.com on March 27, 2022, 01:50:36 PM
Hi

I wanted to have:

1) lots of inputs and outputs (Maximum around 64000), and not being limited by the ones provided by the hardware motion controllers with BoB included. Kingstar is a more economic option to the EtherCAT motion controller from Vital systems. With Kingstar you can have thousands of I/Os, and the number of motors is limited by Mach4 capabilities as long as you buy the modules and drivers. In Vital systems you have to pay for 4, 5, 6 or 8 axes and are very limited to I/Os.

2) more Freedom to switch to other platforms in case it is needed. Most step/dir motion controllers are attached to a specific software/hardware. In this case, I can use the same hardware with different EtherCAT master controllers (e.g. Beckhoff, Wago, etc). I did not explore more options because right now I am happy with Mach4 EtherCAT, but I understand it is doable.

3) Less wiring: Daisy chain made it so easy to wire or add new devices.

For the OB axis, I want to do a rotary auto tool changer like the one in the video below. But no Idea how to home or jog the motor to the right position with macros.

https://www.youtube.com/watch?v=8HkXbGkPPyw
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: KatzYaakov on March 27, 2022, 03:01:45 PM
Do you mean magazine like this?
https://youtu.be/8IoxTXm3iDk
Only reason I understand you it's less wiring because all rest I have also with pokeys ( 80 output,no limit input)
I asked about Ethercat because I use absolute encoder and as first option I thought Ethercat ,but I use onther way
By the way here sample of much more complex solution with step/dir
https://www.youtube.com/watch?v=A4gRcnDL3PU
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: joeaverage on March 27, 2022, 04:35:55 PM
Hi,

Quote
Kingstar is a more economic option to the EtherCAT motion controller from Vital systems.

I am interested. I looked at Ethercat, in particular Kingstar Ethercat, and came to the conclusion that it was more expensive than my current motion control solution.
I am not counting the extra you pay for Ethercat servos or IO nodes, just the Ethercat master. I discounted the Vital Systems solution....if I want Ethercat I want it built into
the PC.....the Vital Systems idea of a separate board is like the worst of both worlds.

This is from Automation Technologies:

https://www.automationtechnologiesinc.com/products-page/mach4-ethercat-system/cnc-ethercat-motion-control-computer (https://www.automationtechnologiesinc.com/products-page/mach4-ethercat-system/cnc-ethercat-motion-control-computer)

Despite it being pictured with Ethercat servos/steppers is is in fact just for the Ethercat master. That's $1599 for a rebuilt PC, a Mach4 license, presumably the Hobby version, and a RTX64 runtime license.

My existing motion control solution is a PC with Mach4Hobby, $200, and an ESS $190, so the total about $1000, allowing $600 for the PC. That means about a $600 premium for Ethercat.

Do these numbers make sense to you? Is the Automation Technologies offer sound genuine or is it overpriced? If, as I calculate, Ethercat has a $600 premium; do you think the premium
is worth it?

Craig
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: KatzYaakov on March 27, 2022, 06:28:59 PM
Craig I think you missing some numbers
I checked it about year ago different then pokeys was about 1500$ not 600
I talk about 5-6 motors. 24inputs 64 output
I don't remember all details but you must buy the rtx license....it was big money
Title: Re: Out-Of-Band Axes in Hobby vs Indusrial
Post by: joeaverage on March 27, 2022, 08:03:46 PM
Hi,

Quote
I checked it about year ago different then pokeys was about 1500$ not 600

Who cares about Pokeys or even an ESS.....I just used an ESS system as a  cost comparison to Ethercat. What I was asking OP was whether he thought
the figures are sensible and whether he thought the premium worthwhile.

Craig