Mesa 5i25 direct to BOB questions

More
30 Jun 2020 18:43 #173199 by currinh
Good Folks:

I've searched and found directions for similar systems, but can't figure out just how to proceed.

I have a knee-mill running steppers from a parallel port. The BOB is an older PMDX-131 that has three Gecko G202 motor drivers attached. Connection from the computer to BOB is a printer cable, no terminals (thus hard to re-wire). It's currently very bare bones with only three steppers (no limit or homing, no spindle speed or encoder), about as simple as they get. I've been running this for years with LinuxCNC using the parallel port, latest version being 2.7.0 (I think). Thus I have the files generated by the Stepper Configuration Wizard. Well, I'm trying to upgrade the system with a Mesa 5i25 board directly wired to the PMDX BOB.

I've figured out the first step is to flash the 5i25 card. Two *.bit files look promising. The prob_rfx2.bit is for steppers and is supported by pncconf. It uses the right Mesa "parallel" port pins (2/3,4/5,6/7) but the step and direction signals are reversed from my wiring. The dmmbob1x2.bit flash matches my "parallel" port step/direction wiring (3/2,5/4,7/6). However, it isn't directly supported in pncconf.

I first tried prob_rfx2.bit. In pncconf I selected "5i25-Internal Data" for the Mesa card and "prob-rfx2" for the firmware. Then with encoders=0, pwm=0, step gen=3 I continued. The data for I/O Connector 3 appeared to have three step generators configured. Life is good. For each axis I pulled parameters from the old Stepper Configuration Wizard files or left as default. I did find a config for the Gecko G202 drivers. Well, I get no axis motion. When I change direction, + or -, on each axis I get a small "click" from each motor (the correct motor). I'm guessing each motor driver is interpreting a direction pulse as a step pulse thus moving one step.

I tried for awhile to find in LinuxCNC how to switch step and direction signals. My current thinking is that Mesa enabled LinuxCNC doesn't deal with step and direction. LinuxCNC is getting feedback from the Mesa card for trajectory planning which doesn't involve step and direction signals. That would make sense as the Mesa card is to avoid LinuxCNC having to generate step/direction signals in software.

That leaves dmmbob1x2.bit which matches my parallel port output. However, it isn't supported directly in pncconf, there is no option corresponding to "5i25-Internal Data" for the dmmbob1x2.bit flash. It may be the only way to go without re-configuring a *.bit file, which I'm not capable of doing. Running the dmmbob1x2 flashed 5i25 using the pncconf prob-rfx2 configuration brings no joy.

I also may have to invert some of the step/direction signals. I see this in the parport *.ini file. Is it possible to accomplish this?

SO, how should I proceed? Maybe change the files from a prob_rfx2 pncconf configuration to work with dmmbob1x2? Are there direction for implementing a dmmbob1x2 configuration?

I'd be glad to provide any files or other information that might help. Currently not sure what else would help though. Thank you for any help you can provide.

Hugh

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

More
30 Jun 2020 18:54 #173201 by tommylight
Flash the Mesa 5i25 with the firmware you need, use the same config, it does not matter that it is made for different firmware.

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

More
30 Jun 2020 20:01 - 30 Jun 2020 20:01 #173204 by PCW
What tommylight says is correct with a minor exception:

If you invert step/dir pins, pncconf will not invert the correct pins
if the actual firmwares step/ dir signals don't match pncconfs firmware
setting. You would probably have to fix these by hand in the hal file

This exception also applies to things like PWM outputs

Changing the output polarity is done by setting the "invert_output" parameter
of the corresponding GPIO pin ( LinuxCNC 2.7 ) or more conveniently setting the
xxxxx.step.invert_output and xxxxx.direction.invert_output parameters
( LinuxCNC 2.8 and > )
Last edit: 30 Jun 2020 20:01 by PCW.
The following user(s) said Thank You: tommylight

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

More
30 Jun 2020 20:04 #173205 by tommylight
In this case it is not an issue of inverting pins in hal, it is that the pin 2 is dir on the config he made, but it is on pin 3 for what he needs.
As far as i can think off, there is nothing to change in hal or ini in this case, that same config should work with the firmware that he needs.

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

More
30 Jun 2020 20:24 #173206 by currinh
Thank you for the response.

I flashed the Mesa 5i25 with "5i25_dmmbob1x2.bit" and left LinuxCNC configured with "5i25-Internal Data" and "prob_rfx2.bit". Starting LinuxCNC I can get no motion. I do get a "blip" from the motors or drive when LinuxCNC starts up, so something is getting through. But no axis motion.

Is this what you meant to try? Other ideas?

Thanks.

Hugh

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

More
30 Jun 2020 20:30 - 30 Jun 2020 20:31 #173207 by PCW
1. Do you long enough step times set?

5000 step time
5000 step space
20000 dir setup
20000 dir hold
are good starting values

2. Did you verify that the loaded firmware has the required pinout?

sudo mesaflash --device 5i25 --readhmid

Will print the current loaded firmware's pinout
Last edit: 30 Jun 2020 20:31 by PCW.

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

More
30 Jun 2020 21:14 #173210 by currinh
GOT IT!

I remembered I needed to invert some signals to get LinuxCNC working with my parport version. So I started inverting pins in this Mesa install. I found that if the dir signals are inverted I get axis motion (and no motion if not inverted). There are options for each axis to make the motor motions reversed. I used this to get the axes going the right directions again.

It must be in the timing of direction changes. If anyone wants me to figure out why it's doing this please send some parameters to try. Although I question if testing with this very old BOB makes sense. I'm happy though, I think it's working. I'll have to test it for scale and do some tuning. It does feel more solid and the max speeds are improved already.

Thank you both for your insight and tips. Very helpful.

Stay well.

Hugh

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

More
30 Jun 2020 21:37 #173215 by currinh
PCW:

The timing was set by selection Gecko G202 drives so I hadn't yet started to mess with them. pncconf gave this for the G202:
step time = 500
step space = 4500
dir setup = 1000
dir hold = 10000

I tried your suggested settings (5000,5000,20000,20000), although it only let me increase the 20000 to 10000. These worked without having to invert the dir signal. So that's the main problem.

I did use the readmid command to view pinouts. Also found the information in the hostmot2 files.

Thank you.

Hugh

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

Moderators: cmorley
Time to create page: 0.086 seconds
Powered by Kunena Forum