PDA

View Full Version : Metric versus Inches



bcondon
03-13-2014, 08:07 PM
So I wrote a SBP script using the standard headers and
then using the CP command to write out a hogging routine.

My shopbot control (on my design computer) said that I had written a Metric file and my control software was running in Inches...

I went to the Aspire, designed a quick part and it ran fine.

Does any one know (yes Brady... you probably are one of the few that might know) how the control software determines that it is running a metric file?

I created the file in Excel making a crv file which was a lot of cut and pasting from Aspire built tool file , then some calculations and capoooooot.

I did design another file and it worked perfectly... I thought I was such a smarty pants too...

I can make the file available ...

Thanks

Bob

ron brown
03-13-2014, 09:09 PM
I think it is in the "VU" - Value Units area....

But I'm only thinking....

Ron

srwtlc
03-13-2014, 10:48 PM
Bob,

Do you have something in your 'Standard Header' that is calling C#,91.

SB3 determines standard or metric by checking the condition of the system variable %25 in a file. That variable is the linear units that the machine is running in. %25 can be either 0 for inches or 1 for metric.

Many files have this in the beginning somewhere...

IF %(25)=1 THEN GOTO UNIT_ERROR 'check to see software is set to standard

UNIT_ERROR:
C#,91 'Run file explaining unit error
END

If you type CN and enter 91, you'll get the same error message. The place to change it on the console is VD.

bcondon
03-14-2014, 10:07 AM
so I found that I forgot the END command before the UNIT_ERROR
which would give me the message. I knew it was a programming element
but it is hard without a good debugger!

Thanks

srwtlc
03-14-2014, 11:55 AM
Good. Yeah, I've mentioned to SBHQ on the past that it would be nice to have a debug mode in SBEdit just for this purpose. A popup screen that would show the toolpath and step through the file much in the same way as if you ran it on the machine or it could even run the machine also.