PDA

View Full Version : Weird things happening



mbmckeon
01-14-2006, 10:46 AM
I have written code that will cut 6 rows of 16 at specific locations. It uses two different bits for each block of wood. On the 16th block it cut using the first bit and never made it to the second bit and started cutting with the first bit again. The cut files are cut.sbp and cut_f.sbp (depending on the row). I have verified the movements in these files, and there shouldn't be any weird activity. Could it be that the files are corrupted? I've attached some of the code below.

&cola = 0
&colb = 7
&col2a = 0
&col2b = 7
&col3a = 0
&col3b = 7
&col4a = 0
&col4b = 7
&col5a = 0
&col5b = 7
&col4 = 0
&col6 = 0

check1a:
IF &cola = 0 THEN J2 .0312,&cola*3.6875
IF &cola = 8 THEN GOTO check1b
&cola = &cola + 1
FP cut.sbp,1,1,1,1,2
IF &cola < 8 THEN JY &cola*3.6875
IF &cola < 8 THEN GOTO check1a

check1b:
IF &colb = 7 THEN J2 .0625,&colb*3.6875
IF &colb = 16 THEN GOTO check2a
&colb = &colb + 1
FP cut.sbp,1,1,1,1,2
IF &colb < 16 THEN JY &colb*3.6875
IF &colb < 16 THEN GOTO check1b

check2a:
IF &col2a = 0 THEN J2 30.5,&col2a*3.6875
IF &col2a = 8 THEN GOTO check2b
&col2a = &col2a + 1
FP cut_f.sbp,1,1,1,1,2
IF &col2a < 8 THEN JY &col2a*3.6875
IF &col2a < 8 THEN GOTO check2a

check2b:
IF &col2b = 7 THEN J2 30.479,&col2b*3.6875
IF &col2b = 16 THEN GOTO check3a
&col2b = &col2b + 1
FP cut_f.sbp,1,1,1,1,2
IF &col2b < 16 THEN JY &col2b*3.6875
IF &col2b < 16 THEN GOTO check2b

check3a:
IF &col3a = 0 THEN J2 30.9375,&col3a*3.6875
IF &col3a = 8 THEN GOTO check3b
&col3a = &col3a + 1
FP cut.sbp,1,1,1,1,2
IF &col3a < 8 THEN JY &col3a*3.6875
IF &col3a < 8 THEN GOTO check3a

check3b:
IF &col3b = 7 THEN M2 31,&col3b*3.6875
IF &col3b = 16 THEN GOTO check4a
&col3b = &col3b + 1
FP cut.sbp,1,1,1,1,2
IF &col3b < 16 THEN JY &col3b*3.6875
IF &col3b < 16 THEN GOTO check3b

check4:
IF &col4 = 0 THEN J2 61.4375,&col4*3.6875
IF &col4 = 16 THEN GOTO check5a
&col4 = &col4 + 1
FP cut_f.sbp,1,1,1,1,2
IF &col4 < 16 THEN JY &col4*3.6875
IF &col4 < 16 THEN GOTO check4

check5a:
IF &col5a = 0 THEN J2 61.9062,&col5a*3.6875
IF &col5a = 8 THEN GOTO check5b
&col5a = &col5a + 1
FP cut.sbp,1,1,1,1,2
IF &col5a < 8 THEN JY &col5a*3.6875
IF &col5a < 8 THEN GOTO check5a

check5b:
IF &col5b = 7 THEN M2 61.9218,&col5b*3.6875
IF &col5b = 16 THEN GOTO check6
&col5b = &col5b + 1
FP cut.sbp,1,1,1,1,2
IF &col5b < 16 THEN JY &col5b*3.6875
IF &col5b < 16 THEN GOTO check5b

check6:
IF &col6 = 0 THEN J2 92.375,&col6*3.6875
IF &col6 = 16 THEN GOTO check7
&col6 = &col6 + 1
FP cut_f.sbp,1,1,1,1,2
IF &col6 < 16 THEN JY &col6*3.6875
IF &col6 < 16 THEN GOTO check6

check7:
END

END

mrdovey
01-14-2006, 10:31 PM
Matthew...

Two bits? I don't see any code here (not even a PAUSE) that would indicate that you intend to do a bit change.

What am I missing?

...Morris

rnels
01-15-2006, 12:58 PM
Matthew,

What size table do you have? Are you using mm or inches?

Ran your code through the simulator with the FP's commented out and seems to position OK. If you are using inches it appears to be going over 48 inches for a couple of cuts. If you have a 48 inch table and are using inches this may be an issue. Also, your first cuts in a row appear to be at Y = 0. Maybe you are setting up your material to allow for this.

You may want to run the ShopBot 3 simulator single stepping through your code. Under File dropdown use FG instead of FP. Maybe you are already aware of this feature but it has helped me in the past.

Randy

dirk
05-02-2006, 01:16 PM
I decided to post here because what's happening to me is wierd. I've never encountered this problem. I'm in the process of cutting aluminum brackets for a belt reduction on my new machine. All holes for bracket are visually in line in Parts Wizard. If I run a preview of part in SB it looks right in preview. I'm using a piece of 1/4 inch hardboard to test fit before I tackle the aluminum. When I cut, only certain holes are off consistantly around 1/2 an inch and it is very visable in part. Others like mounting holes for stepper are exact. I've marked board to make sure of no movement. The only thing I can think of is to start over and do a clean install on the bot. Anyone had this problem?

Dirk

dirk
05-02-2006, 03:23 PM
Not so weird anymore. After all the testing of the geckos, I got used to high jog speeds. My jog was set to high and I was loosing steps, Problem solved.