7i43 firmware reconfiguration or new firmware?

More
20 Jun 2011 19:00 #10676 by andypugh
kostas wrote:

Can you also make one of the encoders have only the A encoder pin? In other words, the configuration of A+B encoder pins is global or defined per encoder?


How fast does that encoder need to count? You could possibly use the software encoder counter connected to a GPIO pin if it is below 500hz. (You could go higher with a fast thread, but that seems eccentric with a Mesa card config)

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

More
20 Jun 2011 19:11 - 20 Jun 2011 19:13 #10678 by kostas
I will connect a tachometer (1 pulse / rev) for a motor running at 35000 RPM, so it's over 500Hz. I wouldn't want to put more load in the CPU though, I prefer to have an unused pin at the 7i43 encoder if I can't help it. I'm just very close to 48 pins though, even with Peter's help, that's why I'm asking this.

BTW, I have a question. I thought that the 7i43's encoders only work with quadrature counting. How can it work if it only has one channel? Or is this a stupid question?
Last edit: 20 Jun 2011 19:13 by kostas.

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

More
20 Jun 2011 23:15 #10687 by andypugh
kostas wrote:

BTW, I have a question. I thought that the 7i43's encoders only work with quadrature counting. How can it work if it only has one channel? Or is this a stupid question?


You can set an encoder to "counter mode". See "encoder" here:
www.linuxcnc.org/docview/html/man/man9/hostmot2.9.html
If you just ignore the "direction" pin then it counts up.

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

More
20 Jun 2011 23:24 #10688 by PCW
As far as different encoders having different numbers of pins goes, this is fine. The HostMot2 firmware build process is mostly defined by the pinout so almost any kind of pinout is possible.

A one input counter works because the HostMot2 encoder counter has a up/down mode (in this mode A is count and B is direction) There is one peculiarity of this setup: unused module inputs are terminated at a '0' level, so if the B input is not present, the B input to the encoder counter with the missing B connection will be tied low, so the counter will always count down. This should be fixable either with a negative scale or a hal comp.

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

More
24 Jun 2011 13:59 #10839 by kostas
I'm back PCW. This is the pinout I would like to have:

P3
1 dir
3 pwm
5 encoder A
7 encoder B
9 GPIO
11 GPIO
13 dir
15 pwm
17 encoder A
19 encoder B
21 GPIO
23 GPIO
25 dir
27 pwm
29 encoder A
31 encoder B
33 GPIO
35 GPIO
37 dir
39 pwm
41 encoder A
43 encoder B
45 pwm without dir
47 encoder single channel

P4
1 encoder A
3 encoder B
5 encoder A
7 encoder B
9 encoder A
11 encoder B
13 encoder A
15 encoder B
17 GPIO
19 GPIO
21 GPIO
23 GPIO
25 GPIO
27 GPIO
29 GPIO
31 GPIO
33 GPIO
35 GPIO
37 GPIO
39 GPIO
41 GPIO
43 GPIO
45 GPIO
47 GPIO

7i43 is 400K

Thanks in advance,
Kostas

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

More
24 Jun 2011 15:37 #10844 by PCW
Can you give the desired order of the encoders and PWM gens? (0,1,2 etc)?
This is important because the driver only allows you to enable 0 through N of any module (in other words you cannot enable only PWM 0,1 and 3 for example)

If I put them in the wrong order and you dont enable all modules (looks like you have 5 PWMs and 8 encoders), you may not end up with enabled modules on the pins you expected...

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

More
24 Jun 2011 19:14 #10846 by kostas
Yes, of course. It doesn't matter much though, since I plan to use all of the pins in this exact configuration. But it will be good for me to have options, I guess.

pwm order number will increment with the pin numbers, so:
pwm0=P3(1,3)
pwm1=P3(13,15)
pwm2=P3(25,27)
pwm3=P3(37,39)
pwm4=P3(45)

Same with the encoders, except for pin P3(47) which I'd like to have in the end of the list, so the order will be:
enc0=P3(5,7)
enc1=P3(17,19)
enc2=P3(29,31)
enc3=P3(41,43)
enc4=P4(1,3)
enc5=P4(5,7)
enc6=P4(9,11)
enc7=P4(13,15)
enc8=P3(47)

I plan to search and learn how to configure the pinout myself in the near future, so I will not be a burden next time if I need minor modifications.

Thanks again!

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

More
24 Jun 2011 20:32 - 24 Jun 2011 20:34 #10848 by PCW
firmware is here:
freeby.mesanet.com/kostas.zip
The zip file include the bitfile, a text (.pin) documentation file,
and the VHDL pin file with your specific configuration/pinout.

This last file is not needed but is included as a reference if you want to
learn what determines the pinout/configuration of HostMot2 firmware
Last edit: 24 Jun 2011 20:34 by PCW.

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

More
24 Jun 2011 20:41 #10849 by kostas
That was very fast! I appreciate it a lot, Peter. Thanks again!

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

More
24 Jun 2011 21:35 #10850 by PCW
Welcome
Its really easy to change pinouts.and configs, basically just edit
an existing PINXXX file with copy/paste and re-compile...

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

Moderators: PCWjmelson
Time to create page: 0.148 seconds
Powered by Kunena Forum