fb程序报16#2522错误
郑志武
发布于2012-12-25 01:01
13
0
标签:
做了一个fb,总报16#2522,也不知道哪里错误。
a#reset_1//reset
jcnm001
l0
t#pos
t#control
r#reset_1
l0
t#dest
m001:nop0
a#restart//cycle
jcnm010
l1
t#pos
t#control
l32
t#temp1
r#restart
m010:nop0
l#pos
l0
==i
a#start
fp#pulse2
=#pulse3
a#pulse3
jcnm011
l0
t#temp1
m011:a#start//startcond.
jcnm003
opn#i_file
ldbd[#temp1]
t#i_file_1
l#i_mask
t#i_mask_1
l#i_source
t#source_1
l#length
t#length_1
opn#o_file
ldbd[#temp1]
t#o_file_1
l#o_mask
t#o_mask_1
l#o_file_1
l#o_mask_1
ad
//cad
t#dest
l#dest_1
==d
fp#pulse1
=#en
l#dest
t#dest_1
l#i_file_1
l#i_mask_1
ad
t#i_file_2
l#i_file_2//==
l#source_1//==
==d
jcm002
jum003
m002:nop0
l#pos
l1
+i
t#pos
t#control
l#pos
l32
*d
t#temp1
m003:nop0
l#pos//exteriorset
l#control
<>i
jcm004
jum005
m004:nop0
l#pos
t#control
l#pos
l32
*d
t#temp1
m005:l#pos
l#length
>i
=#restart
a#reset
s#reset_1
l#temp1
l#temp2
问题补充:
我在仿真软件上测试一切ok,通过plc调用就使得sf亮红灯
佳答案
先把fb所需的相应数据块下载到plc里面去,再重新启动看看。还要注意你的#temp,形参与实参的数据类型是否匹配。
看一下诊断缓冲区,看看报的什么警才知道为什么sf亮,方便找故障原因