PDA

View Full Version : Need help with the Zzero routine



ttwark
01-11-2007, 02:38 PM
After spending the last 2 days tring to write this thing, we've decided that if we would have stayed at the beach 2 more days it would have been time better spent. We are tring to write a program to zero both the primary z and the secondary z at at the same location on the table following SB manual. We have been on the phone to Frank/SB multiple times and have reached a point that we can't call back. He can't solve our problem, doesn't even understand what were doing, but we are using their word for word line for line.

Enough of that spouting, here is my problem, we have the the routine doing everything that we think that it should do except that when it jogs home the SB position on the screen says that Z is where it is, but A is something different than the physical location of the tool. It is my thought that the computer therfore doesn't know where the A(secondary Z) is. Can anyone help me with this, I would like to be able to talk to someone that knows what we are tring to do.

bill.young
01-11-2007, 03:03 PM
Tom,

Are you saying that the A axis is zeroed OK before it jogs home...so if the A-axis display says that it's 1" above the table that it really IS 1" above the table...but after it jogs home that the A axis is somewhere above or below where the display says it is, so that it's losing it's A-axis height location during the Jog home?

Bill

ttwark
01-11-2007, 03:16 PM
Bill,

When the file executes the JH it says that Z location is at 1.5 which is what we have it set at and it says that the A is at 1 when it is actually at 1.5 I'm not computer literate enough to figure out where the error is

Tom

bill.young
01-11-2007, 03:57 PM
Tom,

I guess the first thing I'd do is to see if the A-axis Zeroing is working before the JH....that would narrow it down a bit. Maybe put a PAUSE statement before the JH and see if the A-axis measurement is correct.

If it's not zeroing correctly then I would double-check that I was writing all the locations to the right axis while zeroing...that you're not writing an A-axis location to a Z-axis position in a VA command for instance. It's easy to get them mixed up.

If you want to email your routine to me I'll be glad to look at it for you, or if you prefer you can paste it into a message here.

Bill

ttwark
01-11-2007, 04:40 PM
Bill, Frank sent us a an Azero file (I think you wrote it). We could not make that one work, so we wrote our own, using the the exact directions from the (obviously outdated) shopbot manual. It works great, using code that switches the Z to the A then back again, but at that point, it doesn't acknowledge the A. The instructions had us write a "DZzero" program..does this sound at all familiar?

daryl_alberson
01-11-2007, 04:56 PM
Check your settings under VU and make sure the unit values for the A are the same as Z.

bill.young
01-11-2007, 07:12 PM
Hey Tom,

A "DZzero" program isn't anything that I've run across. Which instructions are you using to write your z-zero file?

Daryl makes a good point about checking the unit values, but if one axis is for a spindle and the other a router then they might have different motors and different values. The best way to make sure that the values are correct is to make a move with that axis and then measure how far it REALLY went and make sure they are the same. The longer the move, the better.

If the Z and A axis seem to be going the right distance and making the right motions...stop moving down when they make contact with the plate, etc...then my best guess is that a value is being written to the wrong parameter in a VA command or the wrong sustem variable is being read. Just a guess though without seeing the file.

Bill

ttwark
01-11-2007, 08:28 PM
DZzero program from Shopbot manual

7889 (34.3 k)

This is what we were trying to work with today. Don't know if upload will work as we've never tried this before. We checked all our values..we have values on 4 axis - XYZ&A that are all the same - we even have a B value ? Thanks for help.

ttwark
01-11-2007, 08:37 PM
Also, we even further tried to follow directions for a custom file (C5 in manual) that would have allowed us to use the above file as a shortcut command but it just wouldn't work according to the printed instructions. When the routine runs, everything both spindles zero out but program is "tricking" spindles and readout board shows that both spindles zero as "Z's", alternating the information as needed. So at the end there's really no acknowledgement that there is a second spindle by the shopbot. I know this sounds confusing cause we're confused.

richards
01-11-2007, 09:59 PM
Tom,

My machine only has one spindle, so I can't verify what you're experiencing, but I think that Bill's suggestion to check which VA parameter is being set is the solution to your problem.

The Zzero.sbp file has this line in the CONTACT1 and CONTACT2 section: VA,,,&zbot,,,,,0. That means that the Z-axis is being affected, not the A-axis. Remember that the axis parameters for the VA command is VA, X-axis, Y-axis, Z-axis, A-axis, B-axis, tablebase-x, tablebase-y, tablebase-z, tablebase-a, tablebase-b.

I believe that you would have to modify the command to be VA,,,,&zbot,,,,,0. By modifying the command, you would be changing the value of the A-axis.

hespj
01-12-2007, 04:57 AM
I had a similar problem (I think) after installing a second Z axis. When the axis jogged, after Zeroing it for instance, it had lost position. ShopBot suggested altering the "resolution multiplier" under VU, this adjusts the distance moved whilst jogging.

(I'll also add that I looked at SB's twin zeroing routine, couldn't understand it, and just edited Zzero for the new axis. The two axes zero independently.)

steve4460
01-12-2007, 08:12 AM
HI Tom

Try using the "MH' insted of "JH" once . I had a similar problem when using the "JH" it would send the "A" axis to 1.008 . I has toled that the JH calls up a differend file with differend values in it and that if you use the MH that it would be differend, also we changed that 1.008 number to 0 somewhere in thos settings sheets , but I dont rmember right now where . I will try and look it up later .

randy
01-12-2007, 09:27 AM
Tom,
I am new at this but I think I found a couple of errors. If this is the actual code that you are trying to run:

VI„.„„3,4 `Activate the Primary Z should be
VI„,„„3,4 `Activate the Primary Z

VI„„„,4,3 *Activate the Accessory Z should be
VI„„„,4,3 'Activate the Accessory Z

VI„„„.3,4 `Activate the Primary Z should be
VI„„„,3,4 `Activate the Primary Z

Data separators should be commas and the remark character should be an astrophe.

Randy

ttwark
01-12-2007, 11:03 PM
I have read all the advice and been to the shop tring to figure my problem, but once again the routine runs fine, but the when the program switches from the primary z to the secondary, and runs the routine, the shopbot position on the computer screen it is reading that the Z is zeroing instead of the A. The shopbot position on the computer screen is not acknowledging the A axis.

richards
01-13-2007, 06:51 AM
Tom,
I've been playing with the SB3 program using preview mode. Just so I'm on the same page as you, let's review some fundamentals.

If I understand correctly, the VI command lets you assign a driver channel to an axis. Normally driver channel 1 is assigned to the X-axis, driver channel 2 is assigned to the Y-axis, driver channel 3 is assigned to the Z-axis, driver channel 4 is assigned to the A-axis and driver channel 5 is assigned to the B-axis. I believe that the only time you change those assignments is when you physically swap electronics to a different channel. For instance, if channel 3 on my Alpha's control board stopped working, I could remove the cable going from the control board's channel 3 to the Z-axis motor and install it in channel 4. Then, I would use the VI command to inform the SB3 program that it was to send the Z-axis step and direction signals to channel 4 instead of sending them to channel 3. In other words, if I had a standard 3-axis machine, I would have to physically move cables to different locations on my controller card in order to use the VI command. (We'll come back to the VI command after we review the VD command.)

If I had more than 3-axes and wanted to write code that used more than 3-axes, I would change the number of axes using the VD command. Then the position of the X-axis, the Y-axis, the Z-axis, the A-axis and the B-axis would be displayed. I would also need to use the MA and JA commands to move the A-axis. Likewise, I would use the MB and JB commands to move the B-axis. I could also use the M4 and J4 commands to do a coordinated 4-axis move and the M5 and J5 commands to do a coordinated 5-axis move. However, as far as I know, I would have to write my own 4-axis and 5-axis code, since I don't believe that PartWizard2 has the option to use more than 3-axes.

Now, back to the VI command. If I had a 4-axis or 5-axis machine, AND ONLY had code written for a 3-axis machine, I could 'fool' the machine to use any of the three axes by manipulating the VI command. For example, I could switch the Z-axis with the A-axis by setting driver channel 3 to the A-axis and by setting the driver channel 4 to the Z-axis. After making that change, then, when I gave a MZ or JZ command, the A-axis would move NOT the Z-axis BUT the display would show that the Z-axis had moved.

The JH command raises the Z-axis (whether it is assigned driver channel 3 or driver channel 4 or driver channel 5) to a safe height and then coordinates movement of the X and Y axes to move to the home position. Unless I've misunderstood the JH command, it always moves only the X, Y and Z axes even if the VI command has been used to swap axes.

What does all of this mean? It means that if I had a machine that had two Z-axes, where the primary Z-axis was the actual Z-axis and where the secondary Z-axis was the actual A-axis, I would use the VD command to set the number of axes to four. Next I would use the VI command to set the driver channels and axes to factory settings. Finally, I would copy the Zzero.sbp file to an Azero.sbp file. In the Azero.sbp file, I would change the MZ and JZ commands to MA and ZA commands. That would let me zero the primary Z-axis and the secondary Z-axis by running the Zzero program for the primary Z-axis and then running the Azero program for the secondary Z-axis (A-axis). After running the Zzero.sbp file and the Azero.sbp file, the display would should the actual positions of all four axes.

If I had sbp files that only contained code for the X,Y and Z axes, but I wanted to use the X, Y and A axes, I would then use the VI command to swap the Z and A axes. From that point on, until I used the VI command to reset the Z and A axes to their factory default, the Z-axis display would actually show the position of the A-axis.

Are you confused? I am. To put everything into simple terms, the Shopbot is an extremely versatile machine that allows the use of up to five axes. However, because most code only uses three-axes, the VI command lets you re-assign which three axes you'll use at any one time. It's up to you to remember that the Z-axis display value is really the A-axis position if you 'fooled' the machine by swapping axes via the VI command.

hespj
01-13-2007, 01:03 PM
To add to the confusion. In my experience there is slighlty more to altering the Zzero to Azero. Looking at the routine on my laptop, not my ShopBot computer, I think each VS and VA need adjusting for A rather than Z.

Ask if your not clear what this means Tom.

richards
01-13-2007, 01:44 PM
I'll learn to post things in the middle of the night. As John pointed out, every command in the Zzero file that acts on the Z-axis will have to be examined and changed to work with the A-axis. Also, any variable that is related to the Z-axis will have to be examined and modified to work with the A-axis. System variables that are related to the Z-axis will have to be modified to specify system variables that relate to the A-axis.

The good news is that the Zzero program is not very large. It would only take a short while to examine each instruction, check it against the instruction list in the HELP section of SB3, and then modify the instruction or move on to the next line in the file. That's one of the best ways to learn how to operate the machine.

One thing that I normally do is add a comment line for each variable that is used in the program to define how and when the variable is used. For instance:
'%(22), system variable, 0=cut,1 = preview
'%(25), system variable, units, 0=inches, 1=metric
'%(73), system variable, move speed, z-axis
'%(74), system varialbe, move speed, a-axis
'&modenow, receives system variable %(22)
'&start_Zmove_speed, receives system variable %(73)

(A list of system variables can be found by searching the forum for 'system variables' or by clicking here (http://www.talkshopbot.com/forum/show.cgi?tpc=1843&post=40737#POST40737))

Then, by reviewing the commented variables and system variables, it's easy to see what needs to be changed.