qtvcp issues

More
02 Nov 2018 17:35 #119837 by cmorley
Replied by cmorley on topic qtvcp issues
Ok I pushed work on dialog placement.
Now if 'onwindow' is in the geometry string the positions are relative to the main window.
eg in the handler file:
self.w.tooloffsetdialog._geometry_string='0 0 600 400 onwindow'
Or you could change the preference file entry for that dialog to the same text.

Chris M

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

More
03 Nov 2018 17:04 - 03 Nov 2018 17:13 #119870 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
I’m still working on my jogging functions to get these to link into linuxcnc.
Step size with global: "self.jog_step"
Jog rate with global: "self.jog_rate_selected_out"
Continuous or step mode selection with: "def pbtn_jog_method_toggled(self,pressed):"

I have the keyboard embedded and real happy with with he way it fits in.
The upper area of the mdi panel is reserved for midi history and the lower is for the mdi input line. The mdi input line is not showing because its position has not been correctly set yet and is hidden.

There are some pictures of the manual mode linear jogging buttons and the keyboard.



Attachments:
Last edit: 03 Nov 2018 17:13 by auto-mation-assist. Reason: Added notes on midi panel

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

More
03 Nov 2018 17:46 #119872 by cmorley
Replied by cmorley on topic qtvcp issues
That looks great!
Looks like the button labels are changing properly now.

Jogging I would suggest using action buttons for jogging buttons.
jo_joint_pos_action and jog_joint_neg_action are for positive and negative direction (use momentary buttons) setting the joint_number to the appropriate axis number.

For jogging increment buttons:
jog_incr_action sets a global variable for current jog increment.
By setting the properties incr_imperial_number and incr_mm_number it also takes care of switching units in G20/G21 modes.

In this way the GUI is aware of your jog increments so things like status_label can be used to display the current jog increments.

You can certainly roll your own if you have some good reason to, but I would still suggest letting qtvcp know about it by using the ACTION / STATUS library.
eg.
ACTION.SET_JOG_INCR(.010)
rate = STATUS.get_jog_increment()

Noting these expect the rate to be in machine units no matter what G20/G21 mode you are in.

Chris M

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

More
03 Nov 2018 18:27 #119875 by cmorley
Replied by cmorley on topic qtvcp issues
About Github and sample configs.

Looks to me you have forked linuxcnc on github.

checking out qt5vcp and making sure it's current - you probably already do this:
git checkout qt5vcp_py2
git pull

So then if you make a new branch based on qtvcp:
git checkout -b x1mill_branch

Then copy your UI and handler files into configs/sim/qtvcp-screens
then copy and paste the qtdefault.ini file into the same folder and rename it to x1MILL.ini
open that and change the line (heading under [DISPLAY]):
DISPLAY = qtvcp
to:
DISPLAY = x1MILL -d
The -d is for debugging mode - you can change that if you like.
Confirm that that loads and runs (Yaa a simulated config!)

Now commit those files.
cd into the configs/sim/qtvcp-screen folder and add/commit the files
git add x1MILL.ini x1MILL.ui x1MILL_handler.py
git commit
write your commit message and save the commit file.

If you have installed gitk then I like to use it to look at what I did:
simply enter 'gitk' in the terminal that is cd'd somewhere into the linuxcnc folder.
The top commit should be your the commit you entered.
If you click on the commit you can see the changes made.

ok check that pushing to the repo is gonna work ok -that depends on how you set up github:
git push --dry-run
all good then actually push:
git push

Then everyone should be able to pull your changes.
I would suggest doing all your work on that branch now - committing as you hit milestones (read that: often)
and pushing to the repo when you want to share.

Hopefully i didn't tell lies and that helps you figure out how to create a sample config.

Chris M

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

More
03 Nov 2018 19:34 #119876 by cmorley
Replied by cmorley on topic qtvcp issues

That looks great!

You can certainly roll your own if you have some good reason to, but I would still suggest letting qtvcp know about it by using the ACTION / STATUS library.
eg.
ACTION.SET_JOG_INCR(.010)
rate = STATUS.get_jog_increment()

Noting these expect the rate to be in machine units no matter what G20/G21 mode you are in.

Chris M


This is why it's really helpful to work with someone on a project - forces you to look at things with 'new' eyes.
I see some errors in the library that I must fix.
eg.
ACTION.SET_JOG_INCR(.010)
should require a text entry too:
ACTION.SET_JOG_INCR(.010, '.010 in')

Thanks!
Chris M

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

More
03 Nov 2018 20:35 #119881 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
Chris,

On a number of occasions you have mentioned "the preference file". The only preference file that I know about and called out in my .ini file is:
/configs/x1Mill/x1Mill_preferences (used by gmoccapy).

I believe you are talking about a preference file related to QT specific items instead. Something has a mind of its own when it comes to on screen locations.

For example in the .ini file I have:
[DISPLAY]
DISPLAY = qtvcp -d -g 1024x768+0+0 then .ui location,
It no longer goes to 0.0 on the screen since a pull in the last day or so. Comes up in the center now instead of where it was commanded to go.

For me the dialogs continue to move where they should not move to so I need to clear out the illusive preference file.

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

More
03 Nov 2018 21:15 #119883 by cmorley
Replied by cmorley on topic qtvcp issues
The preference file in in your home folder - it is hidden so you must set your file browser to show hidden files.
It's default name is .qtvcp_screen_preferences

I haven't tested the -g option in qtvcp for some time but it has nothing to do with the preference file. (I will check it now though)

If you use the command similar to :
self.w.tooloffsetdialog._geometry_string='0 0 600 400 onwindow'
(put it in the intialized__ function)
in the handler then it will override the preference file.

Chris M

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

More
03 Nov 2018 22:00 #119885 by cmorley
Replied by cmorley on topic qtvcp issues
Ok I think I know what the dialog placement problem is - empty preference file will trip it up....i ddin't test that :)

main screen placement with;
DISPLAY = qtvcp -d -g 1024x768+0+0 then .ui location,
works for me.

Chris M

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

More
03 Nov 2018 22:26 - 03 Nov 2018 22:26 #119887 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
Note on custom jog rate selection buttons in x1Mill gui.

In the 1xMill gui jog rate is determined by the states of the following buttons; position jog mode, linear jog mode, angular jog mode, and slow and fast jogging buttons. For actual rate values it uses the values produced by six slider type widgets. It also includes logic required to output the correct jog rate value for any combination of buttons and value changes made by the slider type widgets.

The eleven items of this group produce two signals, a jog rate value for each possible combination of buttons and a fast/slow selection signal that will interface with linuxcnc. This group of eleven items can be considered as being a custom action widget.

The use of separate slow and fast jogging buttons help reduce human errors during fast slow selection process.
Last edit: 03 Nov 2018 22:26 by auto-mation-assist.

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

More
03 Nov 2018 23:21 #119893 by cmorley
Replied by cmorley on topic qtvcp issues
What does position,angular and linear modes change?

Qtdefault has similar capabilities though in a different idiom.
Though it doesn't do angular jogging as the screen doesn't support more then 3 axis.
It also has only 3 jog increments.

i think your jogging screen would make a great widget for qtvcp

Chris M

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

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