need help with workspace coordinate
-
@bearer said in need help with workspace coordinate:
Maybe you should include the whole set of config and scripts?
Look up markdown to see how to format the text using ``` on a line over and under the code to help with formatting etc.
I am not sure what you mean by look up markdown. Do you mean to post the config.g content?
-
@Danal said in need help with workspace coordinate:
This is a rather odd way to achieve the goal of having a print bed that is offset from the homing switches. It might be possible to do it this way, but I'd have to do a lot of experimenting to prove or disprove that it would work. It is also a bunch of configuration (like switching from 54 to 55 in macros) that the machine will do for you.
G54, 55, etc. are normally used to provide offset to fixtures, or stock, within the bounds of the axis. Ask if you want to know more about this.
The more conventional way to deal with switches that are offset from the actual bed is to specify the axis limits with negative numbers for the low number. For example, if your limit switches relate to a 300x300 bed such that the bed really starts at X5 and Y10, then
M208 X-5:300 Y-10:300
This makes a corner of the bed be 0,0, which makes the slicer happy, Makes G28 move to that corner, etc, etc.
Again, you can experiment with lots of things, there's definitely "more than one way to do it" with most things in Gcode. At the same time, a really fundamental thing like axis limits, it may be better to "go with the flow" of configuration that makes it easy.
Initially, I tried to set my axis limits to make 0,0 the center of the bed so when I enter the smaller build volume into the slicer, the 0,0 of the slicer and the machine will over lap. The gcode generated didn't work too well when I tested a print and it only moved in the X direction. Almost like it thinks it hit a limit and won't go any further. If I cant get g55 to work, I'll will offset the minimum axis limit switch. It's just tedious since I'll have to make all the adjustments to the tool change scripts as well.
-
@tekstyle said in need help with workspace coordinate:
I am not sure what you mean by look up markdown
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code
Helps with formatting and reability.
Do you mean to post the config.g content?
it could lead to more suggestions or spot something you've missed.
-
@bearer said in need help with workspace coordinate:
@tekstyle said in need help with workspace coordinate:
I am not sure what you mean by look up markdown
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code
Helps with formatting and reability.
Do you mean to post the config.g content?
it could lead to more suggestions or spot something you've missed.
Here is my config.g content
; Configuration file for Duet WiFi (firmware version 3)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v2.1.8 on Mon Feb 24 2020 22:39:52 GMT-0800 (Pacific Standard Time); General preferences
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"coreXY" ; set printer nameM667 S1 ; select CoreXY mode
; Network
M552 S1 ; enable network
M586 P0 S1 ; enable HTTP
M586 P1 S0 ; disable FTP
M586 P2 S0 ; disable Telnet; Drives
M569 P0 S0 ; physical drive 0 goes backwards
M569 P1 S0 ; physical drive 1 goes backwards
M569 P2 S0 ; physical drive 2 goes forwards
M569 P3 S1 ; physical drive 3 goes forwards
M569 P4 S1 ; physical drive 4 goes forwards
M584 X0 Y1 Z2 E3:4 ; set drive mapping
M350 X16 Y16 Z16 E16:16 I1 ; configure microstepping with interpolation
M92 X100.00 Y100.00 Z1600.00 E420.00:420.00 ; set steps per mm
M566 X900.00 Y900.00 Z12.00 E120.00:120.00 ; set maximum instantaneous speed changes (mm/min)
M203 X6000.00 Y6000.00 Z180.00 E1200.00:1200.00 ; set maximum speeds (mm/min)
M201 X500.00 Y500.00 Z20.00 E250.00:250.00 ; set accelerations (mm/s^2)
M906 X1700 Y1700 Z1700 E595:595 I30 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Axis Limits
M208 X0 Y0 Z0 S1 ; set axis minima
M208 X455 Y398 Z365 S0 ; set axis maxima; Endstops
M574 X1 S1 P"xstop" ; configure active-high endstop for low end on X via pin xstop
M574 Y1 S1 P"ystop" ; configure active-high endstop for low end on Y via pin ystop
M574 Z1 S2 ; configure Z-probe endstop for low end on Z; Z-Probe
M558 P5 I1 R0.4 C"^!zprobe.in+^!zprobe.mod" H5 F1200 T10000 ; set Z probe type to effector and the dive height + speeds
G31 P500 X0 Y0 Z0 ; set Z probe trigger value, offset and trigger height
M557 X46:416 Y0:340 S70 ; define mesh grid; Heaters
M308 S0 P"bedtemp" Y"thermistor" A"Bed24" T100000 B3950 ; configure sensor 0 as thermistor on pin bedtemp
M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0
M143 H0 S120 ; set temperature limit for heater 0 to 120C
M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit
M140 H0 ; map heated bed to heater 0M308 S1 P"e0temp" Y"thermistor" T100000 B3950 ; configure sensor 1 as thermistor on pin e0temp
M950 H1 C"e0heat" T1 ; create heater output on e0heat and map it to sensor 1
M143 H1 S120 ; set temperature limit for heater 1 to 120C
M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
M140 P1 H1 ; map heatedbed1 to heater 1M308 S2 P"e1temp" Y"thermistor" T100000 B3950 ; configure sensor 2 as thermistor on pin e1temp
M950 H2 C"e1heat" T2 ; create heater output on e1heat and map it to sensor 2
M143 H2 S120 ; set temperature limit for heater 2 to 120C
M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
M140 P2 H2 ; map heatedbed3 to heater 2; Fans
M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency
M106 P0 S1 H-1 T45 ; set fan 0 value. manual control is turned on;M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency
;M106 P1 S1 H2 T45 ; set fan 1 value. Thermostatic control is turned on; Tools
M563 P0 D0 H3 F0 ; define tool 0
G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets
G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C
M563 P1 D1 H4 F0 ; define tool 1
G10 P1 X0 Y0 Z0 ; set tool 1 axis offsets
G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C
M563 P2 H5 F0 ; define tool 2
G10 P2 X0 Y0 Z0 ; set tool 2 axis offsets
G10 P2 R0 S0 ; set initial tool 2 active and standby temperatures to 0C
M563 P3 H6 F0 ; define tool 3
G10 P3 X0 Y0 Z0 ; set tool 3 axis offsets
G10 P3 R0 S0 ; set initial tool 3 active and standby temperatures to 0C
M563 P4 H7 F0 ; define tool 4
G10 P4 X0 Y0 Z0 ; set tool 4 axis offsets
G10 P4 R0 S0 ; set initial tool 4 active and standby temperatures to 0C; workspace coordinate offset system
G10 L2 P1 X0 Y0
G10 L2 P2 X-21.5 Y34M563 P5 s"Bed1" H1 F0 ; define tool 5
G10 P5 R0 S0 ; set initial tool 5 active and standby temperatures to 0C
M563 P6 s"Bed3" H2 F0 ; define tool 6
G10 P6 R0 S0 ; set initial tool 6 active and standby temperatures to 0C; Custom settings are not defined
; Miscellaneous
M501 ; load saved parameters from non-volatile memory
;T0 ; select first tool -
I was doing some research and can across a ultimaker post that suggested using the G92 command to set a new coordinate. They would use G1 x# y# to place the nozzle at the new 0,0 point and g92 x0 y0 to set it.
The only problem I ran into was I needed to put a homex and homey macro into my tool change scripts or else it would run based on the new coordinates. Then at the end of the script put another G92 to add the offset back.
As danal mentioned, their are many ways to do this. Just trying to find the best way that will also be the easiest to retweak if modifications are required down the line.
-
G92 is a special case of G54 et al. It is a "Work Coordinate System" offset (WCS). It is a little different in that it is "temporary". G54 and so forth, once set, are persisted across power cycles. G92 (by NIST standard anyway) is not. It's main use is to make repeating patterns of the same cut.
Example:
- Jog to corner of stock, set G55, and set G55 WCS such that the corner is 0,0,0 (lots of ways to do this).
- Cut first 'job'.
- G92 enough "over" (or whatever direction) to be in fresh stock.
- Cut same job again.
- Repeat until out of stock.
Your G55 has not been disturbed from the original corner of your stock clamping system (fixture) and is ready to start the next piece of stock. Also, you can "clear" G92, just set it to X0Y0, for your next piece, you don't have to do any math or remember anything.
CNC operators are a lazy as any other human being; they have worked out "best practices" to make things easy and avoid mistakes.
You can certainly figure out ways to use a WCS offset to 0,0 the corner of the bed... but... that's really what the M208 command is intended to do.
-
@tekstyle said in need help with workspace coordinate:
Initially, I tried to set my axis limits to make 0,0 the center of the bed so when I
enter the smaller build volumeinto the slicer, the 0,0 of the slicer and the machine will over lap.(I think you really mean "match each other" instead of "over lap"... but that's just semantics... no worries.)
Bed center of 0,0 is fine and dandy. There is no "smaller build volume", you still get your full bed. It is the standard way to run a Delta with a round bed. Most Cartesian printers seem to prefer 0,0 in a corner, but there is a strong sub-group of people who run 0,0 in the center of square printers as well.
Example 300x300 bed with limit switches 5mm off the edges M208 X-155:150 Y-155:150
The gcode generated didn't work too well when I tested a print and it only moved in the X direction.
Almost like it thinks it hit a limit and won't go any further.Something else was not set correctly. Tons and tons of printers out there setup this way... almost every Delta, for one. You do have to tell the slicer that same setup, usually a check box that says "origin in center" or offsets that will be -150 and positive 150. If you have questions about a specific slicer ask.
It's just tedious since I'll have to make all the adjustments to the tool change scripts as well.
Yep, avoiding that tedium, avoiding figuring out all the 'edge cases' or 'sequences', that's the main reason to just use M208 with the correct offsets to put the origin wherever you want it. It "just works" in all cases.
-
yeah i would also change your M208 to make 0,0,0 the corner of the printable area on the bed and apply offsets to your tools instead of the workspace.
avoid
G92
if you can; as dc42 said all homing and tool change macros are done in machine coordinates instead of work coordinates so it shouldn't be necessary to change when running tool changes. -
-
@bearer
i did a G92 to offset the X by 20mm to the right. when T-1 was invoked, it used that new offset. as you can imagine ,didn't turn out well.
i'll
@dc42 said in need help with workspace coordinate:
@tekstyle, have you seen https://duet3d.dozuki.com/Wiki/Centering_the_bed_or_setting_the_bed_origin ?
yes I have. that's just to set the machine coordinates right? I have decided to set the machine origin at the front left corner. which is also where it homes to. i really want to avoid negative numbers. but it seems like I have no choice.
I tried both G10 L20 P2 Xn Yn Zn and G10 L2 P2 Xn Yn Zn. after homing with the machine coordinate, sending G55 command doesn't change the work coordinate. not sure what to do now.
-
@tekstyle said in need help with workspace coordinate:
i really want to avoid negative numbers.
Why? They are the correct and accurate description of the physical machine.
On this forum, I normally try to say "there are lots of ways to do it" and not be forceful in my comments. However, in this case, I'm going to be super direct: Configure your machine so that the firmware has an accurate description of the mechanics. This will include negative numbers on your axis minima.
@tekstyle said in need help with workspace coordinate:
sending G55 command doesn't change the work coordinate
"Sending" from where? Console? Did you get a green response? If so, the work coordinate system changed.
Note that the web display will not (generally) change until the next move occurs. So do a very small move, just to update things. Something like G91 G1 X0.1 G90 (all three commands can go on one line, as shown).
Also keep in mind you can check workspace offsets with G10 L20 P1, etc. No XYZ, it will show you the existing offsets.
-
@Danal i have configured it the way you suggested with negative numbers as minimum. the origin is correctly aligned with the slicer. ran a test print and seems to be doing fine. Thank you for all the help everyone!
-
Fantastic!! Woo Hoo! Post a pic of a print, when you get to it.