Printrun基础知识

1、简介

Printrun是一个纯Python的3D打印宿主程序,包括printcore、pronsole和pronterface三个模块和一些有用的脚本。
printcore.py是一个将写reprap hosts变得简单的库。
pronsole.py是一个可Tab补全的命令行交互软件。
pronterface.py与printcore功能相同,但提供图形界面。

2、Pronterface的详解

3D打印机的调试(先将各轴置于起点,再检查各轴运动的范围)
单位为毫米(表示x,y,z轴的移动距离)
M303 s220 c5表明打印喷头的PID,升温完成后可得到对应的PID参数,可以通过命令M301 p_ i_ d_设置,也可以直接在Marlin固件中修改。
M303 E-1 C8 S60表明将热床加热到60°

3、操作

1)将开发板连接至计算机上的USB端口,运行pronterface.py;
2)选择串口与波特率,单机连接,稍等片刻,即可确认(当启动控制器固件时,它将作出反应大约10秒);
3)显示自定义按钮
4)确认设置:梅尔齐控制器运行Marlin固件,可从Pronterface调整许多机器的特定设置,而无需上传新的固件。要检查当前设置,发送一个M503命令给机器,即可看到设置。
5)更改设置:发送相关的命令和参数,在Pronterface中更新的任何设置都是立即生效,但不会保存在EEPROM中,直至发送M500命令后,设置将保留到电源关闭。

PS:
上位机操作实例1
上位机操作实例2
上位机操作实例3
上位机操作实例4
G代码解读
G M指令汇总
基础介绍

4、主机命令

Pronsole and the console interface in Pronterface accept a number of commands which you can either use directly or inside your G-Code. To run a host command from inside a G-Code, simply prefix it with ;@.

List of available commands:

pause: pauses the print until the user resumes it
run_script scriptname [arg1 …]: runs a custom script or program on the host computer. This can for instance be used to produce a sound to warn the user (e.g. run_script beep -r 2 on machines were the beep util is available), or to send an email or text message at the end of a print. The s t o k e n c a n b e u s e d i n t h e a r g u m e n t s t o g e t t h e c u r r e n t g c o d e f i l e n a m e r u n g c o d e s c r i p t s c r i p n a m e [ a r g 1... ] : s a m e a s r u n s c r i p t , e x c e p t t h a t a l l l i n e s d i s p l a y e d b y t h e s c r i p t w i l l b e i n t e r p r e t e d i n t u r n ( s o t h a t G − C o d e l i n e s w i l l b e i m m e d i a t e l y s e n t t o t h e p r i n t e r ) s h e l l p y t h o n c o m m a n d : r u n a p y t h o n c o m m a n d ( c a n a l s o b e a c h i e v e d b y d o i n g ! p y t h o n c o m m a n d ) s e t o p t i o n v a l u e : s e t s t h e v a l u e o f a n o p t i o n , e . g . s e t m a i n v i z 3 D c o n n e c t b l o c k u n t i l o n l i n e : w a i t f o r t h e p r i n t e r t o b e o n l i n e . F o r i n s t a n c e y o u c a n d o p y t h o n p r o n s o l e . p y − e " c o n n e c t " − e " b l o c k u n t i l o n l i n e " − e " u p l o a d o b j e c t . g c o d e " t o s t a r t p r o n s o l e , c o n n e c t f o r t h e p r i n t e r , w a i t f o r i t t o b e o n l i n e t o s t a r t u p l o a d i n g t h e o b j e c t . g c o d e f i l e . d i s c o n n e c t l o a d g c o d e f i l e u p l o a d g c o d e f i l e t a r g e t . g : u p l o a d g c o d e f i l e t o t a r g e t . g o n t h e S D c a r d s l i c e s t l f i l e : s l i c e s t l f i l e a n d l o a d t h e p r o d u c e d G − C o d e p r i n t : p r i n t t h e c u r r e n t l y l o a d e d f i l e s d p r i n t t a r g e t . g : s t a r t a S D p r i n t l s : l i s t f i l e s o n S D c a r d e t a : d i s p l a y r e m a i n i n g p r i n t t i m e g e t t e m p : g e t c u r r e n t p r i n t e r t e m p e r a t u r e s s e t t e m p : s e t h o t e n d t a r g e t t e m p e r a t u r e b e d t e m p : s e t b e d t a r g e t t e m p e r a t u r e m o n i t o r : m o n i t o r p r i n t e r p r o g r e s s d u r i n g a p r i n t t o o l K : s w i t c h t o t o o l K m o v e x K : m o v e a l o n g x a x i s ( w o r k s w i t h o t h e r a x e s t o o ) e x t r u d e l e n g t h [ s p e e d ] r e v e r s e l e n g t h [ s p e e d ] h o m e [ a x i s ] o f f : t u r n s o f f f a n s , m o t o r s , e x t r u d e r , h e a t b e d , p o w e r s u p p l y e x i t 译 文 : P r o n t e r f a c e 中 的 P r o n s o l e 和 控 制 台 接 口 可 以 接 受 许 多 命 令 , 这 些 命 令 可 以 直 接 使 用 , 也 可 以 在 G 代 码 中 使 用 。 要 从 G 代 码 内 部 运 行 主 机 命 令 , 只 需 在 其 前 面 加 上 ; @ . 可 用 命 令 列 表 : 1 ) p a u s e : 暂 停 打 印 , 直 到 用 户 恢 复 打 印 2 ) r u n s c r i p t s c r i p t n a m e [ a r g 1... ] : 在 主 机 上 运 行 自 定 义 脚 本 或 程 序 , 或 者 在 打 印 结 束 时 发 送 电 子 邮 件 或 文 本 消 息 。 s token can be used in the arguments to get the current gcode file name run_gcode_script scripname [arg1 ...]: same as run_script, except that all lines displayed by the script will be interpreted in turn (so that G-Code lines will be immediately sent to the printer) shell pythoncommand: run a python command (can also be achieved by doing !pythoncommand) set option value: sets the value of an option, e.g. set mainviz 3D connect block_until_online: wait for the printer to be online. For instance you can do python pronsole.py -e "connect" -e "block_until_online" -e "upload object.gcode" to start pronsole, connect for the printer, wait for it to be online to start uploading the object.gcode file. disconnect load gcodefile upload gcodefile target.g: upload gcodefile to target.g on the SD card slice stlfile: slice stlfile and load the produced G-Code print: print the currently loaded file sdprint target.g: start a SD print ls: list files on SD card eta: display remaining print time gettemp: get current printer temperatures settemp: set hotend target temperature bedtemp: set bed target temperature monitor: monitor printer progress during a print tool K: switch to tool K move xK: move along x axis (works with other axes too) extrude length [speed] reverse length [speed] home [axis] off: turns off fans, motors, extruder, heatbed, power supply exit 译文: Pronterface中的Pronsole和控制台接口可以接受许多命令,这些命令可以直接使用,也可以在G代码中使用。要从G代码内部运行主机命令,只需在其前面加上;@. 可用命令列表: 1)pause: 暂停打印,直到用户恢复打印 2)run_script scriptname [arg1 ...]:在主机上运行自定义脚本或程序,或者在打印结束时发送电子邮件或文本消息。 stokencanbeusedintheargumentstogetthecurrentgcodefilenamerungcodescriptscripname[arg1...]:sameasrunscript,exceptthatalllinesdisplayedbythescriptwillbeinterpretedinturn(sothatGCodelineswillbeimmediatelysenttotheprinter)shellpythoncommand:runapythoncommand(canalsobeachievedbydoing!pythoncommand)setoptionvalue:setsthevalueofanoption,e.g.setmainviz3Dconnectblockuntilonline:waitfortheprintertobeonline.Forinstanceyoucandopythonpronsole.pye"connect"e"blockuntilonline"e"uploadobject.gcode"tostartpronsole,connectfortheprinter,waitforittobeonlinetostartuploadingtheobject.gcodefile.disconnectloadgcodefileuploadgcodefiletarget.g:uploadgcodefiletotarget.gontheSDcardslicestlfile:slicestlfileandloadtheproducedGCodeprint:printthecurrentlyloadedfilesdprinttarget.g:startaSDprintls:listfilesonSDcardeta:displayremainingprinttimegettemp:getcurrentprintertemperaturessettemp:sethotendtargettemperaturebedtemp:setbedtargettemperaturemonitor:monitorprinterprogressduringaprinttoolK:switchtotoolKmovexK:movealongxaxis(workswithotheraxestoo)extrudelength[speed]reverselength[speed]home[axis]off:turnsofffans,motors,extruder,heatbed,powersupplyexitPronterfacePronsole使G使G;@.1pause:2runscriptscriptname[arg1...]:s标记可用于参数中
以获取当前gcode文件名
3)run_gcode_script scripname [arg1 …]:与run_script相同,只是脚本显示的所有行将依次解释(这样G代码行将立即发送到打印机)
4)shell pythoncommand: 运行一个python命令
5)set option value: 设置选项的值
6)connect:连接
7)block_until_online:等待打印机联机
8)disconnect:未连接
9)load gcodefile:载入G-code
10)upload gcodefile target.g: 将gcodefile上载到SD卡上的target.g
11)slice stlfile: 切片stlfile并加载生成的G代码
12)print:打印当前加载文件
13)sdprint target.g:启动一个SD打印
14)ls: 列出SD卡上的文件
15)eta: 显示剩余打印时间
16)gettemp: 获得当前打印机温度
17)settemp: 设置热端目标温度
18)bedtemp: 设定热床温度
19)monitor: 在打印过程中监视打印机进程
20)tool K: 切换到工具K
21)move xK: 沿X轴移动(其他轴同理)
22)extrude length [speed]:挤出长度【速度】
23)reverse length [speed]:反向长度【速度】
24)home [axis]:原点
25)off: 关闭风扇、电机、挤出机、热床、电源
26)exit:退出
2、输入M503(查看当前参数)指令后显示
echo:start
Marlin 2.0.6
echo: Last Updated: 2020-07-28 | Author: (none, default config)
echo:Compiled: Aug 27 2020
echo: Free Memory: 5742 PlannerBufferBytes: 1136 //可用内存
echo:Hardcoded Default Settings Loaded
echo: G21 ; Units in mm (mm)
echo:; Filament settings: Disabled
echo: M200 S0 D1.75
echo:; Steps per unit:
echo: M92 X200.00 Y200.00 Z4000.00 E500.00 //步进数
echo:; Maximum feedrates (units/s):
echo: M203 X300.00 Y300.00 Z5.00 E25.00 //最大进给速度
echo:; Maximum Acceleration (units/s2):
echo: M201 X3000.00 Y3000.00 Z100.00 E10000.00 //最大加速度
echo:; Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
echo: M204 P3000.00 R3000.00 T3000.00
echo:; Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> J<junc_dev>
echo: M205 B20000.00 S0.00 T0.00 J0.01
echo:; Home offset:
echo: M206 X0.00 Y0.00 Z0.00 //原点偏移
echo:; PID settings:
echo: M301 P22.20 I1.08 D114.00 //PID设置
Printer is now online.

  • 2
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
### 回答1: klipper固件是一款针对3D打印机的开源固件,可用于替代传统的Marlin或Repetier固件。下面是klipper固件的使用教程: 1. 准备工作:首先,确保你的3D打印机兼容klipper固件。klipper固件支持许多主板和控制器,包括RAMPS、SKR、Duet等。确认你的硬件与klipper兼容。 2. 安装klipper固件:下载最新版本的klipper固件,并将其解压缩到计算机上。然后,将固件文件复制到SD卡中,并将SD卡插入到3D打印机的主板中。 3. 配置klipper固件:klipper固件使用一种名为“klipper.conf”的配置文件来定义打印机的设置。你可以根据你的打印机类型和设置需求编辑此文件。配置文件包括定义打印区域、选择热床和挤出头类型、设定运动参数等。 4. 连接到主机:使用USB线将计算机与3D打印机主板连接起来。你需要安装klipper的通信软件,例如OctoPrint或Printrun。通过这个软件,你可以与klipper固件进行通信,发送打印命令并监视打印过程。 5. 测试和校准:在开始正式打印之前,建议进行测试和校准操作以确保一切正常。这可能包括校准步进电机、热床和热头温度、挤出量等。你可以使用klipper固件提供的命令行工具来执行这些操作。 6. 开始打印:完成以上步骤后,你可以开始使用klipper固件进行打印。选择合适的打印文件,并使用klipper的通信软件发送打印命令。在打印过程中,你可以实时监视打印机状态,并在需要时进行调整。 总之,klipper固件是一款功能强大且灵活的固件,可提供更精确和高速的打印,同时还支持许多额外的功能和扩展。学会使用klipper固件可能需要一些时间和实践,但一旦掌握,它将使你的3D打印机性能得到显著提升。 ### 回答2: Klipper固件是一种针对3D打印机的固件,它可以提供更高的性能和精度。以下是Klipper固件的使用教程: 首先,需要在计算机上安装OctoPrint软件,这是一种流行的3D打印机管理软件。然后,连接计算机和3D打印机,并确保它们可以正常通信。 接下来,下载Klipper固件的压缩包,并解压缩到计算机上。然后,打开OctoPrint软件,在页面上找到插件管理部分,安装名为“Klipper”的插件。 安装插件后,重新启动OctoPrint软件,并进入设置页面。在设置页面的“Klipper”选项中,输入3D打印机的串口号和波特率,以及Klipper固件的配置文件路径。 保存设置后,可以通过点击OctoPrint软件的“连接”按钮来连接3D打印机。连接成功后,可以在OctoPrint软件中加载并编辑3D模型,并设置打印参数。 点击“打印”按钮后,OctoPrint软件会将打印任务发送给Klipper固件。Klipper固件将负责控制3D打印机的运动,并将实时状态信息反馈给OctoPrint软件。 在打印过程中,可以通过OctoPrint软件来监控和控制打印机。如果需要更改打印参数或者停止打印任务,可以在软件中进行相应操作。 完成打印后,记得断开3D打印机和计算机之间的连接,并进行相关清洁和维护工作。 总之,Klipper固件的使用相对较简单,只需要通过OctoPrint软件进行配置和控制即可。它可以提供更高的打印质量和性能,让用户更加方便地进行3D打印。 ### 回答3: Klipper固件是一种在3D打印机上使用的第三方固件,它具有高性能、低内存消耗和更快的处理速度等优势。以下是Klipper固件的使用教程。 1. 准备工作:首先确认您的3D打印机型号是否支持Klipper固件,并下载适用于您的打印机型号的Klipper固件文件。 2. 安装Klipper固件:将Klipper固件文件复制到您的3D打印机主板上的SD卡中,并将SD卡插入到主板槽中。 3. 配置Klipper固件:找到SD卡中的配置文件klipper.cfg,在文件中配置打印机型号、机械参数、步进电机设置等参数,并将配置文件保存到SD卡中。 4. 连接主机和打印机:通过USB连接主机和打印机,打开主机软件(如OctoPrint)并连接到打印机。 5. 启动Klipper固件:在主机软件中运行以下命令,启动Klipper固件: `sudo service klipper start` 6. 调试和优化:您可以通过主机软件发送命令给Klipper固件,如移动步进电机、调整打印温度等。您还可以根据需要调整配置参数来优化打印品质和速度。 7. 固件更新:Klipper固件是一个持续开发和更新的项目,您可以定期检查Klipper固件的官方网站或社区,下载最新版本的固件并更新到您的打印机上。 这是一个简要的Klipper固件使用教程,希望对您有帮助。更详细的教程和故障排除请参考Klipper固件的官方文档或社区。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值