Remap of S code
- LearningLinuxCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
22 Jul 2015 08:48 #60816
by LearningLinuxCNC
Remap of S code was created by LearningLinuxCNC
My milling machine has a mechanical variable speed head on it. I need to use it to adjust the speed of the spindle at this point. What I want to do is to remap the S command so that it does the following:
Can I do this with a simple remap using an O code? I don't think I can do the ok dialog box with the O code.
Has anyone else already done this same thing or something similar so I can see a sample or implement your remap?
Thanks
- Check the requested speed against a previous speed parameter if it has not changed then don't do anything
- If it did change then do the following.
- Save the status of the spindle running in a parameter
- If the spindle is not turning start the spindle turning in the clockwise direction as the spindle must be turning to adjust the speed
- Pop up a dialog box with an OK button that states what speed is needed.
- Pause progression until the OK button is pressed
- Once the user adjusts the speed of the spindle they press the OK button
- Stop the spindle from rotating if it was stopped prior to the spindle speed change. If it was running prior to the spindle change then keep it running
- Store the new speed as the previous speed for the next S code
Can I do this with a simple remap using an O code? I don't think I can do the ok dialog box with the O code.
Has anyone else already done this same thing or something similar so I can see a sample or implement your remap?
Thanks
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
23 Jul 2015 10:07 #60840
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Remap of S code
So no responses I guess means I am on my own. I do have another question though. In the remap examples it uses the emccanon library function message subroutine. Where can I find documentation on emccanon? Is there a dialog box like I am wanting to use with an OK button already set up and ready to use in the emccanon library?
I am using gmoccapy so i think that I could also do this with an O code subroutine that uses the M64 M65 commands to turn on an output pin that would trigger a gmoccapy.messages.okdialog-waiting. Not sure if this would work or not. May have to give it a try.
Any feedback is appreciated.
I am using gmoccapy so i think that I could also do this with an O code subroutine that uses the M64 M65 commands to turn on an output pin that would trigger a gmoccapy.messages.okdialog-waiting. Not sure if this would work or not. May have to give it a try.
Any feedback is appreciated.
Please Log in or Create an account to join the conversation.
23 Jul 2015 18:18 - 23 Jul 2015 18:21 #60851
by BigJohnT
Replied by BigJohnT on topic Remap of S code
I just run my BP with a vari-speed pulley at 1800 RPM and have a M0 after the tool change and spindle start then turn the dial to the speed I want. I use 900 RPM for tapping. Unless you have an automatic tool changer your there anyway. A pop up message is done in G code with (MSG, Set Spindle to 2000). Put this before the M0.
JT
JT
Last edit: 23 Jul 2015 18:21 by BigJohnT.
The following user(s) said Thank You: LearningLinuxCNC
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
23 Jul 2015 20:14 #60856
by LearningLinuxCNC
So you have changed your post processor to add the MSG line and M0 line after every tool change instead of remapping anything?
I will take a look at the post processor and see what it would take to add such functionality.
Replied by LearningLinuxCNC on topic Remap of S code
I just run my BP with a vari-speed pulley at 1800 RPM and have a M0 after the tool change and spindle start then turn the dial to the speed I want. I use 900 RPM for tapping. Unless you have an automatic tool changer your there anyway. A pop up message is done in G code with (MSG, Set Spindle to 2000). Put this before the M0.
JT
So you have changed your post processor to add the MSG line and M0 line after every tool change instead of remapping anything?
I will take a look at the post processor and see what it would take to add such functionality.
Please Log in or Create an account to join the conversation.
23 Jul 2015 22:04 #60860
by BigJohnT
Exactly, what CAM software are you using?
JT
Replied by BigJohnT on topic Remap of S code
So you have changed your post processor to add the MSG line and M0 line after every tool change instead of remapping anything?
I will take a look at the post processor and see what it would take to add such functionality.
Exactly, what CAM software are you using?
JT
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
23 Jul 2015 22:35 #60861
by LearningLinuxCNC
I am using Inventor HSM Express and Fusion 360. I think they both use the same post processor files.
Replied by LearningLinuxCNC on topic Remap of S code
Exactly, what CAM software are you using?
I am using Inventor HSM Express and Fusion 360. I think they both use the same post processor files.
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
24 Jul 2015 01:10 #60864
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Remap of S code
Big John,
I took a look at the post processor files over lunch. Looks like it should be fairly simple to make the changes. I will try it tonight and let you know how it goes.
I took a look at the post processor files over lunch. Looks like it should be fairly simple to make the changes. I will try it tonight and let you know how it goes.
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
24 Jul 2015 10:19 #60874
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Remap of S code
Big John,
I modified the post processor with the MSG and the M0 lines after a tool change and it looks like it will work fine for what I want. Thanks for the suggestion.
I may try the remap anyway just to see if I can get it to work.
I modified the post processor with the MSG and the M0 lines after a tool change and it looks like it will work fine for what I want. Thanks for the suggestion.
I may try the remap anyway just to see if I can get it to work.
Please Log in or Create an account to join the conversation.
Time to create page: 0.079 seconds