Bridgeport Torq-Cut TC4G Retrofit

More
5 years 8 months ago - 5 years 8 months ago #200140 by chopper79
GE = greater equal to ? Opposite for LE?

I will finish up the sub and give it a try to see what happens.

If high gear is already selected then it should just pass the S value and not attempt to change into high gear again or do I need to have a ELSE in there somewhere? Maybe it will just pass it through as we are already in high gear than this condition is TRUE so do nothing.

Hate to try to change into high gears when it is already in high gear. Just a wasted attempt and time I would think.

Something like IF this DO this ELSE do this. Maybe using a elseif would work as well? I am trying to learn this as I go and using the docs to come up with something simple but solid in function.

Education never ends..
Last edit: 5 years 8 months ago by chopper79.

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

More
5 years 8 months ago #200143 by ZincBoy
It looks reasonable to me. I think you might have to use the #<_hal[pin]> method to access the current spindle speed in order to determine if you are at 0 rpm.

For my mill I implemented the gear change with a hal component but I need to turn the spindle slowly when changing gears. I also have it trigger the gear change on an M3 or M4 instead of when S<rpm> is called. Mostly because the spindle is expected to rotate on an M3/4 and not on an S.
The following user(s) said Thank You: chopper79

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

More
5 years 8 months ago - 5 years 8 months ago #200169 by Michael
Yes GE is greater or equal and LE is less or equal. EQ is equal.

M66 the high gear and low gear switch at the beginning of the two different parts and then else into what you basically have. This would probably need to look at parameter #5399 and look for a value GT 0. (since normally we are looking for -1 and triggering an abort) then go into else statements of you expect it to be false. You might have to break this into a bunch of small parts.

I am not good at any of this stuff and just recently started learning so double check the o code section of the documents section
linuxcnc.org/docs/2.8/html/gcode/o-code.html#ocode:conditional

So far I have figured out that it's easy to write out a sub to do something but it's a lot more difficult to figure out all the odd situations that may come up. In my case I am hoping I made my routine capable of removing my tool with a M6 T0

Fun stuff though.
Last edit: 5 years 8 months ago by Michael.
The following user(s) said Thank You: chopper79

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

More
5 years 8 months ago - 5 years 8 months ago #200171 by chopper79

ZincBoy wrote: For my mill I implemented the gear change with a hal component but I need to turn the spindle slowly when changing gears. I also have it trigger the gear change on an M3 or M4 instead of when S<rpm> is called. Mostly because the spindle is expected to rotate on an M3/4 and not on an S.



I did some testing on gear shift while rotating and I get some meshing noise. I also tried to shift it at a few different rpm points with the same results. The parameter sheet with the mill says that shift speed is 11. Maybe some meshing noise is normal and I should not worry about it.

Either way I will give it a couple attempts this weekend and see what the results are.

Thank you
Last edit: 5 years 8 months ago by chopper79.

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

More
5 years 8 months ago #200172 by chopper79

Michael wrote:
So far I have figured out that it's easy to write out a sub to do something but it's a lot more difficult to figure out all the odd situations that may come up. In my case I am hoping I made my routine capable of removing my tool with a M6 T0

Fun stuff though.


That is what I am running into when thinking about the subroutines is what if this happens. Also other items such as you stated the M6T0 to remove the tool. I want to look at changing my sub so the ATC removes the tool if one is left in the spindle by accident. This would need to happen on the first tool change. Essentially Call any tool and the first move is to clear the spindle as sometimes I may forget to clear the spindle before shutting down. (It happens) Once this has happened then the sub functions as normal.

Looking to see if there is a retentive memory location that the last tool in the spindle was saved to a location so when the next time you fire the machine up it knows that Tnn is in the spindle. This will be something down the road to look at as well.

I have a lot of ideas on what I would like to have on the controller, just no clue as to how to implement them as of yet. Some of these are I/O screen for diagnostics, tool changer recovery, and other misc items that aid in troubleshooting.

I plan on keeping this machine for awhile so eventually I will just keep trying stuff out and learn what I can do implement some of the ideas I have. right now I just need to get the machine finished and functioning then I can add stuff later.

If it was easy then it would be no fun. So here is to fun!

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

More
5 years 8 months ago #200463 by chopper79
Working on the S word remap a bit and have run into a snag.

When I try to launch LCNC and error occurs

S/setspeed_epilog: Python argument types in
None.None(Interp,float)
did not match C++ signature: None(Interp {Ivalue},int, double))

Not sure what has went wrong at the moment. Using the standard python files that are built into LCNC and based on the documentation S remap is standard function.

Using REMAP= S prolog=setspeed_prolog ngc=gearchange epilog=setspeed_epilog

Is there something in the python files that needs changed for the S remap to work?

Attached is the stdglue python file and subroutine

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

Time to create page: 0.211 seconds
Powered by Kunena Forum