Errors on mesa-card selection

More
18 Jul 2020 14:27 #175043 by Reinhard
Hi Chris,

It seems your window manager does a terrible job rendering pncconf.

That's easy explained:
KDE is based on Qt and Gtk is the window-system of gnome. The position of kde-people expressed in my words: we don't like gnome but they have some applications, we can't bet, so we have to support it. But let's do it as ugly as possible, that nobody changes to gnome ...

KDE is fat and unstable (caused by Qt) and I would not use it, if other window-managers would offer the same features, I use. Currently there is no alternative to kde, so I have to stay.
.

This I what I see in cinnamon:

Well, cinnamon is a fork of gnome, so sure it will look better than kde support for gtk :dry:
.

Translations shouldn't interfere with pintype

Well, it did. I translated "Quad Enc-A", "Step Gen-A" and "Dir Gen-B" and on next restart of pncconf there where no pintype-comboboxes at all.
.

Tab names are probably built on the fly so can't currently be translated.

language-database contains labels " I/O\nConnector #" with leading blancs before "I/O" but on notebook-tabs the labels don't have leading blancs - could it be possible, that label definition has leading blancs, which get stripped programmatically so that language support takes the text for different texts?
.

Thanks for the feedback. I'll try to fix some of the issues soon.

That's my way of say thank you and to show, that I appreciate your work.

cheers Reinhard

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

More
19 Jul 2020 04:10 - 19 Jul 2020 04:59 #175105 by Reinhard
Hi Chris,

I tried a new installation of debian with cinnamon desktop.
Its by far the slowest desktop system I ever tried. Pretty good looking, but so slow - no! Not an option for me.
If I wanted to wait for the os to become ready on every action, I could use windows :(

So I'll have to stay with kde ;)

cheers Reinhard

P.S.: I tweaked private_data.py for use of 7i73 - may be you find it useful

File Attachment:

File Name: private_data.py.txt
File Size:1 KB


P.P.S.: this is an error message for a combobox-failure on translated texts:
.
/usr/local/src/linuxcnc-dev/bin/pncconf:3034: GtkWarning: gtk_combo_box_real_get_active_text: assertion 'GTK_IS_LIST_STORE (combo_box->priv->model)' failed
  widgetptype = self.widgets[ptype].get_active_text()
**** WARNING: PNCCONF data to widget: ptype not recognized/match: PWM Gen-P None
**** WARNING: PNCCONF data to widget: ptype not recognized/match: PWM Gen-D None
Attachments:
Last edit: 19 Jul 2020 04:59 by Reinhard.

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

More
19 Jul 2020 20:42 #175196 by cmorley
Cinnamon: I have not tried it on Debian - works fine enough for me on Mint.
I also have not tried KDE so might not know what I'm missing :)

I think I fixed all the double text in the combo boxes you reported.

7i73 - yes I guess I/O might be to cryptic for some - I should change the other cards too.

translations:
When you change the translations are you loading a previous saved config?
If so, that is probably the problem. - I see pncconf saves the translated pin type text.
So a saved config would have different text then a newly made one.

pin signals don't have this problem because they get saved as converted pin signal names that don't change with translations.

You could confirm this by trying to build a new config with your new translations.
I think it would work fine then.

Chris

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

More
20 Jul 2020 14:25 #175255 by Reinhard
Hi Chris,
.

I also have not tried KDE so might not know what I'm missing

Nothing so far :)
I heavily use double click on window title as maximize vertical only - very handy ;)
Cinnamon offers that functionality too.

Then I like saved session to be restored on each login. I use several virtual desktops with dedicted applications on each and I love it, when all apps are at their places
Then I'm a hooked user of krusader and kmail - for me, both are without alternatives.
But that's of cause very subjective and does not need to be true for you.
On the other side I use gvim - for me the only usable editor :woohoo:
.

7i73 - yes I guess I/O might be to cryptic for some

No, nothing cryptic.
But on 7i73 the pins are sorted by direction, so the first tab contains only inputs, whereas the second tab contains only outputs.
I found it useful to tell that through the tab labels.
.

When you change the translations are you loading a previous saved config?
If so, that is probably the problem. - I see pncconf saves the translated pin type text.

May be, you'd like to change that.
Think about exchanging configuration files and be able to verify it in your language - even if users use different language?
May be - its not important for you.

For me, it was always a requirement to differ between application data and user data. Only the latter may be translated and may not affect behaviour of application.
.

You could confirm this by trying to build a new config with your new translations.

when I have time, I'll create a new config.
The last runs I did only to give you a qualified feedback. I had no need for the changes.

cheers Reinhard

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

More
25 Jul 2020 12:11 #175730 by Reinhard
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
Attachments:
The following user(s) said Thank You: tommylight

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

More
25 Jul 2020 18:39 #175773 by tommylight
Schon, danke.
MFG,
Tom.

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

More
26 Jul 2020 04:43 #175852 by Reinhard
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
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
26 Jul 2020 05:18 #175855 by cmorley
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:
        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
26 Jul 2020 06:31 #175858 by Reinhard

... 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:
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
Attachments:

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

More
27 Jul 2020 06:01 #176007 by Reinhard
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:
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:
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':
$ 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.237 seconds
Powered by Kunena Forum