PDA

View Full Version : Modify C2 Command



dynajet
06-26-2014, 01:23 PM
I would like to change the C2 command to end with the height of the Z axis to be 2.5" so that I can replace my dust collector back on without having to raise the Z axis.

adrianm
06-26-2014, 02:02 PM
The C2 command will pull back by the amount you have the Safe Z Pullup set to in your VC settings.

Be aware it's an amount back from where the zero is rather than an absolute value so if you have limited Z movement (shouldn't be a problem on a Buddy but would be on a desktop) it could top out with a longer bit.

I added another sensor to the top of my Z axis and modified the C2 routine to pull up until that sensor was hit.

scottp55
06-26-2014, 02:26 PM
Adrian, Would you mind posting that upper prox routine. Dana steered me to the original post (Thanks Dana), but it was in a thread I would not normally find in a search. Others might find useful if the title had keywords in it. I know there are others like me that have a hard time comprehending code and we're learning but still very nervous. It would be very useful to Desktoppers. Totally understand if you don't. Thanks for all the help to people.:)

dynajet
06-26-2014, 02:32 PM
Thanks Adrian for your reply.

srwtlc
06-26-2014, 03:14 PM
If you don't want your safe z to always be that height, it would be better to hard code it in the zzero.sbp file. Any time you or a file issues a JH, it will also retract to the safe z setting before jogging home.

The current SB3 release C2/zzero routine has the capability to raise to a prox switch on the z axis and back off the prox by 0.125 built in. It does however need to be enabled by rerunning set up or doing it manually. It also saves the offset for the last zeroed tool so that you can return to it upon shutdown/restart. One caveat, I've found some errors in the file/implementation of it that haven't been addressed yet. I've fixed it for myself, but it would get a bit lengthy to explain at the moment.

scottp55
06-26-2014, 05:00 PM
Scott, I just reinstalled 3.8.14 a couple days ago. Our Desktops were both given additional X,Y,Z prox's. Gordon wired the additionals in series(I forget the input he used, and machine is shut down at the moment). I do know I have to change the switch settings from the defaults to use them.
How do I enable that feature(In Baby talk please)?
Does the fact that they are wired in series matter?
Your Caveat; Does that apply to the touch sensor/retract .125" or the remember last bit OR both.
Just to clue you in, I don't know whether to use a 16oz claw or a 20oz straight to make a volt pay attention.
Thanks

srwtlc
06-27-2014, 12:34 AM
Scott,

If your Z prox is wired up properly, I would think that it would be (should be) on input #5. If you go to Values Input/Output (VN), make sure that input #5 is set to Nrm Closed Limit. Ok out of that. The input indicators for 2, 3, and 5 on the position window should appear the same for each one (if off the proxes). At that point, you should be able to raise the Z axis up until it hits the prox and all the input lights should go out (just the same as if you moved X and Y onto the proxes). If it doesn't and you hit the hard stop, then the prox is likely on a different input #.

Once you know that the Z prox works, you can run setup again with TS. On the second page, you should have a check mark in the first three under 'Do you have any of the following accessories'. Don't change any of your settings as you go 'Next-Next' until done. Now, here's the first issue I saw on my machine, the setup didn't write the needed info to the my_variables.sbc file and I had to manually enter it. Check this out by going to C:\SbParts\Custom and opening the my_variables.sbc file in an editor and look to see if this line is present '&my_hasZProx = 1'. If it is, good. If it isn't, add it after the 'These values are used in the ZZero routine' line (doesn't really matter where). Save it if you did have to add it.

At this point, you should be able to run the zzero routine with C2 and if you are using the standard, unedited zzero.sbp file, the tool should zero to the plate as normal and then pull up until the Z prox is hit and then back off (down) 0.125". The offset distance from Z zero to the prox has been saved. Upon machine shutdown/startup, if you do a C3 to home the machine, it will also ask if you want to reset the Z axis to the last Z zero measurement.

The other issues I found were in the files for C2 and C3, but they may have updated these and re-released them by just updating the current version. Although, I see one that hasn't been changed and it may not bother with the desktop. Since I have an 8" Z axis, there was a value that didn't command enough travel to hit the prox if I started zeroing at a certain height off the table. It took quit a while before I figured out that a given negative times another given negative in the routine wasn't giving a large enough positive to allow enough travel for an 8" Z. It looks like the C3 file still has the issue where if you answer that you don't want to reset the Z, it goes through the motion of finding the z prox anyway, when it should just go to safe Z and home the X and Y as normal. Some more editing of the file fixed that too.

The original files may work just fine for you without any changes. For me, one needed to be fixed to operate with the larger Z travel and the other just didn't run the way I wanted it to.

adrianm
06-27-2014, 05:05 AM
Adrian, Would you mind posting that upper prox routine. Dana steered me to the original post (Thanks Dana), but it was in a thread I would not normally find in a search. Others might find useful if the title had keywords in it. I know there are others like me that have a hard time comprehending code and we're learning but still very nervous. It would be very useful to Desktoppers. Totally understand if you don't. Thanks for all the help to people.:)

Here's the routine I use. It's a standalone that is called from the end of the two different C2's I use. Note that it's hard coded for metric as that's all I use so the values would need changing for imperial.

My upper Z switch is on input 5 and is the other way around from a normal PRS switch in that it goes off when contact is made rather than on.

scottp55
06-27-2014, 05:50 AM
Thank you Adrian and Scott!! Will check out after I've looked at them and saved to thumbdrive. Will try as soon as fully caffeinated. Interested to see how Gordon wired the switches as another Desktop in Texas who followed my advice on extra factory prox's may be interested in it as well as Kirks Desktop. I appreciate the effort you guys took.:)

scottp55
06-27-2014, 08:32 AM
Started Desktop and took a couple of VN settings pics. UR'd my laptop to factory settings for Desktop and on these settings which is how they ship a "Normal" Desktop, the additional prox's for X,24--Y,18--and Z Top do not work. Settings on "Functioning" are changed as per Nate and Gordon at Shopbot.
Does this change advice?
Wanted to post pics before I started messing around. Pics are labelled as to what they are showing.
Thanks

srwtlc
06-27-2014, 10:41 AM
Since I don't have a desktop, I assume that they are using normal open switches as opposed to the normal closed of the larger tools.

The first two functioning pics have different settings. If you have settings like in pic #2 and you move on and off the prox, does input #3 go on/off? It should.

The zzero routine does account for the different type of prox switches (open or closed). As long as your z prox works (as well as the X and Y for a C3), you can try running setup and checkmark that you have a z prox and then run C2 to see if it does the Z prox check. If it doesn't, open the my_variables file to see if the variable mentioned above was added to it. If not, add it and try again.

scottp55
06-27-2014, 10:47 AM
Yes Scott, did have it resting on Prox switch in the one input 3 is lit. Just had to do a restart because I left it like that. It does go off.
OK!!!
Off for the rest of the day helping Mom.
Thanks a lot
Will do after I cut one sign that has to be done yesterday.:)

dana_swift
06-27-2014, 06:07 PM
Good to hear they put a max Z prox switch on the desktop. I hope it becomes standard equipment on all shopbots. I am addicted to having my version, as pull up to max Z is where the machine goes after almost all operations.

@Scott- where do you configure the MaxZ in the current software? I will convert my system to use the factory version then I will be compatible with future updates.

@John- if you modify the file C2.SBC be sure to store it in a different folder, then change the C2.SBC file to call that file. Then every time you update your software you dont lose your programming efforts. Same advice applies for C3. The "new" C2.SBC that is in the location of the original C2 needs to be saved in the same place, so when you update, just make a copy and paste it over the one the installer put there. Did that make any sense?

Dont be afraid to customize your machine, it needs to do your operations many times a day. Its your time you are saving if you make it more efficient.

Hope that helps :)

D

scottp55
06-27-2014, 06:17 PM
NOT standard yet Dana. You have to ask for it!
Sorry to say I haven't implemented your code yet, but planning on trying Scotts suggestion in the AM. Easier for me personally.
I personally like never hearing a hard stop and losing position, especially with the Desktop as usually we're usually close to the edge. How long does it take operating to make back the $100 it takes to have them factory installed.
Thanks again all.
Newbie

scottp55
06-27-2014, 06:21 PM
$100 for the 3 additionals. X,Y,Z

srwtlc
06-28-2014, 12:27 AM
Dana, not sure if this is the answer to your question, but if you have a z axis prox (set to trigger just before the z axis tops out) and have it enabled in VN (I would assume yours would be on input #5 as Nrm Closed, otherwise input #3 as Nrm Open), and also have the variable &my_hasZProx = 1 present in the my_variables.sbc file, the current version zzero.sbp file will see that variable and when done touching off the plate for the second time, it will raise up to the prox, save the offset, and back off the prox by 0.125"

As I mentioned earlier, there are some issues in the zzero.sbp file, that depending on what height you started z zeroing from, the value that is calculated for raising up towards the prox may not be enough to get it there and the routine will just end without hitting the prox and saving the offset. This is most pertinent for a machine with an 8" or taller z axis.

The offending code is this...

&big_plunge = %(3) - 10

For example, if you start z zeroing from a higher position like say 4, %3 being the current z axis location of 4, and then - 10 makes the big plunge variable -6. Later on in the file where it is starting to go up looking for the prox, this line of code swaps the big plunge variable from -6 to +6...

MZ, -1 * &big_plunge

With an 8" + z axis, that's not enough to drive it to the prox. You can either change the big plunge value to something higher and or change the -1 * big plunge to -2.

Hope that's what you were asking.

dana_swift
06-28-2014, 10:32 AM
Scott- thanks for the info. I will be doing some cutting this afternoon, I will look at that. If the factory code will do the job it makes it easier to upgrade.

For too long I just got in the habit of using my own code mods and not worrying about what the "standard" SB3 was doing.

With the factory Z prox, can you tell it to cut and if a MZ command exceeds the prox location, does it just "shorten the Z motion" and continue? Fault? I would prefer to have an option where if the Z command ever exceeded the prox location it would just stop, but not fault, so cutting could continue with the upper limit handled by the prox.

I dont cut around max Z very often, but it has happened. I think the desktop owners have this situation much more often.

Thanks again
D

bob_dodd
06-29-2014, 10:51 AM
Scott

I have a new Desktop 5.5" Z with prox sw. , all axis do stop on prox sw in key board mode and doing C3 ( with out Z enabled in TS ) , if I enable the z prox in TS I get these error message in C3 & C2 , Any ideas ? Thanks

scottp55
06-29-2014, 11:28 AM
Bob, Try changing VN input switch to 1nrm open limit?

scottp55
06-29-2014, 11:29 AM
Input switch#1

scottp55
06-29-2014, 11:35 AM
Bob, When you Keyboard Z all the way up, holding up button constantly--prox switch should just stop movement. No Stop-hit, no hard stop. Just checking

bob_dodd
06-29-2014, 11:54 AM
When holding the page up the prox sw stops the Z

When doing a C2 , it works normal pulls up to .5" but gets error message and does not pull up to prox sw and back off .125

scottp55
06-29-2014, 12:00 PM
Bob, If changing input 1 to open doesn't do it, I can't say. This was the absolute limit of anything I've tried to do:)

srwtlc
06-29-2014, 12:18 PM
Bob,

What version of 3.8 are you running? I'm not sure yet on the C3 error, but for the C2 one, the line that you see highlighted in your screen shot shouldn't be there or at least it should be commented out with a ' . In the last version I have, it's commented out so that it doesn't look for the label 'Getoffprox' which isn't present in the file. I'm assuming that whoever made the last changes did some copy and paste between various files for bits and pieces of code and didn't clean up afterwords.

There could be a related issue for the C3 also. If you get the most current file for C3 (XYzero.sbp), your C3 may work then too. It's a little harder to suss that one out without a running machine with your file. Start with the above and we'll go from there.

Here are the most current files. Copy them to your C:\SbParts folder.

Input switch #1 needs to stay as it was in your first pic. That is your z zero plate.

scottp55
06-29-2014, 12:29 PM
Too many Scott's Bob, NOW you got the right one:) Good luck.

bob_dodd
06-29-2014, 01:13 PM
Scott W


I enabled the Z in set up TS

C2 The Zzero only pulled up to 1" and went down to .875, I changed setting VC safe Z pull up to 5.5" , it pulled up to prox sw after first touch and after second touch than backed off .125 Is this how its suppose to work ?

C3 Get message now that its on prox sw and its not , I see 2,3,and 5 lights are off and it is away from 0,0 and Z is mid range

srwtlc
06-29-2014, 04:08 PM
Something's not right here. Leave your safe z at 1". Do you know for sure what kind of prox switches SB put on there, norm open or norm closed (according to the default settings, they should be norm open and all on input #3)? When you trip a prox, what input indicator lights (check all three)?

srwtlc
06-29-2014, 04:14 PM
Dana,


With the factory Z prox, can you tell it to cut and if a MZ command exceeds the prox location, does it just "shorten the Z motion" and continue? Fault? I would prefer to have an option where if the Z command ever exceeded the prox location it would just stop, but not fault, so cutting could continue with the upper limit handled by the prox.

It will put up a message that you've hit a limit and you can choose to ignore, but I think it will keep asking if it happens again and it will likely fault if it takes it into the hard stops. It won't limit it to the prox height if you ignore, it will go beyond the prox if commanded to and could hit the hard stops.

bob_dodd
06-29-2014, 05:24 PM
Scott

Safe Z changed back to 1" , I had input 2,3 & 5 as norm open limit , changed 2&5 back to standard sw and just input 3 as norm open limit , all works as it should now C2 & C3

Thanks Scott for being so helpful

jerry_stanek
06-29-2014, 05:31 PM
I just had that problem and had to change the switch from limit to stop

srwtlc
06-29-2014, 07:15 PM
Bob, good, glad to hear it!

Both routines are checking what mode switch #2 is set at before branching off, but it only checks for 0 or 2, not 1. The zzero routine continues on as if you have a normal closed switch on the z like a PRS tool and the xyzero routine thinks your sitting on a prox when you're not.

As time goes by and if a desktop users use input #2 or #5 for something else, these routines should probably check more specifically on the switches so that the code flow doesn't fall through were not wanted.

scottp55
06-30-2014, 06:32 AM
Worked yesterday morning right out of the gate following Scott W's suggestions, first try-no problems. Thanks all. (posted yesterday but must have pressed preview instead of submit:(