How to add a new Mesa card to pncconf?

More
31 Aug 2019 14:37 #143725 by shasse
I have benefited greatly from pncconf over the years. I am now working on a project utilizing a Mesa 7i93 which is not an option in the tool currently. There is advice out there that works for specifying, for instance, a 7i43 and search/replace the 7i93, and I can get motors running with that (forum.linuxcnc.org/9-installing-linuxcnc...7i37-easiest-install). However, I'd like to be able to utilize things like the open loop and I/O testing in pncconf. I am wondering if there is documentation or a tutorial out there for how to add support for a new card into the pncconf python code. I think I could figure it out with some time investment, but if someone has some advice for how to start that would help me quite a bit. I'd be happy to write something more formal up once I am able to do it myself.

Thanks!

Scott

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

More
31 Aug 2019 14:39 #143726 by pl7i92
the mesa card is one thing the bitfile to pncconf a other
cmorney is working on crapping the pinfile and configrurating on that

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

More
31 Aug 2019 17:52 #143737 by tommylight

the mesa card is one thing the bitfile to pncconf a other
cmorney is working on crapping the pinfile and configrurating on that

:)
Edit that, please.
Thank you.

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

More
31 Aug 2019 18:30 #143741 by cmorley
Pncconf is a program I am so happy and frustrated that I made it.
I keep threatening to remove it from master but then someone comes along and mentions it was very useful to them.
When it works it is very useful to get people going. when it doesn't, it make users experience with linuxcnc lousy.
Looking at the 7i93 - it should be relatively easy to add it.
There is no documentation on it's code and it's old code that has been adapted again and again by someone who was learning to code :)
But it entails adding some stock firmware options and telling pncconf that 7i93 is a valid entry and a few basic assumtions about it (such as it's ethernet)
I'll try to look into it - but if you are using 2.7 you will be most likey out of luck

Chris M

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

More
31 Aug 2019 19:36 #143744 by shasse
I'm a software developer by trade, although not a professional python developer, so I am happy to try and take the task of adding the 7i93 to pncconf and documenting the process. If you gave me some pointers in the right direction that would be extremely helpful. I'd most likely work off of the 2.9 branch for pncconf.

From what I can see, some of the steps are:
* get the correct data structures for the 7i93 set up in private_data.py self.MESA_INTERNAL_FIRMWAREDATA, it is sort of a hybrid of a 7i92 and a 7i80HD.
* add the 7i93 to self._p.MESA_BOARDNAMES.append('7i93-Internal Data') in pncconf.py as the 7i93 uses the board-loaded firmware.
* add the 7i93 to
elif '7i76e' in boardname or '7i92' in boardname or '7i80' in boardname:
driver = 'hm2_eth'
in pncconf.py ~line 2153

anything else I am missing?

I'm happy to try this and make a PR for you to review if you are game. And thanks for all your work on pncconf.

Scott
The following user(s) said Thank You: rodw

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

More
31 Aug 2019 19:53 #143745 by cmorley
You are right on track!
I just pushed basically these changes to 2.8 and master.

The internal firmware I made could quite possible be wrong - i don't have the card nor a pinout of the firmware - also you way have different firmware on your card.

If mesaflash is on your system you can try pncconf's discovery mode.
you must check 'show advanced pages' on the start page for the option to show.
It's super on-the-edge-no-promises code but it should work.
At the very least it will should the mesa firmware pinout so you could form proper internal firmware data.

Keep me posted and I will fix bugs as they come up or even better i'd love pull requests of better code :)

Chris

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

More
01 Sep 2019 07:07 #143760 by pl7i92
it is the same as of 7i92 it coudt be loaded with multiple bit files that triggers the multiple options fail
therfor woudent it be good to get the DMESG readout for eth into pncconf and let the user decide on that values
ok i see also that the bitfile and dmesg going different as the pin file
as the bitfile refers the gpio to be special and the dmesg gets only the gpio LIKE the stepgens hardwar

A main tread opener you can use the same pncconf 5i25 file as the 7i92/7i93 is a 5i25 with eth in insted of pci/pciE

and OVERALL
Pncconf gives you only a basic Conf
you need to get into HAL/INI to get your system real state
so WHY not starting from bottom on a given 7i93 BASE conf as it is in Conf tread

WHAT are your datercards you pluged into the 7i93
Attachments:

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

More
01 Sep 2019 07:23 #143763 by cmorley
So I find it hard to understand what you are getting at.
The discovery option is the idea to address custom firmware - as long as the firmware basic blocks are something pncconf already knows about.
There is actually a way to add firmware manually (it's tedious)

Pncconf can actually configure a very complicated config - it's just that most don't utilize it as so.

I could bore you with how it's hard but very useful when it does work - There is a great amount of hidden knowledge coded in to pncconf from over the years.

Chris M

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

More
01 Sep 2019 14:57 #143783 by shasse
I've got the config basically working as is, and I'm fairly familiar with hal. I agree with what Chris said prior though that pncconf can generate sophisticated configurations if used properly. For instance the machine I am working on is a XXYZ servo gantry with tandem X motors. Generating the config by hand could certainly be done but will be much easier with the capabilities built into pncconf (with another forum post to come on the topic of servo gantries via pncconf once I get to that point!). I've got two 7i40s and one 7i37TA, but all that is working properly.

Pncconf can also facilitate machine wiring configuration, allowing testing of I/O and open loop servo testing, which is why I am interesting in getting the 7i93 card specifically working, so that the right drivers load within pncconf to enable those features. Otherwise, the config generation works fine using other cards as a base and searching/replacing.

My goal for this machine is to generate the entire config via pncconf, with some minor changes after the fact done via automated search and replace such as `sed`. In a non-profit volunteer-based hackerspace like ours that seems like the most feasible option for long-term maintenance.

Thanks,

Scott

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

More
01 Sep 2019 16:02 #143790 by pl7i92
agree it isbest for mantainance
so as you almost there cm saiing it will benefit others going the same way
your mashine is also a comen one and becomes more popular as prices falling monthly

time will bring things together maybe somtime even my preferd 7i92 will be a pncconf choice

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

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