CALL FB 2 , DB41
IN0 :=#STAT5
IN1 :=8
IN2 :=P#DB55.DBX 0.0 BYTE 10
IN3 :=
IN4 :=W#16#2
IN5 :=
IN6 :=P#DB55.DBX 0.0 BYTE 10
IN7 :=
IN8 :=W#16#3
IN9 :=
IN10 :=P#DB55.DBX 0.0 BYTE 10
IN11 :=
IN12 :=W#16#4
IN13 :=
IN14 :=P#DB55.DBX 0.0 BYTE 10
IN15 :=
IN16 :=W#16#5
IN17 :=
IN18 :=P#DB55.DBX 0.0 BYTE 10
IN19 :=
IN20 :=W#16#6
IN21 :=
IN22 :=P#DB55.DBX 0.0 BYTE 10
IN23 :=
IN24 :=W#16#7
IN25 :=
IN26 :=P#DB55.DBX 0.0 BYTE 10
IN27 :=
IN28 :=W#16#8
IN29 :=
IN30 :=P#DB55.DBX 0.0 BYTE 10
IN31 :=
IN32 :=W#16#9
IN33 :=
IN34 :=1
OUT35:=#STAT13
OUT36:=#STAT9
OUT37:=#STAT14
IO38 :=P#DB100.DBX 100.0 BOOL 1
IO39 :=P#DB100.DBX 100.1 BOOL 1
IO40 :=P#DB100.DBX 100.2 BOOL 1
IO41 :=P#DB100.DBX 100.3 BOOL 1
IO42 :=P#DB100.DBX 100.4 BOOL 1
IO43 :=P#DB100.DBX 100.5 BOOL 1
IO44 :=P#DB100.DBX 100.6 BOOL 1
IO45 :=P#DB100.DBX 100.7 BOOL 1
A #STAT9
O #STAT13
R #STAT5
S #STAT22
BEU
最佳答案
这主要是对FB2的调用, IN0~ IN34是FB2的输入接口参数; OUT35~ OUT37是FB2的输出接口参数; IO38 ~IO45是给输入/输出接口赋值DB100的地址;
接下来:
A #STAT9 //调用FB的输出结果#STAT9
O #STAT13 //或上FB的输出结果#STAT13
R #STAT5 //复位 #STAT5
S #STAT22 //复位 #STAT22
提问者对于答案的评价:
谢谢你的回答,还比较详细,有这方向的说明书吗
专家置评
STL语言手册:
用于S7?300和S7?400的 语句表(STL),编程
https://support.industry.siemens.com/cs/us/en/view/18653496/zh
原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc225520.html