沙冰主板调试

stepper-motors [Smoothieware]

主要资料来自官网,这儿直接上图吧

 

沙冰主板支持G代码,因此,最核心的就是如何编写G代码了。

发送相关的命令即可:

# 打开mos(我习惯叫他指示灯)
M800 M802 M804 M806 M808 M810

#位置移动 X到100 速度3000,Y移动到100  速度3000 Z移动到100 速度3000
G0 X100 F3000 Y100  F3000 Z100 F3000
G0 X10 F3000 Y10 F3000 Z0 F3000
G0 X100 F3000 Y100  F3000 Z100 F3000
G0 X40 F3000 Y10 F3000 Z0 F3000

# 关闭mos
M801 M803 M805 M807 M809 M811
# 查询温度
M115
# 其他代码请产找官方文档

下面是来自官方的一些demo

supported-g-codes [Smoothieware]

有时候打开很慢, 这里先记录下来

G-CodeDescriptionExample
G0Move to the given coordinates. To the contrary of G1, if there is a tool it will most of the time be off during this kind of move. This is a “go to” move rather than a “do while going to” move. The F parameter defines speed and is remembered by subsequent commands ( specified in millimetres/minute ) (command is modal)G0 X10 Y5 F100
G1Move to the given coordinates, see above for difference with G0. Takes the same F parameter as G0. (command is modal)G1 X20 Y2.3 F200
G2Clockwise circular motion : go to point with coordinates XYZ while rotating around point with relative coordinates IJ (command is not modal)G2 X10 J5
G3Counter-clockwise motion : see above (command is not modal)G3 Y5 X10 I2
G4Dwell S<seconds> or P<milliseconds>, In grbl mode P is float seconds to comply with gcode standardsG4 P1000
G10Do firmware extruder retractG10
G11Do firmware extruder un-retractG11
G10 L1Set extruder tool offset for specified extruder where Pn is the extruder number + 1 (T0 is P1, T1 is P2), This stays set until reset. Permanent change must be added to config, Only active when multiple extruders have been definedG10 L1 P2 X10
G10 L2, G10 L20Set workspace coordinates http://linuxcnc.org/docs/html/gcode/coordinates.html and http://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g10-l2G10 L2 P1 X0
G17Select XYZ plane (command is modal)G17
G18Select XZY plane (command is modal)G18
G19Select YZX plane (command is modal)G19
G20Inch mode : passed coordinates will be considered as Inches, so internally translated to millimeters (command is modal)G20
G21Millimeter mode ( default ) : passed coordinates will be considered as millimeters (command is modal)G21
G28Home The given axis, or if no axis specified home all axis at the same time (edge) NOTE in CNC/grbl mode this is move to park position, use $H to homeG28
G28.1Set Predefined Position - This position will be returned to by G28.2G28.1
G28.2Move to Predefined Position - This perform a rapid move to the Predefined position set by G28.1 (in grbl mode this will do a home)G28.2
G28.3Manual Homing - This allows you to set a home position manually without moving to limit switchesG28.3
G28.4Manual Homing based on actuator position- This allows you to set a home position manually based on actuator position (used for rotary delta)G28.4
G28.5Clears the homed flag for the specified axis, or all if not specifedG28.5 G28.5 Z0
G28.6Shows the homing status of each axisG28.6
G29Probes the bed and outputs the bed heights depending on levelling strategy selected, see ZProbeG29
G30Simple Z probe at current XY, reports distance moved down until probe triggers. optional F parameter defines the speed of probing, zprobe.slow_feedrate is used when not suppliedG30 G30 F100
G31Depends on levelling strategy selected, see ZProbeG31
G32Depends on levelling strategy selected, see ZProbe. For calibration on delta, uses Z probe to calibrate delta endstops and arm radius, use R parameter to select only arm radius calibration and E to select only endstop calibration. I to set target precision, J to set probe_radius, K to keep current endstop trim settings. In Zgrid module, it starts the grid probingG32 G32 R G32 E G32 EK G32 I0.02
G38.2 G38.3 G38.4 G38.5Standard probe commands implemented as documented hereG38.2 Z-10
G43.2Baby stepsG43.2 Z0.05
G53Must be on a line by itself OR the first G code on a line, the directly following G0/G1 will be executed in MCS coordinatesG53 G0 X0 Y0
G54-G59.3use workspace coordinates http://linuxcnc.org/docs/html/gcode/coordinates.html and http://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g54-g59.3G54
G90Absolute mode ( default ) (command is modal)G90
G91Relative mode (command is modal)G91
G92Set global workspace coordinate system to specified coordinates http://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g92G92 X0 Y0 Z0
G92.1Clear the G92 and G30 Znnn offsetsG92.1
G92.4manually set homing (MCS) for XYZG92.4 X0 Y0 Z0
M-CodeDescription
M3Starts the spindle. Only if spindle module is enabled. The S parameter sets the speed in rotations per minuteM3 S5000
M5Stops the spindle Only if spindle module is enabled.M5
M7Starts the mist switch for CNC (Need to create a switch called : switch.mist.enable).M7
M8Starts the flood switch for CNC (Need to create a switch called : switch.flood.enable).M8
M9Stops the mist and flood at same time (like LinuxCNC and GRBL).M9
M17Enable stepper motorsM17
M18Disable stepper motors. With a parameter it will disable that stepper motor A will disable extruder 1 B will disable extruder 2. E0 will disable the currently selected extruderM18 M18 X0 M18 E0
M20List SD card filesM20
M21Initialize the SD card. This does nothing in Smoothie but is kept for compatibilityM21
M23Select a file NOTE filename MUST be lowercaseM23 file.gcode
M24Start or resume SD card printM24
M25Pause SD card printM25
M26Abort a SD card printM26
M27Report print progressM27
M28Begin write to SD card. Use M29 to indicate end of file.M28 file.gcode
M29End write to SD card. Used to end file write started with M28.M29
M30Delete a file on the SD cardM30 file.gcode
M32Select a file, and start playing itM32 file.gcode
M82Set absolute mode for extruder onlyM82
M83Set relative mode for extruder onlyM83
M84Disable steppersM84
M92Set axis steps per mm for XYZ axis and/or ABC axis (M92 A100 sets A axis if it is NOT an extruder)M92 X200 M92 A1000
M104Set Extruder Temperature - S<temperature>M104 S190
M105Read current tempM105
M106Turn fan ONM106
M107Turn fan OFFM107
M109Set Extruder Temperature and Wait - S<temperature>M109 S190
M110Set current line number -N<line number>N123 M110
M112Halt all operations, turn off heaters, go into Halt stateM112
M114Show current position of all axes, XYZ will be the last requested positionM114
M114.1Show current real time position of all axesM114.1
M114.2Show current real time machine position of all axesM114.2
M114.3Show current real time actuator position of all actuatorsM114.3
M114.4Show last milestoneM114.4
M114.5Show last machine positionM114.5
M117Display message on LCD, blank message will clear itM117 hello world M117
M119Show limit switch statusM119
M120“Push” the current feed-rate and seek-rate so that another one can be temporarily used, then the current one can be restoredM120
M121“Pop” the current feed-rate and seek-rate, see M120M121
M140Set Bed Temperature - S<temperature>M140 S55
M143Set Maximum Temperature - S<heater index> P<temperature>M143 S0 P300
M190Set Bed Temperature and Wait - S<temperature>M190 S55
M200Set E units for volumetric extrusion - D<filament diameter> set to 0 to disable volumetric extrusionM200 D3.0
M203Set maximum cartesian feedrate your machine can sustain <mm/sec>M203 X100 Y100 Z100 E10
M203.1Set maximum actuator feedrate your machine can sustain <mm/sec>M203.1 X100 Y100 Z100
M203 VnnnSet maximum volumetric rate your extruider/hotend can sustain where nnn is <mm³/sec>M203 V50
M204S<acceleration> Set default acceleration in mm/sec² NB setting axis acceleration will mean that the acceleration for a given move will be the lowest of the axis specified, the default is used if a specific axis is not setM204 S1000 X500 Z100 E500
M205X<junction deviation> Z<z junction deviation> S<minimum planner speed>, Z junction deviation only applies to z only moves, 0 disables junction deviation for Z, -1 uses global junction deviationM205 X0.05 S30.0
M206Set homing offsetsM206 X10 Y3 Z0.5
M207Set retract length Smm Fmm/min Zzlift/hop Qfeedrate mm/minM207 S4 F30 Z1
M208Set retract recover length Smm surplus to the M207 S* Fmm/minM208 S0 F8
M220S<factor in percent>- set speed factor override percentageM220 S50
M221S<flow rate factor in percent>- set flow rate factor override percentage for current extruderM221 S50
M301Edit temperature control PID parameters X<i_max> Y<max_pwm>M301 S0 P30 I10 D10 X255.0000 Y255
M303Begin PID auto-tune cycle E<hotendid> S<temperature>M303 E0 S185 - Tune extruder - M303 E1 S100 - Tune printbed -
M304Abort PID auto-tuningM304
M305Set parameters for the thermistor, where B is beta, R is r0 and X is t0; P is the ID from the thermistors list (use console command Thermistors to get a list).M305 B4066
M306Set homing offsets based on current position, subtracts current position from homing offset for specified axisM306 Z0
M360Scara Morgan: Move to Theta 0 degree position. Adding P0 will save the current arm position as the Theta 0 degree positionM360 M360 P0
M361Scara Morgan: Move to Theta 90 degree position. Adding P0 will save the current arm position as the Theta 90 degree positionM361 M361 P0
M364Scara Morgan: M364: Move to Psi + Theta 90 degree position. Adding P0 will save the current arm position as the Psi + Theta 90 degree positionM364 M364 P0
M370Z grid strategy: clears the ZGrid and the bed levelling is disabled until G32 is run again.M370
M374Z grid strategy: save calibration grid.M374
M375Z grid strategy: load calibration grid.M375
M375.1display the current gridM375.1
M400Wait for the queue to be empty and the motors to stop before the M400 answers okM400
M407Get filament detector informationM407
M500Save some volatile settings to an override fileM500
M501Load config-override file optionally specifying the extensionM501 - loads config-override, M501 test1 - loads config-override.test1
M502Delete the override file, reverting to config settings at next resetM502
M503Display overridden settings if anyM503
M504Save the settings to an override file with specified extensionM504 test1 - saves to config-override.test1
M557Defines probe pointsM557 P1 X30 Y40.5
M561Clears the plane and the bed leveling is disabled until G32 is run againM561
M565Defines the probe offsets from the nozzle or tool headM565 X3 Y4.5 Z-2.37
M600Suspend print in progress (use M601 to continue)M600
M601Resume suspended printM601
M665Set arm solution specific settings: Delta - L<arm length> R<arm radius> Z<max height>M665 L341.0 R350 Z430
M666On a delta sets trim values for the endstops. (Positive values will crash physical endstops.)M666 X-0.1 Y-0.2 Z-0.3
M670ZProbe feedrates Slow/fast(K)/Return (mm/sec) max_z (mm) height (mm)M670 S5.00 K100.00 R0.00 Z357.55 H5.00
M906Set Current in milliamp for SPI drivers, only if the driver is handled by the motorcontrol moduleM906 A1000 B1100
M907Set Current control via digipot for each axis (current in amps)M907 X1.0 Y1.0 Z1.0 A1.5
M909Set microsteps (1/n), ONLY for advanced drivers handled by motordriver module, M909.1 will also set the steps/mm accordinglyM909 A16 B64
M910.xSetup advanced driver chips that support SPI setup, parameters are specific to each chip see chip docsM910
M957(with Spindle module enabled) Report the current spindle speed and PWM valueM957
M958(with Spindle module enabled) Report the current spindle PID parameters. M958 Px.xx Ix.xx Dx.xx will set them (to save the new values, you need to edit config file manually).M958 P0.1
M999Reset from a halted state caused by limit switch, M112 or kill switchM999

G Code comments begin at a semicolon, and end at the end of the line:
Example:

G0 X7 Y8 ;this is the comment

ADDITIONAL CODES

The Smoothieware configuration file permits the association of additional codes with some tool functions. For example, for a Switch module, you can specify an arbitrary command in the 'input_on_command' and 'input_off_command'. This means that some additional codes may be available, depending on your specific configuration file.

For example, if you are using servos, then you will likely have configured the following commands:

G-CodeDescriptionExample
M280Move servo to S<position> where position is 0-100M280 S20 ; move servo to position 20 = 20% duty cycle
M281Turn off servoM281 ; Same as M280 S0 0% duty cycle, effectively off

Additionally, in your configuration, you can assign sub-commands to deal with multiple tools of the same type, for example:

G-CodeDescription
M280.1Move your first servo
M280.2Move your second servo

TOOL CHANGE

Tn will change the tool to n for all future commands, it may appear anywhere on the line or on a line by itself
T1 M200 M200 T1

NOTE This is not compatible with the G-code spec, but unfortunately most slicers create incorrect Gcode for tool change.

Note in smoothie there must be a space in front of a line that is affected by a modal G code.
Some G code processors like HeeksCNC don't prefix the space neither do they prefix each line with the modal G code.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

;ls -la ;

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值