Errors on mesa-card selection

More
6 years 3 months ago #175730 by Reinhard
Replied by Reinhard on topic Errors on mesa-card selection
Hi Chris,

I had time to test your work and I got tab-pages for all 4 7i73 cards now :)

I also experimented with the width of the comboboxes. From a sample glade file I realized, that axis property disappears, when I add "expand" to "fill" (might be default?).
So I handedited file mesa0.glade and removed "x_options" property of all "GtkComboBoxEntry"-entries.

Result looks promising:


and Comboboxes with translated content work now as expected:


... but pages of 7i73 stil look the same. I'd like to change width handling of that geometry-tables too, but I did not find the source for it.
I guess, the generated objects need to have a packing-section too.
... and I'd like to change max. size of pncconf window.
I noted, that pncconf already changes size on entering mesa configuration page.
So its possible - theoretically ;)

cheers Reinhard
The following user(s) said Thank You: tommylight

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

  • tommylight
  • Away
  • Moderator
  • Moderator
More
6 years 3 months ago #175773 by tommylight
Replied by tommylight on topic Errors on mesa-card selection
Schon, danke.
MFG,
Tom.

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

More
6 years 3 months ago #175852 by Reinhard
Replied by Reinhard on topic Errors on mesa-card selection
Hi,

I guess I got a bit further with research on text translations. I wondered, why pncconf does not use the translated texts of "I/O Connector #" ...
First I thought, it may depend on the leading blanks, but then I changed all connector entries from glade file to same format, which made it into linuxcnc.pot, but pncconf did not use the translated texts anyway.

So I searched the python files - and although I don't have any idea of python, I guess, I found the source of evil ;)

In pncconf.py there is a function called "on_mesa_boardname_changed", which will probably be called after using 'discovery option'.
So this line sets the text
Code:
self.widgets["mesa{}con{}tab".format(boardnum,i)].set_text('I/O\n Connector %d'%i)
and I guess, that 'set_text' does not fetch localized variant of that text.
I'm sorry, I don't know how to fix it, but may be a hint to help search.

cheers Reinhard

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

More
6 years 3 months ago #175855 by cmorley
Replied by cmorley on topic Errors on mesa-card selection
yes you have found at least a major part of the problem.
that line sets a default name for the tab. I could make it translatable I think.
But to get a specific name for the board is the code under that:
Code:
if 'Discovery Option' not in title: meta = self.get_board_meta(title) names = meta.get('TAB_NAMES') tnums = meta.get('TAB_NUMS') if names and tnums: for index, tabnum in enumerate(tnums): self.widgets["mesa{}con{}tab".format(boardnum,tabnum)].set_text(names[index])

This can put a specific text depending on the board name but discovered boards don't look up meta data.
I'm not sure why I did that but I can look into it.

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

More
6 years 3 months ago #175858 by Reinhard
Replied by Reinhard on topic Errors on mesa-card selection

... but I can look into it.

That would be very nice indeed! Thank you

Another issue, that begs for your attention is the handling of unknown/unsupported stuff (well, unknown to pncconf, not unknown to linuxcnc).

When you try the sample data, I provided, you find such issues on first tab page (I/O connector 2):

you can see the first 4 channels as "unused" with pin-type "sserial ..."

Output of pncconf discovery option looks like:
Code:
discovered sserial: [] unknon module - setting to unusable SSI DATA unknon module - setting to unusable SSI SCLK unknon module - setting to unusable BISS DIN unknon module - setting to unusable BISS DIN unknon module - setting to unusable BISS DIN unknon module - setting to unusable BISS DIN unknon module - setting to unusable BISS CLK unknon module - setting to unusable BISS CLKEN unknon module - setting to unusable BISS CLK unknon module - setting to unusable BISS CLKEN unknon module - setting to unusable BISS CLK unknon module - setting to unusable BISS CLKEN unknon module - setting to unusable BISS CLK unknon module - setting to unusable BISS CLKEN
... so the last word of a line is the pin-type and the word before last word is the function.
What do you think about using that texts as combobox entries which are disabled like now. That way the user could verify function and pin-type and use it in self written halfile extensions ...

Don't know, whether its possible. If so, would be helpful to add some hints as comments to halfile such as correct pin names or the like.

Last not least - the support of analog inputs. Currently there's a choice between 'unused' and 'user defined type', which leads to unused - so there's no choice at all.
Would be nice to have a choice which leads to correct pin-names in halfile. Even if they are not connected or added as comment only - it would probably help a lot, to have the names there.

cheers Reinhard

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

More
6 years 3 months ago #176007 by Reinhard
Replied by Reinhard on topic Errors on mesa-card selection
Hi,

next roundup of testing/feedback:

first: I miss the choice of GPIO on unused encoders/steppers/whatever ...
If I get output of mesaflash and hal show pin right, then every pin can be used as gpio.

Then I run into troubles of using different modes with 7i73 card - and I don't know, what pncconf will handle. If I understand things right, it should assists new users with configuration, so that they don't have to bother with output of mesaflash or hal show pin - right?
If so, than current input for discovery option does not suffice. Especially with 7i73 pin names change with setup-jumpers from card. If you use keypad, than you loose that number of input and output pins.
Column 'Typ' shows the pin-names with no-keypad jumpered and column '8x8' shows the pin-names with 8x8 keypad jumpered.
.


Without knowing that behaviour of the 7i73 card, I configured pin-usage with pncconf and run into troubles like this:
Code:
hm2/hm2_5i24.0: registered hm2_5i24.0: initialized AnyIO board at 0000:01:05.0 ./rma01.hal:83: Pin 'hm2_5i24.0.7i73.0.1.input-16' does not exist Shutting down and cleaning up LinuxCNC... Running HAL shutdown script hm2_5i24.0: dropping AnyIO board at 0000:01:05.0 hm2/hm2_5i24.0: unregistered RTAPI_PCI: Unmapped 65536 bytes at 0x7f86947a4000 hm2_pci: driver unloaded hm2: unloading
First I thought the error could be some spelling difference ...
until I run hal show pin and saw the misery ;)

Having fixed that pin problems, I run into the next troubles:
Code:
hm2_5i24.0: initialized AnyIO board at 0000:01:05.0 ./rma01.hal:162: Signal 'x-pos-fb' can not add OUT pin 'hm2_5i24.0.encoder.04.position', it already has OUT pin 'hm2_5i24.0.stepgen.08.position-fb' Shutting down and cleaning up LinuxCNC...
Hum ...
just used pncconf without any handcoded extensions.

So I searched hal file for 'x-pos-fb':
Code:
$ grep x-pos-fb rma01.hal net x-pos-fb => pid.x.feedback net x-pos-fb <= hm2_5i24.0.stepgen.08.position-fb net x-pos-fb => joint.0.motor-pos-fb net x-pos-fb <= hm2_5i24.0.encoder.04.position net x-pos-fb => joint.0.motor-pos-fb
Similar result for every axis configured.

I attach an output of hal show pin with two 7i73 jumpered differently
Attachments:

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

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