linuxcnc

More
16 Jun 2017 04:28 #94559 by mwyl
linuxcnc was created by mwyl
Hello,
I am very new to Linuxcnc and I am trying to set up a 4 axis cnc polisher. The boards I am using are Mesa 5i25 with 7i76 (for my stepper motors) and 7i77 (for my servo motor). I have been using the PnCConf Wizard to set up all the axis. My question is in regards to an encoder setup.

I have an AS5311 encoder that I want to link to the A axis.Separately on an Arduino, I checked to see that the circuit board I have works and can count the distance moved. Then I moved to integrate the AS5311 to the 7i76 board. I put W4, W5, and W6 onto the left hand side for single ended inputs. I have hooked up the A,B and index to assigned encoder pins TB3 pin 7, TB3 pin 10 and TB3 pin 13. When I move the encoder over the magnetic strip, I see changes on the multimeter over A and ground or B and ground but linuxcnc is not detecting a change. Then I used the command "dmesg > hm2.txt" (see attached) and I saw that IO pin 31-33 (P2-11, 12, and 13) are defined as IO Port and not as and encoder. Only IO pin 7-16 are assigned as encoders.

I made sure that I went to P2 tab (7i76) in the PnCConf Wizard to assign the A axis encoder . Am I misunderstanding the 7i76 manual or have I done the setup wrong? What can I change to make this encoder work?
Attachments:

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

More
16 Jun 2017 09:00 #94562 by andypugh
Replied by andypugh on topic linuxcnc
Assuming that the 7i77 is on the external DB25 of the 5i25 (P3) and the 7i77 is on the internal header (P2) you are correct that GPIO P3 11,12,13 should appear as an encoder.

The most likely reason for them not to is that there is a "num_encoder=nn" in the HOSTMOT2 config string.

In the HAL file, what does the "loadrt hm2_pci" line say? If it references something like [HOSTMOT2]CONFIG then what is in [HOSTMOT2]CONFIG in the INI file?

The simplest thing to do might be to simply delete the "num_encoders=nn" from the 5i25, that will enable all encoders.

I have a vague recollection that there might be a problem with mixing muxed encoders and "normal" encoders. I will need research a little further.
The following user(s) said Thank You: mwyl

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

More
16 Jun 2017 10:19 #94563 by mwyl
Replied by mwyl on topic linuxcnc
Thank you for your answer! I saw another forum topic forum.linuxcnc.org/39-pncconf/21670-5i25...ml-files-for-pncconf by Cmorley. Cmorley mentioned that there is no firmware folder for the 5i25 and attached a zip file. I added that to the other mesa boards files with the .pin and .xml.

In the HAL file, I have: loadrt hm2_pci config="num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port0=000x". I will try what you suggested tomorrow.
Thank you again!

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

More
16 Jun 2017 11:11 #94565 by andypugh
Replied by andypugh on topic linuxcnc

In the HAL file, I have: loadrt hm2_pci config="num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port0=000x". I will try what you suggested tomorrow.
Thank you again!


That is probably the problem, I think that will only enable one encoder, and that will be the first one on the 7i77.

If you leave out that "num_encoders=1" then it will enable all of them, hopefully.

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

More
16 Jun 2017 13:17 - 16 Jun 2017 15:57 #94572 by PCW
Replied by PCW on topic linuxcnc
If you use a 7I77 and a 7I76 together, the first step is that you need to flash the 5I25 card with the proper firmware,
there are 2 possible firmware choices: 5i25_7i77_7i76.bit and 5i25_7i76_7I77.bit
The 5i25_7i77_7i76.bit configuration expects a 7I77 on P3 (DB25) and a 7I76 on P2 (the header)
The 5i25_7i76_7i77.bin configuration expects a 7I76 on P3 (DB25) and a 7I77 on P2 (the header
Last edit: 16 Jun 2017 15:57 by PCW.

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

More
16 Jun 2017 13:21 #94574 by andypugh
Replied by andypugh on topic linuxcnc
The dmesg looked like 5i25_7i76_7i77, with the 7i76 on P3.

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

More
16 Jun 2017 13:31 #94576 by PCW
Replied by PCW on topic linuxcnc
OK I did not see the dmesg

Thats a 7I77_7I76 config so expects a 7I77 on P3 (the DB25) and a 7I76 on P2

also the 7I77 encoders are first (0 through 5) then encoder 6 is the 7I76 spindle encoder
The following user(s) said Thank You: mwyl

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

More
16 Jun 2017 19:02 #94619 by mwyl
Replied by mwyl on topic linuxcnc
Two weeks ago, I had the problem where I put the 7I77 and 7I76 on the wrong connector.

I did not realize that the first six encoders would be on the 7I77. That is something I have to be aware of.

On another note, how did you identify that I was using the 7I77_7I76 config? I am having trouble identifying what the problems are and it is slowing down my progress.

Everyone has been so helpful. Thank you for all the responses!

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

More
16 Jun 2017 19:46 #94623 by andypugh
Replied by andypugh on topic linuxcnc

TOn another note, how did you identify that I was using the 7I77_7I76 config?


You showed the dmesg output, which shows the pinout on the 5i25 connectors, and those match the ones from the 7i76 and 7i77 manuals.
The following user(s) said Thank You: mwyl

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

Time to create page: 0.139 seconds
Powered by Kunena Forum