Home › Forums › DIY Sand Table › Homing Strings
Tagged: @justinM @Matt G @bram
- This topic has 28 replies, 8 voices, and was last updated 2 months, 3 weeks ago by morebits.
-
AuthorPosts
-
September 6, 2023 at 7:38 pm #1094geriParticipant
Hi bram
is that the code you loaded?{
“robotType”: “SandTableScaraMatt”,
“cmdsAtStart”: “”,
“webui”: “SandUI”,
“evaluators”: {
“thrContinue”: 0
},
“robotGeom”: {
“model”: “SingleArmScara”,
“homing”: {
“homingSeq”: “FR10;A+10000N;B-10000;#;A+5000n;B-5000;#;B+10000N;#;B+5000n;#;A=h;B=h;$”,
“maxHomingSecs”: 120
},
“blockDistanceMM”: 1,
“allowOutOfBounds”: 0,
“stepEnablePin”: “12”,
“stepEnLev”: 0,
“stepDisableSecs”: 10,
“axis0”: {
“maxSpeed”: 9,
“maxAcc”: 50,
“maxRPM”: 2,
“stepsPerRot”: 9600,
“unitsPerRot”: 628.318,
“maxVal”: 185,
“stepPin”: “14”,
“dirnPin”: “32”,
“endStop0”: {
“sensePin”: “36”,
“actLvl”: 0,
“inputType”: “INPUT_PULLUP”
}
},
“axis1”: {
“maxSpeed”: 9,
“maxAcc”: 50,
“stepsPerRot”: 9600,
“unitsPerRot”: 628.318,
“maxRPM”: 2,
“maxVal”: 185,
“stepPin”: “27”,
“dirnPin”: “15”,
“endStop0”: {
“sensePin”: “39”,
“actLvl”: 0,
“inputType”: “INPUT_PULLUP”
}
}
},
“fileManager”: {
“spiffsEnabled”: 1,
“spiffsFormatIfCorrupt”: 1,
“sdEnabled”: 1,
“sdMOSI”: “18”,
“sdMISO”: “19”,
“sdCLK”: “5”,
“sdCS”: “21”
},
“wifiLed”: {
“hwPin”: “14”,
“onLevel”: 1,
“onMs”: 200,
“shortOffMs”: 200,
“longOffMs”: 750
},
“ledStrip”: {
“ledPin”: “4”,
“sensorPin”: “34”
}
}September 7, 2023 at 5:46 am #1095BramParticipantThis is my current code:
{
“robotType”:”SandTableScaraMatt”,
“cmdsAtStart”:””,
“webui”:”SandUI”,
“evaluators”:{
“thrContinue”:0
},
“robotGeom”:{
“model”:”SingleArmScara”,
“homing”:{
“homingSeq”:
“FR10;A+10000N;#;A+5000n;B+10000N;#;B-10000n;#;A=h;B=h;$”,
“maxHomingSecs”:120
},
“blockDistanceMM”:1,
“allowOutOfBounds”:0,
“stepEnablePin”:”12″,
“stepEnLev”:0,
“stepDisableSecs”:10,
“axis0”:{
“maxSpeed”:9,
“maxAcc”:50,
“maxRPM”:2,
“stepsPerRot”:9600,
“unitsPerRot”:628.318,
“maxVal”:185,
“stepPin”:”14″,
“dirnPin”:”32″,
“endStop0”:{
“sensePin”:”36″,
“actLvl”:0,
“inputType”:”INPUT_PULLUP”
}
},
“axis1”:{
“maxSpeed”:9,
“maxAcc”:50,
“stepsPerRot”:9600,
“unitsPerRot”:628.318,
“maxRPM”:2,
“maxVal”:185,
“stepPin”:”27″,
“dirnPin”:”15″,
“endStop0”:{
“sensePin”:”39″,
“actLvl”:0,
“inputType”:”INPUT_PULLUP”
}
}
},
“fileManager”:{
“spiffsEnabled”:1,
“spiffsFormatIfCorrupt”:1,
“sdEnabled”:1,
“sdMOSI”:”18″,
“sdMISO”:”19″,
“sdCLK”:”5″,
“sdCS”:”21″
},
“wifiLed”:{
“hwPin”:”14″,
“onLevel”:1,
“onMs”:200,
“shortOffMs”:200,
“longOffMs”:750
},
“ledStrip”:{
“ledPin”:”4″,
“sensorPin”:”34″
}
}October 29, 2023 at 4:52 am #1099beastie417ParticipantHi Bram,
Looks like you are missing part of the main arm command. As an example, here is my homing sequence code:
{"homingSeq":"FR10;A+10000n;B-10000;#;A+5000N;B-5000;#;A+15;B-15;#;B+10000n;#;B+5000N;#;B+60;#;A=h;B=h;$","maxHomingSecs":120}
One thing to note, the optical limit sensors I have are inverted polarity compared to Matt’s example. Good idea to check which polarity yours are. Also, the ‘#’ groups the commands. + and – determine motor direction.
Let’s dissect my homing sequence.
Part 1
FR10 - feed rate 10 is an OK speed on my table
Part 2
A+10000n;B-10000; - Turn Motor A Clockwise, Turn Motor B Counterclockwise until Limit Switch 1 goes low or 10000 steps
Part 3
A+5000N;B-5000; - Turn Motor A Clockwise, Turn Motor B Counterclockwise until Limit Switch 1 goes high or 5000 steps
Part 4
A+15;B-15; - Turn Motor A Clockwise, Turn Motor B Counterclockwise for 15 steps to better align the arms
Part 5
B+10000n; - Turn Motor B Clockwise until Limit Switch 2 goes low or 10000 steps
Part 6
B+5000N; - Turn Motor B Clockwise until Limit Switch 2 goes high or 5000 steps
Part 7
B+60; - Turn Motor B Clockwise for 60 steps to better align the upper arm
Part 8
A=h;B=h;$ - Make current arm positions 0,0
As far as I know, this is the breakdown of the homing sequence commands. Hope this helps!
June 22, 2025 at 8:14 pm #1120morebitsParticipantFYI homeing is not mandatory but maybe advised. I have not used/homed my robot for years, the current/last XY position is stored/known if the table microcontroller always has power. If I ever lose power, I simply rotate the arm to center the ball because I have easy access to the SCARA arm. The position of Axis0 arm is irrelevant, but can be positioned to have a proper rotation to the viewer. When u start a pattern (.thr or seq) file, and the ball is centered this will become X0,Y0 and the software will then know where it is going forward.
Also below is a detailed breakdown of the home seq commands for reference.
example string: “FR7;A+10000n;B-10000;#;A+1000N;B-1000;#;B+10000n;#;B+1000N;#;A=h;B=h;$”
Feedrate Commands
– F – Set feedrate for homing movements
– R – Units in RPM (e.g., FR7 = 7 RPM)
– S – Units in steps/second (e.g., FS100 = 100 steps/sec)Axis Commands
– A, B – Axis identifiers (A=axis 0, B=axis 1)
– +/- – Movement direction ClockWise or CounterClockWise depending on the stepper pin wiring
– Number – Step count (e.g., 10000 = 10,000 steps)Endstop Test Modifiers
– n (lowercase) – Stop when endstop 0 is NOT hit (moves until clear of endstop)
– N (uppercase) – Stop when endstop 0 IS hit (moves until hitting endstop)
– x (lowercase) – Stop when endstop 1 is NOT hit
– X (uppercase) – Stop when endstop 1 IS hitControl Commands
– # – Execute accumulated movement command
– $ – Mark homing sequence complete
– ; – Command separator
– A=h, B=h – Set current position as home for specified axis -
AuthorPosts
- You must be logged in to reply to this topic.