点击上方,关注我哈
(如果觉得文章能帮助你学习,请帮我转发!)
升级Mastercam后处理!what??从来都是只听说过软件升级,后处理还能升级,这是什么东东?看我慢慢说道:
在Mastercam不同版本下,后处理原理相同的,但是不同版本格式是稍微不同的,直接调用是不行的;
低版本的V9后处理等只需要一个“”.PST“”文件即可,只需选择后处理就可以了,但是到了高版本需要机床、控制、后处理三个文件(我们俗称的“”三剑客“”),有些麻烦吗?不,如果后处理文件在做好机床和控制环境后,一样直接替换后处理就可以了。
我们先看看v9后处理格式
"%", e
*progno, e
"(", sprogname, ")", e
#"(DATE=DD-MM-YY - ", date, " TIME=HH:MM - ", time, ")", e
#pbld, n, *smetric, e
#pbld, n, *sgcode, *sgplane, "G40", "G49", "G80", *sgabsinc, e
sav_absinc = absinc
if mi1 <= one, #Work coordinate system
[
absinc = one
#pfbld, n, sgabsinc, *sg28ref, "Z0.", e
#pfbld, n, *sg28ref, "X0.", "Y0.", e
#pfbld, n, "G92", *xh, *yh, *zh, e
absinc = sav_absinc
]
pcom_moveb
c_mmlt #Multiple tool subprogram call
ptoolcomment
comment
pcan
if stagetool >= zero, pbld,"/", n, *t, "M6", e
pindex
if mi1 > one, absinc = zero
pcan1, pbld, n, *sgcode, *sgabsinc, "G54", pfxout, pfyout,
pfcout, *speed, *spindle, pgear, strcantext, e
pbld, n, "G43", *tlngno, pfzout, scoolant, next_tool, e
absinc = sav_absinc
pcom_movea
toolchng = zero
c_msng #Single tool subprogram call
ptlchg0 #Call from NCI null tool change (tool number repeats)
pcuttype
pcom_moveb
c_mmlt #Multiple tool subprogram call
comment
修改Mastercam后处理,或许很多人觉得太高大上,毕竟不是每个人都能做到的,好多人只是停留在软件应用阶段,那么如果你有个低版本的后处理,如何变化到高版本的后处理,然后直接调用就可以了,对,就是这个思路!!
如何升级??? 举例从v9到x9升级来说明:
在x9的主界面下,按Ait+C呼出Mastercam的程序扩展空能
选择Updatepost.dll
3.确认你的后处理类型,选择你原有后处理版本(例如从v9升级到x9,选择x9),选择后处理文件夹,然后选择低版后处理文件,选择是否创建机床和控制文件,其余的可以忽略,然后确定!
4.这时候再看原文件位置,会多出一个文件,一个是新升级后x9版的后处理,一个是原来v9版的后处理文件备份.
截取一段看一下,后处理和原来的格式不一样了吧,多了很多美元$符号。对!这就是高版和低版后处理的区别
psof0$ #Start of file for tool zero
psof$
psof$ #Start of file for non-zero tool number
pcuttype
toolchng = one
if ntools$ = one,
[
#skip single tool outputs, stagetool must be on
stagetool = m_one
!next_tool$
]
"%", e$
*progno$, e$
"(", sprogname$, ")", e$
#"(DATE=DD-MM-YY - ", date, " TIME=HH:MM - ", time, ")", e
#pbld, n, *smetric, e
#pbld, n, *sgcode, *sgplane, "G40", "G49", "G80", *sgabsinc, e
sav_absinc = absinc$
if mi1$ <= one, #Work coordinate system
[
absinc$ = one
#pfbld, n, sgabsinc, *sg28ref, "Z0.", e
#pfbld, n, *sg28ref, "X0.", "Y0.", e
#pfbld, n, "G92", *xh, *yh, *zh, e
absinc$ = sav_absinc
]
pcom_moveb
c_mmlt$ #Multiple tool subprogram call
ptoolcomment
comment$
pcan
if stagetool >= zero, pbld,"/", n$, *t$, "M6", e$
pindex
if mi1$ > one, absinc$ = zero
pcan1, pbld, n$, *sgcode, *sgabsinc, "G54", pfxout, pfyout,
pfcout, *speed, *spindle, pgear, strcantext, e$
pbld, n$, "G43", *tlngno$, pfzout, scoolant, next_tool$, e$
absinc$ = sav_absinc
pcom_movea
toolchng = zero
c_msng$ #Single tool subprogram call
ptlchg0$ #Call from NCI null tool change (tool number repeats)
pcuttype
pcom_moveb
c_mmlt$ #Multiple tool subprogram call
comment$
pcan
pbld, n$, sgplane, e$
pspindchng
pbld, n$, scoolant, e$
if mi1$ > one & workofs$ <> prv_workofs$,
好了,赶紧去试试吧!出个程序看看!!
另外告诉你X9-2018后处理通用,如果从v9直接升级到2018不成功的话,建议可以先试着升级到X9,再升级到2018.........................
本文章需要补充太多,篇幅有限,在此省略无数,下次补充!!
觉得文章对你有帮助,请给我点赞!
毕竟你的关注和鼓励才是我的动力!