Printrun基础知识

Printrun是一个Python实现的3D打印宿主程序,包括printcore、pronsole和图形界面Pronterface。Pronterface提供了调试打印机、设置参数和控制打印的功能,如PID调节、温度控制、G代码执行等。用户可通过运行特定命令来暂停打印、上传G代码、监测打印进度等。通过M503命令可查看打印机当前设置,如步进数、最大速度、加速度和PID参数等。

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,exceptthatalllinesdisplayedbythescriptwillbein

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值