Need Help with Mesa 5i20 Stepgen Config

More
06 Mar 2016 23:20 #71122 by BartyBorris
I am very new to linuxcnc and could really use some help configuring a MESA 5i20 (with 7i42TA breakout). I have not been able to get the step gen pins (step and direction) to work. I do not believe I am connecting the wrong pins (been successful with other digital I/O, limit switch, etc., connections). Attached are my hal and ini files. Also attached are the pin assignments (I am fairly certain I have the right pins) and a screenshot of latency test results.

For what it's worth, I was also unable to get the MESA hardware pwm to work, so I went with software generated PWM and all went fine. Not sure if there is a relation (common error on my part?).

I have done my best to read the documentation, forum, etc. and am at a loss. Thanks for the help.
Attachments:

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

More
06 Mar 2016 23:36 #71124 by andypugh
Did you enable any pwmgens in your testing?
# load low-level driver
loadrt hm2_pci config="firmware=hm2/5i20/SVST2_8.BIT num_encoders=0 num_pwmgens=0 num_stepgens=5"

That line turns off pwmgens.

If you enable the number you want, then start LinuxCNC, then look in dmesg (type "dmesg" in a terminal window) then near the bottom of the output you will see a list of what pins on the 5i20 are associated with which function.

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

More
07 Mar 2016 00:28 #71125 by BartyBorris
I intentionally disabled PWM since I never got it to work on the 5i20, and since I really have no need for a fast PWM I went with software PWM which I was able to get working easily. My issue now is that I can't get the step or direction to work and I really need the speed of the FPGA.

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

More
07 Mar 2016 01:00 #71128 by andypugh
Are you sure you are connecting to the correct pins?

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

More
07 Mar 2016 01:42 #71130 by BartyBorris
I am as sure as I know how to be. Based on the listing after I start linuxcnc (see below), the correct pins are 24 (step) and 25 (direction). These correspond to 00 and 01 (I hope) on the second 7i42TA breakout board. Each breakout boards pins are numbered from 0 - 23, so IO Pin 24 and 25 roll over to the second boards 00 and 01 pins. I am watching the direction pin with an oscilloscope as I jog the x-axis in +X and -X directions and don't anything happening; everything appears working fine in the AXIS preview.

Starting LinuxCNC...
Found file(REL): ./G2_LinuxCNC.hal
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.7
hm2_pci: discovered 5i20 at 0000:07:01.0
hm2/hm2_5i20.0: 72 I/O Pins used:
hm2/hm2_5i20.0: IO Pin 000 (P2-01): IOPort
...
hm2/hm2_5i20.0: IO Pin 023 (P2-47): IOPort
hm2/hm2_5i20.0: IO Pin 024 (P3-01): StepGen #0, pin Step (Output)
hm2/hm2_5i20.0: IO Pin 025 (P3-03): StepGen #0, pin Direction (Output)

hm2/hm2_5i20.0: IO Pin 026 (P3-05): IOPort
...

Thanks a lot for your help.

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

More
07 Mar 2016 02:03 #71132 by BartyBorris
Some progress. I was using the top of the terminal screw to measure the direction pin. Well, if the terminal screw is not screwed all the way up tightly, it is not a good connection. This was a brand new board, and all the terminal screws were opened all the way up. My fault. Now I just need to get the step pin to work.

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

More
07 Mar 2016 02:07 #71134 by PCW
Can you post your hal and ini files?

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

More
07 Mar 2016 02:10 #71135 by BartyBorris
Got it working! Same issue. Not to happy with myself that I spend hours troubleshooting and overlooked the obvious. Thanks for the help!

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

More
07 Mar 2016 02:11 #71136 by BartyBorris
PCW, I already posted the files. When I am finally sure I have everything working I will post them again.

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

More
07 Mar 2016 02:34 #71137 by PCW
Ahh yes, rising clamp terminal blocks have no ( guaranteed) connection between the
screw and the board unless the clamp is tight

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

Time to create page: 0.428 seconds
Powered by Kunena Forum