- Configuring LinuxCNC
- Configuration Tools
- PnCConf Wizard
- Help with Mesa 7i76e Setup for Closed Loop Stepper
Help with Mesa 7i76e Setup for Closed Loop Stepper
04 Sep 2017 06:23 #98438
by JJ0704
Help with Mesa 7i76e Setup for Closed Loop Stepper was created by JJ0704
Howdy,
I apologize in advance, I am a complete noob. I'm new to machining, a CNC neophyte (I've never even seen a CNC machine in person), and the first time I ever used Linux was installing the LinuxCNC Debian 9 (aka Stretch) RT-PREEMPT. Specifically, I am running the distribution from the iso named "linuxcnc-stretch-uspace-amd64-r8.iso ". It has been a fun challenge so far.
I just got my newly acquired Mesa 7i76e controller card and hooked it all up to a power supply and one of my three newly acquired LiChuan closed-loop stepper drivers and matching motor. I am now just trying to see if I can get the one motor to turn by my command before I complete the rest of the wiring and setup on my G0704 mill conversion.
I have added power to the 7i76e via the schematic from Norbert posted on this forum (thank you). I can successfully ping the card and run the mesaflash thingy in the terminal window...so I think I am good with the connection to the computer bit.
I am less confident about my wiring from the 7i76e to the driver. There isn't a whole lot of clear info out there, but what I did was the following:
TB2 PIN 1 (GND) left empty
TB2 PIN 2 (STEP -) wired to Driver PUL-
TB2 PIN 3 (STEP+) left empty
TB2 PIN 4 (DIR-) wired to Driver DIR-
TB2 PIN 5 (DIR+) left empty
TB2 PIN 6 (+5V) wired to Driver both PUL+ and DIR+
Unfortunately, I cannot seem to get the stepper motor to turn at all. I left all of the dip switches as received from the factory, and the motor does hold its position and I can hear it trying to maintain its position when try to turn the shaft by hand. I feel that I may have a LinuxCNC configuration issue because when I ran the PnCConf wizard, after I pressed the "Launch test panel" button on the I/O Connector 1 tab, nothing happens...no windows pop up or anything. Also, further along in the wizard when I press the "Test/Tune Axis" button, I get the following error:
PNCconf encountered an error. The following information may be useful in troubleshooting:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pncconf/pages.py", line 1084, in on_xaxistune_clicked
def on_xaxistune_clicked(self, *args): self.t.tune_axis('x')
File "/usr/lib/python2.7/dist-packages/pncconf/tests.py", line 463, in tune_axis
if not self.a.check_for_rt():
File "/usr/bin/pncconf", line 1640, in check_for_rt
elif hal.is_rt and not hal.kernel_version == actual_kernel:
AttributeError: 'module' object has no attribute 'kernel_version'
I have no clue what any of that means. Despite this, I am able to create a configuration and launch LinuxCNC with it. I can even 'play' it to run a G-code from the samples and I don't get any errors...however, my motor isn't spinning at all. If anybody can point me in the right direction to help resolve this problem, I'd really appreciate it. I am very anxious to have a motor turn by my command for the first time ever.
Thanks,
JJ
I apologize in advance, I am a complete noob. I'm new to machining, a CNC neophyte (I've never even seen a CNC machine in person), and the first time I ever used Linux was installing the LinuxCNC Debian 9 (aka Stretch) RT-PREEMPT. Specifically, I am running the distribution from the iso named "linuxcnc-stretch-uspace-amd64-r8.iso ". It has been a fun challenge so far.
I just got my newly acquired Mesa 7i76e controller card and hooked it all up to a power supply and one of my three newly acquired LiChuan closed-loop stepper drivers and matching motor. I am now just trying to see if I can get the one motor to turn by my command before I complete the rest of the wiring and setup on my G0704 mill conversion.
I have added power to the 7i76e via the schematic from Norbert posted on this forum (thank you). I can successfully ping the card and run the mesaflash thingy in the terminal window...so I think I am good with the connection to the computer bit.
I am less confident about my wiring from the 7i76e to the driver. There isn't a whole lot of clear info out there, but what I did was the following:
TB2 PIN 1 (GND) left empty
TB2 PIN 2 (STEP -) wired to Driver PUL-
TB2 PIN 3 (STEP+) left empty
TB2 PIN 4 (DIR-) wired to Driver DIR-
TB2 PIN 5 (DIR+) left empty
TB2 PIN 6 (+5V) wired to Driver both PUL+ and DIR+
Unfortunately, I cannot seem to get the stepper motor to turn at all. I left all of the dip switches as received from the factory, and the motor does hold its position and I can hear it trying to maintain its position when try to turn the shaft by hand. I feel that I may have a LinuxCNC configuration issue because when I ran the PnCConf wizard, after I pressed the "Launch test panel" button on the I/O Connector 1 tab, nothing happens...no windows pop up or anything. Also, further along in the wizard when I press the "Test/Tune Axis" button, I get the following error:
PNCconf encountered an error. The following information may be useful in troubleshooting:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pncconf/pages.py", line 1084, in on_xaxistune_clicked
def on_xaxistune_clicked(self, *args): self.t.tune_axis('x')
File "/usr/lib/python2.7/dist-packages/pncconf/tests.py", line 463, in tune_axis
if not self.a.check_for_rt():
File "/usr/bin/pncconf", line 1640, in check_for_rt
elif hal.is_rt and not hal.kernel_version == actual_kernel:
AttributeError: 'module' object has no attribute 'kernel_version'
I have no clue what any of that means. Despite this, I am able to create a configuration and launch LinuxCNC with it. I can even 'play' it to run a G-code from the samples and I don't get any errors...however, my motor isn't spinning at all. If anybody can point me in the right direction to help resolve this problem, I'd really appreciate it. I am very anxious to have a motor turn by my command for the first time ever.
Thanks,
JJ
Please Log in or Create an account to join the conversation.
04 Sep 2017 09:44 #98446
by rodw
Replied by rodw on topic Help with Mesa 7i76e Setup for Closed Loop Stepper
I don't think you've set it up right. My drivers look similar but are not closed loop. I only use 4 wires.
Step+ to Pul+
Step- to Pul-
Dir+ to Dir+
Dir- to Dir-
So that leaves you with +5V and +-5v as spare. I've used them for various other 5v sources.
Normally, the enable wires are left disconnected. Certainly keep it that way while you are setting up. By applying power to them, you will most likely disable them eg. They are a (dis)able signal. You could use one of these via a relay to disable the steppers on an estop but you have enough to do.
Don't worry about the pncconf error. I never could test an axes using it. Just edit the ini file settings by hand.
Step+ to Pul+
Step- to Pul-
Dir+ to Dir+
Dir- to Dir-
So that leaves you with +5V and +-5v as spare. I've used them for various other 5v sources.
Normally, the enable wires are left disconnected. Certainly keep it that way while you are setting up. By applying power to them, you will most likely disable them eg. They are a (dis)able signal. You could use one of these via a relay to disable the steppers on an estop but you have enough to do.
Don't worry about the pncconf error. I never could test an axes using it. Just edit the ini file settings by hand.
Please Log in or Create an account to join the conversation.
04 Sep 2017 12:49 #98464
by JJ0704
Replied by JJ0704 on topic Help with Mesa 7i76e Setup for Closed Loop Stepper
That is actually how I had it set up the very first time since that would seem to be the most logical method (simply match the labeled connection names). However, I got the same result of no motor turning.
I then used this other/current wiring method I listed above because I saw it in the manual for the Leadshine ES-D closed-loop stepper motors...and it sort of matched a method that I found in a random Googled result file named "7i76e.txt" that mentioned it at the very bottom. It certainly wasn't smart of me to purchase closed loop steppers from a company that provides zero manuals in English. If I ever crack this nut, I am hoping to write my own manual and provide it here for others to reference. I may even do the same for the 7i76e manual in 'layman's terms'. I've read that thing cover to cover twice now and I'm still not really sure what 90% of it means, but that's my fault.
I then used this other/current wiring method I listed above because I saw it in the manual for the Leadshine ES-D closed-loop stepper motors...and it sort of matched a method that I found in a random Googled result file named "7i76e.txt" that mentioned it at the very bottom. It certainly wasn't smart of me to purchase closed loop steppers from a company that provides zero manuals in English. If I ever crack this nut, I am hoping to write my own manual and provide it here for others to reference. I may even do the same for the 7i76e manual in 'layman's terms'. I've read that thing cover to cover twice now and I'm still not really sure what 90% of it means, but that's my fault.
Please Log in or Create an account to join the conversation.
04 Sep 2017 12:59 #98466
by tecno
Replied by tecno on topic Help with Mesa 7i76e Setup for Closed Loop Stepper
Have below setting in HAL might help
setp hm2_7i76e.0.stepgen.01.step_type 2
I have Lichuan AC Servos and in the drive settings I can set for Quadrature, I do not know if your drives has this.
setp hm2_7i76e.0.stepgen.01.step_type 2
I have Lichuan AC Servos and in the drive settings I can set for Quadrature, I do not know if your drives has this.
Please Log in or Create an account to join the conversation.
04 Sep 2017 13:36 #98472
by rodw
Replied by rodw on topic Help with Mesa 7i76e Setup for Closed Loop Stepper
I probably can't help much more. I think I've seen that Leadshine manual. Pretty sure the diagrams are for active low switching (eg parallel port) when the Mesa is Active High..
It is possible your acceleration and velocity settings are too low that movement is imperceptible. Grab a calculator and work out what velocity your stepper will be doing at say 400 RPM. Edit your INI file to make this the max velocity for the config for one axis. Then see what happens if you jog it.
Or your INI step timing parameters are wrong.
It is possible your acceleration and velocity settings are too low that movement is imperceptible. Grab a calculator and work out what velocity your stepper will be doing at say 400 RPM. Edit your INI file to make this the max velocity for the config for one axis. Then see what happens if you jog it.
Or your INI step timing parameters are wrong.
Please Log in or Create an account to join the conversation.
04 Sep 2017 14:39 #98480
by PCW
Replied by PCW on topic Help with Mesa 7i76e Setup for Closed Loop Stepper
By far the most common issue is that people set the step timing too short
Unlike a parallel port that often has a 2000-3000 ns minimum timing (If you set 1000 ns you get 3000),
the 7I76E will set the step pulse timing to very close to what you set (within 10 ns)
Step drive timings are usually shown as minimum values (that is, just on the edge of _NOT_ working)
I would always double the drives specified timing when starting, and only reduce them if they interfere with
the maximum step rate you require.
Unlike a parallel port that often has a 2000-3000 ns minimum timing (If you set 1000 ns you get 3000),
the 7I76E will set the step pulse timing to very close to what you set (within 10 ns)
Step drive timings are usually shown as minimum values (that is, just on the edge of _NOT_ working)
I would always double the drives specified timing when starting, and only reduce them if they interfere with
the maximum step rate you require.
The following user(s) said Thank You: JJ0704
Please Log in or Create an account to join the conversation.
05 Sep 2017 04:38 #98516
by JJ0704
Replied by JJ0704 on topic Help with Mesa 7i76e Setup for Closed Loop Stepper
PCW, you correctly identified the problem! Thank you! When I set this up, I just left all the default values since I just wanted to see a motor turn on my desk and didn't care how fast. I boosted the value to 5000 and it turns nicely now on command. I certainly need to revisit this and identify the correct settings once I actually install the motors on my machine.
JJ
JJ
Please Log in or Create an account to join the conversation.
05 Sep 2017 09:09 #98519
by rodw
Replied by rodw on topic Help with Mesa 7i76e Setup for Closed Loop Stepper
Glad you got it sorted. Did you leave the wiring the way you had it?
Please Log in or Create an account to join the conversation.
05 Sep 2017 11:26 #98524
by JJ0704
Replied by JJ0704 on topic Help with Mesa 7i76e Setup for Closed Loop Stepper
rodw...Yes, I left the wiring the way I had it, which seems to be typical of closed-loop stepper drivers and does not follow the simple "match the labels" wiring that one would otherwise infer to use. That being said, I have not tried it using the latter method again to see if it would also work.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
05 Sep 2017 11:35 #98525
by rodw
Replied by rodw on topic Help with Mesa 7i76e Setup for Closed Loop Stepper
Cool, I think I was lucky with my stepper controllers (Longs motor DM542a) . Some people were horrified with how short my settings were after a bit of tuning:
I think I could shorten these a bit more which would allow increased velocities and accelerations but with a cheap NEMA 23 screaming at around 1300 rpm, I am quite happy
I have a 5th axis yet to wire in. I should try your method for shits and giggles on it.
# these are in nanoseconds
DIRSETUP = 500
DIRHOLD = 500
STEPLEN = 1000
STEPSPACE = 1000
STEP_SCALE = 1000
I think I could shorten these a bit more which would allow increased velocities and accelerations but with a cheap NEMA 23 screaming at around 1300 rpm, I am quite happy
I have a 5th axis yet to wire in. I should try your method for shits and giggles on it.
Please Log in or Create an account to join the conversation.
Moderators: cmorley
- Configuring LinuxCNC
- Configuration Tools
- PnCConf Wizard
- Help with Mesa 7i76e Setup for Closed Loop Stepper
Time to create page: 0.079 seconds