Go Back to handibot.com
sign up or log-in

Advanced

Metric Configuration

Posted by Zeeri 
Metric Configuration
August 23, 2017 12:37PM
I modified the handibot configuration yesterday to use Metric instead of Imperial units and immediately ran into problems with the motors moving incredibly slowly. This is most evident when running macro #2 or 3 to calibrate the XYZ axis's. Essentially the motors move at such small increments that the scripts time out and it fails to properly calibrate.

I looked at the scripts and into more details of the configuration and I am having some difficulty identifying the problem. The scripts appear (I am still missing some docs so I am not sure yet) to use percentages when specifying speeds, and thus should be immune (mostly?) to the metric change. The configuration screen does show some relevant values in the Axis and Channels tabs, but they do appear to be automatically changed to metric values when I alter the system metrics.

Since I couldn't find anyone else who has this problem, is using metric vs imperial not properly supported yet, or is this just a bug? It does not appear at first glance to be fixable via the interface.

I am currently running the latest firmware (there doesn't appear to be any display of what version is loaded) and system (1.5.2). Both were updated on 8/23/2017.

Thank you.
Re: Metric Configuration
August 23, 2017 01:34PM
There are a couple things that should change automatically when you make the switch from imperial to metric--the unit values (how many steps the motors take to move one unit of distance) should change from 4000 steps per inch to 157.48 steps per millimeter. The speed values should also be adjusted. 2 inches per second is a decent pace--but 2 mm per second is barely crawling.

I've been working on a doc that explains all of the motion settings in fabmo with more detail...you can check it out here: [www.dropbox.com]

Metric should work just fine in current versions of fabmo--so I don't see that being the source of the problem. But I will definitely investigate on this end.
Re: Metric Configuration
August 24, 2017 12:48PM
Well, I think I was wrong. It appears that the metric works fine, but none of the macros I have been trying to run work with metric. My guesses at how the macro worked were incorrect. Essentially the motors move in such small increments and such short distances (#2/3) that the machine isn't calibrating, and that is due to the measurements being hard coded in the macro in inches. If I can figure out how to debug in the scripting language I will modify them to account for the metrics changing. For now I will just hard code some new scripts for MM vs Inches.
Re: Metric Configuration
August 24, 2017 02:30PM
Yes, the envelope of the tool is hard coded into the homing macros. However, the macro is supposed to change the tool to inches mode for the duration of the routine--then change the tool back to the chosen measurement system afterwards. The command SU,0 at the start of the file changes the tool to inches. Any unit changes made during a file will revert to the configuration settings after the file completes.
Re: Metric Configuration
August 24, 2017 03:34PM
Well, I think I was wrong. It appears that the metric works fine, but none of the macros I have been trying to run work with metric. My guesses at how the macro worked were incorrect. Essentially the motors move in such small increments and such short distances (#2/3) that the machine isn't calibrating, and that is due to the measurements being hard coded in the macro in inches. If I can figure out how to debug in the scripting language I will modify them to account for the metrics changing. For now I will just hard code some new scripts for MM vs Inches.
Re: Metric Configuration
August 24, 2017 03:40PM
Yes, the envelope of the tool is hard coded into the homing macros. However, the macro is supposed to change the tool to inches mode for the duration of the routine--then change the tool back to the chosen measurement system afterwards. The command SU,0 at the start of the file changes the tool to inches. Any unit changes made during a file will revert to the configuration settings after the file completes.
Re: Metric Configuration
August 24, 2017 08:02PM
Tried SU,0 in my script and it failed to work as I expected. Is it possible I have not updated something? I am getting very strange and inconsistent results at times. I will attach my script. It works except for the Finish subroutine where I have the router back off after tapping the grounding plate. The back off should just move it 6.35mm (1/4"), but the router actually backs off by more than an inch. Then when I ask it to move down in the following move command, it only moves the 6.35mm. Those moves should place the router bit directly on the cutting surface.

After testing for a bit, the router started doing some very strange things, so I gave up. I suspect it was overheating but I really don't know. Restarting it appears to have it working as expected again. While I cannot recall all the odd behavior, the one that was obvious was that it was not requiring me to press the green button before executing a script.

Hmm.. your message board seems to have a few problems. I cannot attach the script (won't let me attach it with a .txt or .sbp extension even though the error message states they are okay). So here it is inlined....


'Initialize
'SU,0
'Get Speeds at Startup
&startXY_speed = %(71)
&startZ_speed = %(73)
&startZ_ramp = %(83)

'Check the Unit system variable to see what metrics we are using. Setup values based on those metrics.
IF %(25) = 0 THEN GOSUB SetupInches
IF %(25) = 1 THEN GOSUB SetupMillimeters

'Set the X/Y, Z move speeds...
VS,,&zMoveSpeed
'Set the Ramp Speeds (X/Y move ramp speed, Z move ramp speed, ...)
VR,, 10000 ' quick stop
ON INPUT(1,1) GOSUB Finish
'Move to a relative Z position. Move down (roughly 4") until we either find the z-zero plate or we run out of runway.
MZ &moveZ
GOSUB FAIL
END

'SUBROUTINES BELOW HERE ---------------------------

SetupInches:
&xyMoveSpeed = 4
&zMoveSpeed = .5
&moveZ = -4
&backoffZ = .25
&zeroPlateThickness = 0.05905512
RETURN

SetupMillimeters:
&xyMoveSpeed = 101.6
&zMoveSpeed = 12.7
&moveZ = -101.6
&backoffZ = 6.35
&zeroPlateThickness = 1.5
RETURN

Finish:
ZZ
MZ, &backoffZ
'Remove alligator clip and plate
PAUSE
'MZ, (-1 * &backoffZ)
'MZ, (-1 * &zeroPlateThickness) 'Move down the size of the circuit board (1.5mm = 0.05905512")
END

FAIL:
VS, &startXY_speed, &startZ_speed
VR, , &startZ_ramp
MZ, &backoffZ
'No Contact with Plate ... Ending!
PAUSE
END
Re: Metric Configuration
August 25, 2017 11:42AM
The macro I have on my bot does not use the SU command. I added it, but it did not appear to work. I am wondering if somehow I have either a problem with the hardware or a problem with the software/firmware.

The reason I am wondering this is that I am getting a lot of inconsistent results. I have random cases (not repeatable) where the machine simply does not ask for me to press the green button to continue when it has always done so in the past (sometimes with my macros and sometimes with the default macros and sometimes with jobs I run). I have regularly and random problems changing the cutter position where I can type in three new values for xyz, hit enter, press the button, and only two of them take effect (but the third is often changed in the UI as if it had taken effect). The machine is at odd times losing its home location (not when hitting the limits of movement range). And finally I just generated a simple job that cuts 1.5mm into a circuit board to create a square and for some unknown reason the cutter turns on first, then turns off, then goes to home, then starts doing the job without turning the cutter back on. If I am reading the vcarve sbp file correctly that is not the order of commands provided to the handibot (this is repeatable). I will attempt to attach the sbp file for you.

So are these problems (or some of them) normal given the current state of the hardware/software (are they known problems)? How would I go about debugging these? In particular the problems with the job not turning on the cutter is vexing, and the issues with the green button not needing to be pressed at random times causes a lot of trouble.

Attaching the file still doesn't work it appears - so I will paste it below:

'----------------------------------------------------------------
'SHOPBOT ROUTER FILE IN MM
'GENERATED BY PARTWorks
'Minimum extent in X = 0.000 Minimum extent in Y = 0.000 Minimum extent in Z = -1.500
'Maximum extent in X = 152.400 Maximum extent in Y = 203.200 Maximum extent in Z = 0.000
'Length of material in X = 152.400
'Length of material in Y = 203.200
'Depth of material in Z = 1.500
'Home Position Information = Bottom Left Corner, Material Surface
'Home X = 0.000000 Home Y = 0.000000 Home Z = 20.000000
'Rapid clearance gap or Safe Z = 6.000
'UNITS:MM
'
IF %(25)=0 THEN GOTO UNIT_ERROR 'check to see software is set to standard
SA 'Set program to absolute coordinate mode
CN, 90
'New Path
'Toolpath Name = Profile 2
'Tool Name = 1/8" Up-cut

&PWSafeZ = 6.000
&PWZorigin = Material Surface
&PWMaterial = 1.500
'&ToolName = "1/8" Up-cut"
&Tool =2 'Jog Z axis to safe height
C9
TR,14000
C6 'Return tool to home in x and y
PAUSE 2
'
MS,25.3,6.3
JZ,20.000000
J2,0.000000,0.000000
J3,3.412500,5.000000,6.000000
M3,3.412500,5.000000,-1.500000
M3,3.412500,65.000000,-1.500000
CG, ,5.000000,66.587502,1.587500,0.000000,T,1
M3,65.000000,66.587502,-1.500000
CG, ,66.587502,65.000000,0.000000,-1.587502,T,1
M3,66.587502,5.000000,-1.500000
CG, ,65.000000,3.412500,-1.587502,0.000000,T,1
M3,5.000000,3.412500,-1.500000
CG, ,3.412500,5.000000,0.000000,1.587500,T,1
J3,3.412500,5.000000,6.000000
JZ,20.000000
J2,0.000000,0.000000
'
'Turning router OFF
C7
END
'
'
UNIT_ERROR:
CN, 91 'Run file explaining unit error
END
Sorry, only registered users may post in this forum.