Mesa 7i76E + CL86Y Stepper Driver Questions

06 Oct 2021 22:29 #222406 by harmo
Hi Everyone,

I hope you're all well out there. I've been building my electronics enclosure (ever so slowly) and I just want to confirm a few things because I've been looking at wires and documentation so long, I'm starting to doubt myself.

I have a 7i76E Mesa card, with field IO running at 24V. Pretty standard.

I'm connecting a Stepper Online CL86Y Closed loop stepper driver that has both alarm (as expected) and a weird terminal called "Pending". As well as another terminal for Motor Free (I guess that's another term for "Disable"?). I have attached screen shots of the relevant pages of my driver manual for reference.

So I have a few questions:

Re: Pending terminal

Has anyone used this? Is this some secondary (inversed) confirmation of the Alarm? I'm not planning to use it at this stage, but the terminal intrigues me... and how on Earth would you configure LinuxCNC to use this meaningfully... if at all?

Re: The Alarm Circuit
Now from what I've read, the closed loop stepper driver has a 500M ohm resistance on the opto-isolator.... the wiring diagram has "unspecified resistors" assuming a 5V field IO... but the Mesa 7i76E.. as described above, is running at 24V. I presume the light dependent resistor in the opto-isolator can handle the higher voltage?

I just want to run the 24V+ to the driver, and run the V- from the driver to a digital input on the Mesa Card. However, in a nagging self-doubting moment, I'm not sure if I have to bring that down to a lower voltage for the driver, then bring it back up again for the Mesa card... as it would expect the 24V signal.

How have others CL86Y owners done this? Any of you out there?

Any advice would be greatly appreciated. I think we're all going stir crazy in lock down here.

Take care everyone!

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

06 Oct 2021 22:40 #222408 by tommylight
Alarm and Pending can be used with 24V, just need a bigger resistance, roughly 5 times bigger. Can also be wired differently, but am no good at explaining so i'll skip.
Pending is usually not used (can not think of any use right now), it is also called "in position" and can also be used as "drive ready".

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

07 Oct 2021 02:41 - 07 Oct 2021 02:54 #222420 by spumco
I'm using the same drives.

Pending: Tommy's right.  That's an 'on-position' signal, don't bother with it.

The unspecified resistors in the diagram are pull-ups, and they're assuming you've got a 5v power supply - it's just drawn badly showing either sourcing or sinking.  The optos will handle 24v fine.  I've attached the function description from the CL86T version and it's much more clear.  The diagram is the same for both drives (Y and T series).


Alarm: Run 24v from VFIELD to the ALM+, and ALM- to the input of your choice.  You may have to flip the signal from high to low in LCNC as I don't trust the drive manual on the default setting.  It should be active high ("high impedance") in the alarm (24V to 7i76e for no-alarm state, 0V for alarm), but you never know.  This way a broken wire, buggered terminal, drive power failure or whatever will cause an alarm.

Bonus 1: if you want to save inputs, you can do it one of two ways:
  • 24v from VFIELD to ALM+ on all drives.  ALM- on all drives to a single input.  If any one drive faults, the 7i76e input will see 24V (you decide what you want ot have happen at that point).  This requires changing the alarm signal in the drives.  Not recommended as a drive power interruption will NOT register as a signal on the 7i76e.
    • OR
  • 24v from VFIELD to ALM+ on drive 1, ALM- to ALM+ on next drive, and so forth daisy-chaining through the drives and terminating at 7i76e single input.  Drive fault will interrupt the daisy-chained 24v signal.  Again, you decide what you want to have happen
Personally, I've got them each on individual inputs.

Bonus 2:  These drives come programmed with a 4000 pulse following error as the default before the drive faults.  This is equal to a full motor rotation! There was a recent here thread where the OP was complaining about circles being out of round and I suggested they tighten up the drive following error as there's nothing LCNC can do with a 'lazy' drive.  Same-same for the PID values - the drives are tuned really soft from the OEM.

Do youself a favor and buy the programming cable thing from StepperOnline so you can change the following error and adjust the ALM signals if you need.

P.S. The software is horrible.  The only documentation on the software is what I got from StepperOnline after pestering them for a few weeks; attached for your reading pleasure.
PPS - don't bother trying to use the much better drive software for the CL86T series - or any other stepper vendor's software, for that matter.  No other drive software will connect with the CL86Y - yer stuck with it.
Last edit: 07 Oct 2021 02:54 by spumco. Reason: Drive software warning (Edit 2 - I got the high/low bit wrong
The following user(s) said Thank You: tommylight

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

07 Oct 2021 10:43 #222441 by harmo
Hi TommyLight and Spumco,

Thank you for your help and such prompt replies. I really appreciate you both for confirming that 24V will work. I normally deal with poor documentation reasonably well, but I'm glad to see that I'm not the only one struggling with the CL86Y manual.

Spumco, you have truly gone above and beyond with telling me about the following error, providing the surprisingly absent programming manual, and providing better explanation excerpts from similar hardware manuals. I also appreciate the wiring instructions, which confirms my self-doubting suspicions. I've ordered the programming device as you suggested (funny, because when I contacted Stepper Online, they told me that I would NEVER need the programming device). Unfortunately, it's yet another parcel on a slow boat from China, with the additional fun of the horrifically overloaded Australia Post. Maybe I'll see it before Christmas... if all goes to plan. I'm still waiting for parts I ordered months ago.

I assumed that the re-programming software would be driver specific. I also presume that Stepper Online's programming software is only available for Windows, right? That's unfortunate in a vintage Mac/Linux household like mine. I'll find a way somehow.... I think I have a circa 2007 Windows laptop.... that might still work.

Anyway, thanks and take care!
The following user(s) said Thank You: tommylight

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

07 Oct 2021 11:37 #222448 by spumco
Hope you find it useful.  I've been such a whining, needy pest on here lately I try to 'pay it forward' if I can to keep from getting banned.

Regarding the programming dingus... I believe I saw a youtube video or a forum thread (different forum) where someone created thier own version.  They seem to have mentally reverse-engineered the black box and posted "Hey, it's just a (gibberish) and a (gibberish), I got those lying around."

I was too impatient, so I bought one with the drives.

Since you've got a couple months before it shows up, there's probably little harm in experimenting - or at least searching the internet.  I believe I stumbled across that tidbit while looking for variations on the driver software.

WIN! - just found it:

Good luck,

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

07 Oct 2021 14:14 #222454 by tommylight

I've been such a whining, needy pest on here lately ...

Have not noticed ... :)
But i do appreciate the help you provide, it is explained much better than what i can do, i tend to take shortcuts, a lot ! :)

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

08 Oct 2021 02:32 #222513 by harmo
Hi all,

I hope you're all well, and have fun plans for the impending weekend.

As Spumco mentioned, the "alarm threshold" setting on the CL86Y stepper driver is set to 4000 steps in the factory. I'm sure adjusting it up or down (depending on microstepping, gearing ratios, ball screw pitch, etc) is handy but I just thought I'd ask:

What sort of numbers are people putting into this setting? (Relative to real-world spindle/plasma cutter/laser/3D print head travel distances.. or tolerances if you prefer). Obviously, it would differ from a CNC router, to a plasma cutter, to a mill. But maybe it'll help others out there to see what works for different people and setups.

Back to me though, because that's the only topic I'm experienced enough to talk about here... Don't worry, I'll pay it forward eventually.

PNCConf and multiple stepper alarm input pins has me confused.

I plan to connect the alarm pins of each stepper driver to individual inputs on the 7i76E. However, when I was playing around with PNCConf, I thought I'd use each pin as an E-stop.. but I couldn't do that. (Apparently I can only have so many E-stops?) So I have to ask:

How do you configure LinuxCNC to handle multiple alarm pins?

I'm sure I'm just not seeing the option in PNCConf... or do I have to hard code it in the configuration files. It seems I'm missing something. Since my home/limit switches and probe use most of the inputs on 7i76E terminal block 6 (TB6), I was trying to set multiple alarm pins as E-Stops on TB5, but I can only have one at a time... apparently.

Anyway, I appreciate the guidance, truly.

Take care, (I'm sure you already do, but hey, it's the thought that counts, right?)

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

08 Oct 2021 03:57 #222516 by spumco
Following Error:
Depends on your machine mechanics, but I personally wouldn't tolerate more than 0.001" on my mill - whatever that works out to be in pulses per rev with my 5mm screws.  The steppers have 1000-line encoders, so that means 4000 pulses per rev.  Do the math and then set it fairly high until you've got LCNC sorted out.

Suppose your axis moves 0.5" per motor rev.  0.5/4000 = 0.000125" per pulse.  So if you can tolerate 0.001" of uncertainty, set the permitted following error to around 10 counts.

Once all is right in the world, you can start turning down the thumbscrews on the drives to make them behave.  Remember that the tighter (lower) the permitted error, the more chance there is of faulting a drive when LCNC cracks the whip on aggressive moves.  These are not AC/DC servos, so they don't have a lot of extra grunt to get on position when they're approaching a following error fault threshold.

ESTOP thoughts...
I'm not an LCNC expert, not by a long shot.  Just the opposite.

Having said that, you need to have a think about what you want the machine to do under different scenarios.  Do you want a drive fault cause to ESTOP, or do you want it to stop all motion and throw an alarm? Or something else?

If it does ESTOP, what does that mean?  Specifically, is your ESTOP tied to drive main bus power through a contactor or relay, or some other scheme?

An "estop" for you is not exactly the same thing as on my (or any other) machine.

So... first thing is to figure out - in English or language of choice - what you want to have happen - both to/from LCNC and in physical hardware.  Once you've done that you can decide what the best pin/signal/function scheme is to accomplish what you want.

"Dear CNC Fairy Godmother, I want my ESTOP to work like this:
  1. Stop all motion
  2. Stop the spindle as fast as possible using a braking resistor, then kill the drive power once it's below xyz RPM
  3. Kill the drive bus power
  4. Leave the drive logic power enabled
  5. Leave all signal devices enabled
  6. LCNC gets informed of ESTOP condition
  7. And don't break anything
  8. And make my endmill not have gouged my table
Sincerely, [your name here]"

Or words to that effect.

PnCconf will only set up a VERY basic system.  What you will have is a software ESTOP, and also perhaps an physical external button (latching switch) connected to 7i76e and LCNC set up in HAL to recognize that input as effectively the same thing as clicking/pressing the screen ESTOP icon.

This is about as non-industrial as it gets, but your personal risk tolerance is likely not my risk tolerance.

Getting to the point, there are multiple ways to accomplish some sort of STOP RIGHT NOW scheme within LCNC.  And not all of them involve an ESTOP signal/pin.


As you start to learn about LCNC, and specifically HAL, you'll find that there are about 8.5 Billion pins & functions.  Go read the LCNC online manual in the HAL section.  Your eyes will glaze over and you will open a new browser tab with something less mentally challenging.

After you've come back to it a few times, it'll start to click.  Once it clicks, you can start reading the description of all the HAL functions and the pins that are available when that function is created.

Stuff like this particular pin:
joint.N.amp-fault-in (IN bit) 


This sounds promising, doesn't it?  This is an example of HAL function "motion" which, when created, results in a pin being available for use which is probably what you want rather than ESTOP of some flavor.

Go look up "motion" at the bottom of the online user manal - it's under the MAN pages, Realtime components.  Scroll through that huge list of pins and start reading the descriptions.  There is some very interesting stuff in there if you don't go narcoleptic out of habit.

If you link ('net') (drive fault signal) to joint.N.amp-fault-in (IN bit) then that Mesa pin will trigger the amp-fault-in thing, whatever it does.  I bet that's your huckleberry,..

Getting to the point, there are multiple ways to accomplish some sort of STOP RIGHT NOW scheme within LCNC.  , the end result may, in fact, be the same as if you clicked the ESTOP screen icon - but that's up to you and how you sort out the logic for how all the HAL bits-n-pieces link together.

[skip the following if HAL has sunk in already]
Go open a HAL file in one of the linuxcnc/configs folder with a text editor and have a look.  Near the top you'll see:

loadrt i]something[/i

What that short statement did was magically create function i]something[/i.  Poof.

addf i]something[/i.0  servo-thread

What that next one did was take function i]something[/i, instance '0' (cause you can have more than one instance of a function), and get it added to the servo-thread.  That means (and it gets hazy for me here) it's doing something or available for some sort of calcualtion or response instead of just sitting there.

"loadrt" = "Let there be Light"
"addf" = "Hey Light - get cracking and illuminate everything"

So you could do this for three drives:

loadrt motion count=4 (or however many joints/drives you have.  Count your motors, not axis letters for gantry machines.)
addf motion.0 servo-thread
addf motion.1 servo-thread
addf motion.2 servo-thread
(more HAL gibberish)
#---Super-cool drive alarm test stuff--- (this is a comment)

net random-signal-name0 7i76gibberish.0.input-05 [Mesa pin to a signal]
net random-signal-name0 joint.0.amp-fault-in [same signal to a HAL pin that might stop all motion]

net random-signal-name1 7i76gibberish.0.input-06 [Mesa pin to a signal]
net random-signal-name1 joint.1.amp-fault-in [same signal to a HAL pin that might stop all motion]

lather rinse repeat.

I'm going to stop here, because I've probably made some gross errors and need one of the smart people to add their two cents.

But, fundamentally... you decide what you want to have happen in software and meat-space, then bend LCNC to your will.  Not the other way 'round.


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

08 Oct 2021 04:01 #222517 by spumco
And another thing...

If you have separate home & limit switches, get rid of the home switches.  LCNC can use a limit switch as a home switch during a homing routine, then treat it like a limit after that.  Saves inputs.

I used to have 9 switches with my old control, now I'm down to 5 (cause a Z-min is pointless as the tool has already dug through the table).


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

14 Nov 2021 21:33 #226509 by harmo
Hi Spumco/R, and everyone else,

Sorry for the delayed response, I've been stuck looking after a farm for a few weeks due to biblical issues (flooding here in Australia, and the lack of labour to hire due to Covid... does that mean plague as well?).

My problem is that my phone carrier has no coverage here. So I'm borrowing some access to catch up. Although I must admit my CNC progress has stalled somewhat of late.

Anyway, Spumco, thanks for the detailed response. It's a huge help, and gives me something other than farming issues and family dramas to think about.

When it comes to HAL, I'm definitely still in the narcoleptic stage. I'll keep beating my head against the documentation (once I get my own Internet access again) Hopefully that'll knock some sense into me. However, I will have work to catch up on since I've been away... and Christmas... perhaps I will have the slowest CNC build in history.

Logistics and drama aside. I really appreciate everyone's help here.

Back to checking the pumps, and feeding sheep on the upper (now overgrazed) paddock/bog... and telling the better half back home that I haven't been swept away in her imagined rapids.

Take care everyone!

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

Moderators: PCWjmelson
Time to create page: 0.095 seconds
Powered by Kunena Forum