Programming a 'custom' button
- beltramidave
- Offline
- Elite Member
Less
More
- Posts: 174
- Thank you received: 4
09 Apr 2013 22:15 #32485
by beltramidave
Programming a 'custom' button was created by beltramidave
So I have created several tabs using the right side virtual panel in Axis and populated them with buttons on a touch panel for simple XY positioning moves by calling MDI commands. Now I need to come up with a way for the operator to be able to program a 'custom' (already made but with no move commands) button without having to get into any software.
I would like to be able to either jog or use a manual MDI move to position my table where needed and then have a 'Program' button that when pushed would allow me to transfer those XY coordinates to a all ready made 'custom' button. I could have multiple 'custom' buttons, so the sequence would be:
1. manually move to desired position
2. press 'Program' button
3. select 'Custom' button to transfer coordinates
4. press 'Program' button again to deselect program mode
It would be really neat if there was also a way to change the text on the button as well, but this may be too much.
I am making progress learning how to program, but still need some help. Any ideas?
I would like to be able to either jog or use a manual MDI move to position my table where needed and then have a 'Program' button that when pushed would allow me to transfer those XY coordinates to a all ready made 'custom' button. I could have multiple 'custom' buttons, so the sequence would be:
1. manually move to desired position
2. press 'Program' button
3. select 'Custom' button to transfer coordinates
4. press 'Program' button again to deselect program mode
It would be really neat if there was also a way to change the text on the button as well, but this may be too much.
I am making progress learning how to program, but still need some help. Any ideas?
Please Log in or Create an account to join the conversation.
09 Apr 2013 23:19 #32490
by ArcEye
Replied by ArcEye on topic Programming a 'custom' button
Hi
My first question is 'what are you going to do with these custom buttons?'
It seems that you are trying to use them to store co-ordinates, but this may not be the best way to do it.
You cannot create a pyVCP button 'on the fly' AFAIK, and you can't create a new halui MDI entry without re-loading the .ini file.
pyVCP is a very simple system and a lot of what it can do is pre-set in the .xml, .ini and .hal files at startup
This was one solution where the same operation was required to be done at a set of non-pattern co-ordinates (later pages)
by generating gcode based upon co-ordinates marked using a button
linuxcnc.org/index.php/english/forum/20-...from-mdi-history-log
There will be many other ways to achieve what you want to do, depending upon what it is.
regards
My first question is 'what are you going to do with these custom buttons?'
It seems that you are trying to use them to store co-ordinates, but this may not be the best way to do it.
You cannot create a pyVCP button 'on the fly' AFAIK, and you can't create a new halui MDI entry without re-loading the .ini file.
pyVCP is a very simple system and a lot of what it can do is pre-set in the .xml, .ini and .hal files at startup
This was one solution where the same operation was required to be done at a set of non-pattern co-ordinates (later pages)
by generating gcode based upon co-ordinates marked using a button
linuxcnc.org/index.php/english/forum/20-...from-mdi-history-log
There will be many other ways to achieve what you want to do, depending upon what it is.
regards
Please Log in or Create an account to join the conversation.
- beltramidave
- Offline
- Elite Member
Less
More
- Posts: 174
- Thank you received: 4
10 Apr 2013 00:21 #32494
by beltramidave
Replied by beltramidave on topic Programming a 'custom' button
Arc Eye,
I want to use the 'custom' buttons to position my XY table from the coordinates that are transferred to the button. Nothing else will take place..I am just positioning a table. Basically, I have a screen full of virtual buttons with XY coordinates tied to them (MDI comands). I need a way for an operator to "add" a new position to a button. I was hoping that if I created a 'custom' button in my .xml file and tied it to a MDI command in the .ini file that I could somehow transfer my wanted position coordinates into my MDI command in the .ini file.
I want to use the 'custom' buttons to position my XY table from the coordinates that are transferred to the button. Nothing else will take place..I am just positioning a table. Basically, I have a screen full of virtual buttons with XY coordinates tied to them (MDI comands). I need a way for an operator to "add" a new position to a button. I was hoping that if I created a 'custom' button in my .xml file and tied it to a MDI command in the .ini file that I could somehow transfer my wanted position coordinates into my MDI command in the .ini file.
Please Log in or Create an account to join the conversation.
10 Apr 2013 03:14 #32500
by BigJohnT
Replied by BigJohnT on topic Programming a 'custom' button
I think it is time to teach an operator one more thing besides the XYZ coordinate, G0 and where the MDI entry box is. Much simpler way to reach the end.
John
John
Please Log in or Create an account to join the conversation.
- beltramidave
- Offline
- Elite Member
Less
More
- Posts: 174
- Thank you received: 4
10 Apr 2013 03:36 #32502
by beltramidave
Replied by beltramidave on topic Programming a 'custom' button
Wish that was an option as I agree. Unfortunately, this project requires that it is very simple to operate and make small
modifications as suggested. I will keep searching for a solution.
I understand now that I cannot make changes to the .ini file and have them take effect without restarting Axis.
Thanks for the feedback.
modifications as suggested. I will keep searching for a solution.
I understand now that I cannot make changes to the .ini file and have them take effect without restarting Axis.
Thanks for the feedback.
Please Log in or Create an account to join the conversation.
10 Apr 2013 06:17 #32506
by alan_3301
Replied by alan_3301 on topic Programming a 'custom' button
how about spinboxes to set the coordinates, and the button to execute a script that uses the spinboxes as inputs.
Please Log in or Create an account to join the conversation.
- beltramidave
- Offline
- Elite Member
Less
More
- Posts: 174
- Thank you received: 4
10 Apr 2013 09:21 #32508
by beltramidave
Replied by beltramidave on topic Programming a 'custom' button
Thanks, I will look into spin boxes. Could you elaborate a little more.
Please Log in or Create an account to join the conversation.
10 Apr 2013 15:04 - 10 Apr 2013 15:05 #32517
by ArcEye
Replied by ArcEye on topic Programming a 'custom' button
Hi
I don't think spinboxes or for that matter NumberLabels will work.
AFAIK they are uni-directional, spinboxes are designed for user input with an out pin and number labels are to display machine data with an in pin.
pyVCP is just a simple GUI with buttons etc that can send and receive limited data to/from hal pins.
It is not meant to store data for retrieval.
Whilst using it to execute halui commands containing M code scripts can make it quite powerful, it is still limited in its scope.
This can be done quite simply, but will require a component to do the processing and store the co-ordinates.
There could then be the option of writing co-ordinates to file and reloading them at start time, making them persistent.
I am out for a while and will give it some thought later
regards
I don't think spinboxes or for that matter NumberLabels will work.
AFAIK they are uni-directional, spinboxes are designed for user input with an out pin and number labels are to display machine data with an in pin.
pyVCP is just a simple GUI with buttons etc that can send and receive limited data to/from hal pins.
It is not meant to store data for retrieval.
Whilst using it to execute halui commands containing M code scripts can make it quite powerful, it is still limited in its scope.
This can be done quite simply, but will require a component to do the processing and store the co-ordinates.
There could then be the option of writing co-ordinates to file and reloading them at start time, making them persistent.
I am out for a while and will give it some thought later
regards
Last edit: 10 Apr 2013 15:05 by ArcEye.
Please Log in or Create an account to join the conversation.
10 Apr 2013 17:54 #32518
by alan_3301
Replied by alan_3301 on topic Programming a 'custom' button
Yeah sorry, I didnt realize you could only update the spinbox on the screen. I tried it and it didnt work.
Please Log in or Create an account to join the conversation.
10 Apr 2013 18:14 #32520
by BigJohnT
Sounds like it is time for you to write a custom GUI which can do anything you like.
www.gnipsel.com/linuxcnc/index.html
John
Replied by BigJohnT on topic Programming a 'custom' button
Wish that was an option as I agree. Unfortunately, this project requires that it is very simple to operate and make small
modifications as suggested. I will keep searching for a solution.
I understand now that I cannot make changes to the .ini file and have them take effect without restarting Axis.
Thanks for the feedback.
Sounds like it is time for you to write a custom GUI which can do anything you like.
www.gnipsel.com/linuxcnc/index.html
John
The following user(s) said Thank You: beltramidave
Please Log in or Create an account to join the conversation.
Time to create page: 0.088 seconds