Home › Forums › TinyG › TinyG Support › Latch backoff not happening after homing?
Tagged: Homing
- This topic has 5 replies, 2 voices, and was last updated 5 years, 3 months ago by cmcgrath5035.
-
AuthorPosts
-
July 15, 2019 at 5:29 pm #11438orangejsxMember
Hey there,
Currently, I’m trying to set up the home sequence of the tinyG. Currently, for the x-axis for example, I set $XSN=3 to use limit switches for homing.
However, when it gets to the limit switch, it just stops without backing off. I’ve changed the XLB value, and an array of other things, but nothing seems to work. Any ideas?
July 16, 2019 at 6:41 am #11439cmcgrath5035ModeratorCan we assume you have reviewed and are familiar with this Wiki page: https://github.com/synthetos/TinyG/wiki/Homing-and-Limits-Description-and-Operation ?
Are you running your machine from CoolTerm, Chilipeppr, CncJS, etc?
A full list of your parameter settings may be useful.
Run $$ in a console, copy and paste the listing into a text file, upload the text file to a cloud drive (Gdrive, Dropbox, etc) and provide a URL for reviewing it.When you say the machine stops, is the behavior as if you hit a limit switch, with tinyG stopped and flashing LED?
Are you set to home just X, or X and Y?July 16, 2019 at 10:38 am #11440orangejsxMemberI’m actually using this to control a gantry, so I’m using a custom python script that writes to the serial port. Here is the code I’m using:
ser.write(b’$XSN=3\n’)
ser.write(b’$YSN=3\n’)
ser.write(b’$XVM=1500\n’)
ser.write(b’$YVM=1500\n’)
ser.write(b’G20\n’)
ser.write(b’$1tr=4.7\n’)
ser.write(b’$2tr=.370\n’)
ser.write(b’$XVM=1000\n’)
ser.write(b’$1po=1\n’)
ser.write(b’$3po=0\n’)
#ser.write(b’$3pm=1\n’)ser.write(b’$XLB=10\n’)
#ser.write(b’$XZB=700\n’)
#ser.write(b’$YSV=700\n’)
#ser.write(b’$YLV=1\n’)
#ser.write(b’$YJH=1\n’)
ser.write(b’$$\n’)case = 0
speed = 10if(case == 1):
# out = ‘G17 \nG02 I1 F100\n’
# out = ‘G01 Y2 F10\n’
out = ‘G00 X1.5\n’
out += ‘G00 Y4\n’
out += ‘G01 Y7 F50\n’
out += ‘G01 Y4 F50\n’
out += ‘G00 X20\n’
out += ‘G01 Y9 F50\n’
out += ‘G01 Y4 F50\n’
out += ‘G00 X15\n’out += ‘G01 Z-.125, F3\n’
out += ‘G00 X24\n’
out += ‘G02 X22.5 Y5 I1.4\n’
out += ‘G01 Z0.0, F3\n’out += ‘G00 Y0 \n’
out += ‘G00 X0 \n’
ser.write(out.encode())And here is the output that I get with $$
b'[xsn] x switch min 3 [0=off,1=homing,2=limit,3=limit+homing]\n’
b’tinyg [mm] ok> \n’
b'[ysn] y switch min 3 [0=off,1=homing,2=limit,3=limit+homing]\n’
b’tinyg [mm] ok> \n’
b'[xvm] x velocity maximum 1500 mm/min\n’
b’tinyg [mm] ok> \n’
b'[yvm] y velocity maximum 1500 mm/min\n’
b’tinyg [mm] ok> \n’
b’tinyg [inch] ok> \n’
b'[1tr] m1 travel per revolution 4.7000 in\n’
b’tinyg [inch] ok> \n’
b'[2tr] m2 travel per revolution 0.3700 in\n’
b’tinyg [inch] ok> \n’
b'[xvm] x velocity maximum 1000 in/min\n’
b’tinyg [inch] ok> \n’
b'[1po] m1 polarity 1 [0=normal,1=reverse]\n’
b’tinyg [inch] ok> \n’
b'[3po] m3 polarity 0 [0=normal,1=reverse]\n’
b’tinyg [inch] ok> \n’
b'[xlb] x latch backoff 10.000 in\n’
b’tinyg [inch] ok> \n’
b'[fb] firmware build 440.20\n’
b'[fv] firmware version 0.97\n’
b'[hp] hardware platform 1.00\n’
b'[hv] hardware version 8.00\n’
b'[id] TinyG ID 7W3116-CGQ\n’
b'[ja] junction acceleration 3937 in\n’
b'[ct] chordal tolerance 0.0004 in\n’
b'[sl] soft limit enable 0\n’
b'[st] switch type 0 [0=NO,1=NC]\n’
b'[mt] motor idle timeout 2.00 Sec\n’
b'[ej] enable json mode 0 [0=text,1=JSON]\n’
b'[jv] json verbosity 2 [0=silent,1=footer,2=messages,3=configs,4=linenum,5=verbose]\n’
b'[js] json serialize style 1 [0=relaxed,1=strict]\n’
b'[tv] text verbosity 1 [0=silent,1=verbose]\n’
b'[qv] queue report verbosity 0 [0=off,1=single,2=triple]\n’
b'[sv] status report verbosity 1 [0=off,1=filtered,2=verbose]\n’
b'[si] status interval 500 ms\n’
b'[ec] expand LF to CRLF on TX 0 [0=off,1=on]\n’
b'[ee] enable echo 0 [0=off,1=on]\n’
b'[ex] enable flow control 1 [0=off,1=XON/XOFF, 2=RTS/CTS]\n’
b'[baud] USB baud rate 5 [1=9600,2=19200,3=38400,4=57600,5=115200,6=230400]\n’
b'[net] network mode 0 [0=master]\n’
b'[gpl] default gcode plane 0 [0=G17,1=G18,2=G19]\n’
b'[gun] default gcode units mode 1 [0=G20,1=G21]\n’
b'[gco] default gcode coord system 1 [1-6 (G54-G59)]\n’
b'[gpa] default gcode path control 2 [0=G61,1=G61.1,2=G64]\n’
b'[gdi] default gcode distance mode 0 [0=G90,1=G91]\n’
b'[1ma] m1 map to axis 0 [0=X,1=Y,2=Z…]\n’
b'[1sa] m1 step angle 1.800 deg\n’
b'[1tr] m1 travel per revolution 4.7000 in\n’
b'[1mi] m1 microsteps 8 [1,2,4,8]\n’
b'[1po] m1 polarity 1 [0=normal,1=reverse]\n’
b'[1pm] m1 power management 2 [0=disabled,1=always on,2=in cycle,3=when moving]\n’
b'[2ma] m2 map to axis 1 [0=X,1=Y,2=Z…]\n’
b'[2sa] m2 step angle 1.800 deg\n’
b'[2tr] m2 travel per revolution 0.3700 in\n’
b'[2mi] m2 microsteps 8 [1,2,4,8]\n’
b'[2po] m2 polarity 0 [0=normal,1=reverse]\n’
b'[2pm] m2 power management 2 [0=disabled,1=always on,2=in cycle,3=when moving]\n’
b'[3ma] m3 map to axis 2 [0=X,1=Y,2=Z…]\n’
b'[3sa] m3 step angle 1.800 deg\n’
b'[3tr] m3 travel per revolution 0.0492 in\n’
b'[3mi] m3 microsteps 8 [1,2,4,8]\n’
b'[3po] m3 polarity 0 [0=normal,1=reverse]\n’
b'[3pm] m3 power management 1 [0=disabled,1=always on,2=in cycle,3=when moving]\n’
b'[4ma] m4 map to axis 3 [0=X,1=Y,2=Z…]\n’
b'[4sa] m4 step angle 1.800 deg\n’
b'[4tr] m4 travel per revolution 14.1732 in\n’
b'[4mi] m4 microsteps 8 [1,2,4,8]\n’
b'[4po] m4 polarity 0 [0=normal,1=reverse]\n’
b'[4pm] m4 power management 2 [0=disabled,1=always on,2=in cycle,3=when moving]\n’
b'[xam] x axis mode 1 [standard]\n’
b'[xvm] x velocity maximum 1000 in/min\n’
b'[xfr] x feedrate maximum 31 in/min\n’
b'[xtn] x travel minimum 0.000 in\n’
b'[xtm] x travel maximum 5.906 in\n’
b'[xjm] x jerk maximum 1 in/min^3 * 1 million\n’
b'[xjh] x jerk homing 2 in/min^3 * 1 million\n’
b'[xjd] x junction deviation 0.0020 in (larger is faster)\n’
b'[xsn] x switch min 3 [0=off,1=homing,2=limit,3=limit+homing]\n’
b'[xsx] x switch max 0 [0=off,1=homing,2=limit,3=limit+homing]\n’
b'[xsv] x search velocity 20 in/min\n’
b'[xlv] x latch velocity 4 in/min\n’
b'[xlb] x latch backoff 10.000 in\n’
b'[xzb] x zero backoff 0.039 in\n’
b'[yam] y axis mode 1 [standard]\n’
b'[yvm] y velocity maximum 59 in/min\n’
b'[yfr] y feedrate maximum 31 in/min\n’
b'[ytn] y travel minimum 0.000 in\n’
b'[ytm] y travel maximum 5.906 in\n’
b'[yjm] y jerk maximum 1 in/min^3 * 1 million\n’
b'[yjh] y jerk homing 2 in/min^3 * 1 million\n’
b'[yjd] y junction deviation 0.0020 in (larger is faster)\n’
b'[ysn] y switch min 3 [0=off,1=homing,2=limit,3=limit+homing]\n’
b'[ysx] y switch max 0 [0=off,1=homing,2=limit,3=limit+homing]\n’
b'[ysv] y search velocity 20 in/min\n’
b'[ylv] y latch velocity 4 in/min\n’
b'[ylb] y latch backoff 0.197 in\n’
b'[yzb] y zero backoff 0.039 in\n’
b'[zam] z axis mode 1 [standard]\n’
b'[zvm] z velocity maximum 31 in/min\n’
b'[zfr] z feedrate maximum 31 in/min\n’
b'[ztn] z travel minimum 0.000 in\n’
b'[ztm] z travel maximum 2.953 in\n’
b'[zjm] z jerk maximum 1 in/min^3 * 1 million\n’
b'[zjh] z jerk homing 2 in/min^3 * 1 million\n’
b'[zjd] z junction deviation 0.0020 in (larger is faster)\n’
b'[zsn] z switch min 0 [0=off,1=homing,2=limit,3=limit+homing]\n’
b'[zsx] z switch max 1 [0=off,1=homing,2=limit,3=limit+homing]\n’
b'[zsv] z search velocity 16 in/min\n’
b'[zlv] z latch velocity 4 in/min\n’
b'[zlb] z latch backoff 0.197 in\n’
b'[zzb] z zero backoff 0.039 in\n’
b'[aam] a axis mode 3 [radius]\n’
b'[avm] a velocity maximum 230400 deg/min\n’
b'[afr] a feedrate maximum 230400 deg/min\n’
b'[atn] a travel minimum -1.000 deg\n’
b'[atm] a travel maximum -1.000 deg\n’
b'[ajm] a jerk maximum 5760 deg/min^3 * 1 million\n’
b'[ajh] a jerk homing 11520 deg/min^3 * 1 million\n’
b'[ajd] a junction deviation 0.0500 deg (larger is faster)\n’
b'[ara] a radius value 0.0078 deg\n’
b'[asn] a switch min 1 [0=off,1=homing,2=limit,3=limit+homing]\n’
b'[asx] a switch max 0 [0=off,1=homing,2=limit,3=limit+homing]\n’
b'[asv] a search velocity 600 deg/min\n’
b'[alv] a latch velocity 100 deg/min\n’
b'[alb] a latch backoff 5.000 deg\n’
b'[azb] a zero backoff 2.000 deg\n’
b'[bam] b axis mode 0 [disabled]\n’
b'[bvm] b velocity maximum 3600 deg/min\n’
b'[bfr] b feedrate maximum 3600 deg/min\n’
b'[btn] b travel minimum -1.000 deg\n’
b'[btm] b travel maximum -1.000 deg\n’
b'[bjm] b jerk maximum 20 deg/min^3 * 1 million\n’
b'[bjd] b junction deviation 0.0500 deg (larger is faster)\n’
b'[bra] b radius value 0.0394 deg\n’
b'[cam] c axis mode 0 [disabled]\n’
b'[cvm] c velocity maximum 3600 deg/min\n’
b'[cfr] c feedrate maximum 3600 deg/min\n’
b'[ctn] c travel minimum -1.000 deg\n’
b'[ctm] c travel maximum -1.000 deg\n’
b'[cjm] c jerk maximum 20 deg/min^3 * 1 million\n’
b'[cjd] c junction deviation 0.0500 deg (larger is faster)\n’
b'[cra] c radius value 0.0394 deg\n’
b'[p1frq] pwm frequency 100 Hz\n’
b'[p1csl] pwm cw speed lo 1000 RPM\n’
b'[p1csh] pwm cw speed hi 2000 RPM\n’
b'[p1cpl] pwm cw phase lo 0.125 [0..1]\n’
b'[p1cph] pwm cw phase hi 0.200 [0..1]\n’
b'[p1wsl] pwm ccw speed lo 1000 RPM\n’
b'[p1wsh] pwm ccw speed hi 2000 RPM\n’
b'[p1wpl] pwm ccw phase lo 0.125 [0..1]\n’
b'[p1wph] pwm ccw phase hi 0.200 [0..1]\n’
b'[p1pof] pwm phase off 0.100 [0..1]\n’
b'[g54x] g54 x offset 0.000 in\n’
b'[g54y] g54 y offset 0.000 in\n’
b'[g54z] g54 z offset 0.000 in\n’
b'[g54a] g54 a offset 0.000 deg\n’
b'[g54b] g54 b offset 0.000 deg\n’
b'[g54c] g54 c offset 0.000 deg\n’
b'[g55x] g55 x offset 2.953 in\n’
b'[g55y] g55 y offset 2.953 in\n’
b'[g55z] g55 z offset 0.000 in\n’
b'[g55a] g55 a offset 0.000 deg\n’
b'[g55b] g55 b offset 0.000 deg\n’
b'[g55c] g55 c offset 0.000 deg\n’
b'[g56x] g56 x offset 0.000 in\n’
b'[g56y] g56 y offset 0.000 in\n’
b'[g56z] g56 z offset 0.000 in\n’
b'[g56a] g56 a offset 0.000 deg\n’
b'[g56b] g56 b offset 0.000 deg\n’
b'[g56c] g56 c offset 0.000 deg\n’
b'[g57x] g57 x offset 0.000 in\n’
b'[g57y] g57 y offset 0.000 in\n’
b'[g57z] g57 z offset 0.000 in\n’
b'[g57a] g57 a offset 0.000 deg\n’
b'[g57b] g57 b offset 0.000 deg\n’
b'[g57c] g57 c offset 0.000 deg\n’
b'[g58x] g58 x offset 0.000 in\n’
b'[g58y] g58 y offset 0.000 in\n’
b'[g58z] g58 z offset 0.000 in\n’
b'[g58a] g58 a offset 0.000 deg\n’
b'[g58b] g58 b offset 0.000 deg\n’
b'[g58c] g58 c offset 0.000 deg\n’
b'[g59x] g59 x offset 0.000 in\n’
b'[g59y] g59 y offset 0.000 in\n’
b'[g59z] g59 z offset 0.000 in\n’
b'[g59a] g59 a offset 0.000 deg\n’
b'[g59b] g59 b offset 0.000 deg\n’
b'[g59c] g59 c offset 0.000 deg\n’
b'[g92x] g92 x offset 0.000 in\n’
b'[g92y] g92 y offset 0.000 in\n’
b'[g92z] g92 z offset 0.000 in\n’
b'[g92a] g92 a offset 0.000 deg\n’
b'[g92b] g92 b offset 0.000 deg\n’
b'[g92c] g92 c offset 0.000 deg\n’
b'[g28x] g28 x position 0.000 in\n’
b'[g28y] g28 y position 0.000 in\n’
b'[g28z] g28 z position 0.000 in\n’
b'[g28a] g28 a position 0.000 deg\n’
b'[g28b] g28 b position 0.000 deg\n’
b'[g28c] g28 c position 0.000 deg\n’
b'[g30x] g30 x position 0.000 in\n’
b'[g30y] g30 y position 0.000 in\n’
b'[g30z] g30 z position 0.000 in\n’
b'[g30a] g30 a position 0.000 deg\n’
b'[g30b] g30 b position 0.000 deg\n’
b'[g30c] g30 c position 0.000 deg\n’
b’tinyg [inch] ok> \n’July 16, 2019 at 10:45 am #11441orangejsxMemberJust realizing I didnt put the code on there to home. I have a case==2 statement that just has serial writes:
G28.2 X0 Y0
July 17, 2019 at 5:18 pm #11443cmcgrath5035ModeratorThis stuff is difficult to read.
I extracted the following sequence from your post above
……
b'[xvm] x velocity maximum 1500 mm/min\n’
b’tinyg [mm] ok> \n’
b'[yvm] y velocity maximum 1500 mm/min\n’
b’tinyg [mm] ok> \n’
…
b'[xvm] x velocity maximum 1000 in/min\n’
…
b'[yvm] y velocity maximum 59 in/min\n’I am also not sure why you are bouncing back and forth between mm and in.
……
I am thinking perhaps I am only seeing responses from tinyG?
How did you set the original parameters?
How do you provide flow control with this scripting?Sending parameters and Gcode to tinyG needs some sort of flow control on the link, not obvious how you are doing that.
If you python script is writing too fast to tinyG, there is a chance that the parameter memory (EEPROM) has been corrupted, but I can’t tell for sure.
I suggest you get a simple, managed interface up and running, such as CoolTerm. Then dump a $$, copy and paste to file and post to a cloud drive – as you can tell, this interface make large files unreadible.
I am looking for something like THIS https://drive.google.com/open?id=1UfFv7x0vAvHA1Zi0dKH5_SssQsyxJXMV
July 19, 2019 at 3:15 pm #11445cmcgrath5035ModeratorIt took me a bit to dig this out of the wiki
CAVEAT: At the current time because of various limitations of the Xmega we recommend waiting for each config command to send a response before sending the next command. This gives allows the system to persist the data to EEPROM, because during that interval the board cannot reliably receive serial input.
Good to review https://github.com/synthetos/TinyG/wiki/TinyG-Command-Line
-
AuthorPosts
- You must be logged in to reply to this topic.