回复:840D通过FB2可以读出当前加工的零件程序吗

西范斯

  • 帖子

    3614
  • 精华

    36
  • 被关注

    136

论坛等级:至圣

注册时间:2008-12-29

钻石 钻石 如何晋级?

发布于 2012-06-20 19:28:12

14楼

quote:以下是引用haha在2012-06-18 13:23:04的发言:
可以读出行号。每一个回车就算一行程序,通过PLC可以读出此行号。
还可以读出子程序号等。

des cription:
$P_LINENO[n]
Supplies the last programmed line number of program level n.
Example:
$P_LINENO[0]
Supplies the line number of the program on program level 0 = main program level.

PLC with NC-Var-Selector:
Area: C[.]
Data module: SPARP
Variable: actLineNumber[.]
Area number = Channel number
line = 1
系统变量测试:
DEF real _Abc
G4F1
G0G91X1
n9999
_Abc=$P_LINENO[0]
G4F1
G0G91X1
Y1
N1234Z1
m2


最后编程的段号,如果所有程序段无“N...",读出的是空的。
PLC with NC-Var-Selector:
Area: C[.]
Data module: SPARP
Variable: lastBlockNoStr[.]

Area number = Channel number
line = 1
试验:
系统变量
$P_BLOCKNO[n]
Supplies the last programmed block number of program level n.
Example:$P_BLOCKNO[0]
Supplies the modal block number of the program on program level 0 = main program name.
MD 10284 $MN_DISPLAY_FUNCTION_MASK Bit0 must be = 1.
Block numbers programmed during DISPLOF cannot be read with $P_BLOCKNO.

DEF STRING[10] _ASD
G4F1
G0G91X1
Y1
n9999 Z1
_ASD=$P_BLOCKNO[0]
G4F1
G0G91X1
Y1
N1234Z1
m2




评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SINUMERIK

共有25497条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

快扫描右侧二维码晒一晒吧!

再发帖或跟帖交流2条,就能晋升VIP啦!开启更多专属权限!

  • 分享

  • 只看
    楼主

top
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。