Stepper does not turn on Mesa 6i25 with 7i76 and Leadshine M542T

More
31 Oct 2017 11:50 #101050 by Domsku
Hello,

since a few days I try to make my stepper turn - without success. I use the following components:

Mesa 6i25
I flashed the card with the firmware 5i25_7i76x2.bit. Jumpers W1 and W2 are changed to the upper position. All other jumpers are in their default position. So I run the card in 5i25 compatible mode. I rechecked the firmware and mesaflash said everything is OK.

Mesa 7i76
All jumpers are in default position. A 19V switchpower supply is connected to Vin and GND on the TB1. Both LEDs are illuminated.

M542T
The dip switches are set to 400 steps (microstepping factor 2). Switch 5 to 8 all on. Current is set to 3.2A. The green power-LED is illuminated.
The stepper driver is connected to the x-axis terminal of the 7i76. I tried all configurations. Common 5v, common ground and nothing in common. ENA is left unconnected. No matter how I connected the driver, the behavior was always the same. At the moment the setting is common ground.

When I now run PNCconf and want to test the axis, the stepper seems to make one step just at the moment when the test-window pops up, but nothing else. The same happens when I start Linuxcnc.

Could someone please give me an advise of how to find out my mistake? Attached you find my HAL and INI files.

Thanks
Dominik
Attachments:

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

More
31 Oct 2017 12:17 #101051 by PCW
As a quick test, I would try

1. doubling the step pulse length
2. making sure you have the step polarity correct

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

More
31 Oct 2017 12:55 #101052 by Domsku
Great! No. 1 worked! I set the value in the INI file to STEPLEN = 3000. So the specified value of the data sheet - which is 1.5 µs is too short.

Now that it works, is there a recommended way to optimize these values?

Thank you for your quick response!

By the way, in my installation PNCconf changes values and writes them wrong into the files. Especially the step scale and the limits. Is this a know issue?

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

More
31 Oct 2017 17:30 - 31 Oct 2017 21:21 #101074 by PCW
Many drives don't meet their published timing specifications
This is more noticeable with a hardware stepgenerator that can accurately set the
output pulse length (a parallel port may have 2-3 usec minimum pulse length regardless of the settings in HAL)

There is no need to optimize these settings, unless they limit your desired maximum step
rate.

That is you could choose:

DIRSETUP = 20000
DIRHOLD = 20000
STEPLEN = 5000
STEPSPACE = 5000

And it would work with pretty much any step motor drive and not cause _any_ issues. It would limit you to 100 KHz
You are nowhere near there now (in fact you have a maximum step rate of just 2 KHz with your current INI file settings
so you could go 50X faster with the very relaxed timing settings above assuming your drives/motors could do it)
Last edit: 31 Oct 2017 21:21 by PCW.

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

More
10 Nov 2017 18:11 #101623 by Domsku
So, as I understood, the speed limiting factor in my settings is the SERVO_PERIOD = 5000000 (nano seconds). And if I want to speed up max. velocity, I need to reduce this value, correct?

After checking the latency of my computer (latency-plot is attached) I set the servo period to 30000. Result was, that my computer got stuck, as soon as I tried to run LinuxCNC. So I put it to 50000. That helped, but LinuxCNC complained about a realtime error. After changing servo period to 70000 everything works fine.

Now, my max. step rate should be 1/(70000 x 10^-9 sec.) = 14285 Hz and with 80 pulses per mm I would get a max speed of 14285 HZ / 80 pulses/mm = 178.6 mm/s.

Did I get it right or is there something I forgot? I still didn't test it with my hardware.
Attachments:

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

More
10 Nov 2017 18:33 #101624 by Todd Zuercher
Generally for a hardware stepping machine the servo-thread should be left at the default of 1000000. When using Mesa hardware the thread speeds in Linuxcnc do not really have any thing to do with the maximum speed that your motors can move. That is all handled in the Mesa hardware and controlled by the pulse and space length settings mentioned by PCW. Changing the servo-thread speed only changes the interval when Linuxcnc does it's calculations and if set to small can lock up the computer (like you found.)
The following user(s) said Thank You: Domsku

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

More
10 Nov 2017 18:33 #101625 by PCW
The servo period has no direct effect on the maximum step rate
( step rates to about 4 MHz are possible with your hardware, and this is independent of the servo thread period )

The default servo period is 1000000 ns (1 ms) There is normally
no reason to change this so I would restore this value to your hal/ini files
The following user(s) said Thank You: Domsku

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

Time to create page: 0.157 seconds
Powered by Kunena Forum